Terraform import for importing an instance where the AMI is not present now

Need help to import a running EC2 instance where the AMI used to create that instance is not available now.