This message was deleted.
# aws
s
This message was deleted.
l
If the AMI no longer exists, then do you really want to try/catch the error? Don't you want to update the AMI to something that does exist?
g
@little-cartoon-10569 - updating the AMI would completely destroy my staging or production EC2s, so definitely NOT! The better solution can be found @ https://app.slack.com/client/T85C88L30/CRH5ENVDX Thanks for your response. -- L
l
That link doesn't work for me.
s
You could do an
ignoreChanges
on the AMI property of the EC2 instance: https://www.pulumi.com/docs/concepts/options/ignorechanges/ This would let you get past the missing AMI error (for now), but it’s still something you’ll need to address at some point.
l
And you could avoid getAmi, and just hard-code the AMI id.
s
Or provide the AMI ID as a configuration value to the stack. 🙂