Q: 5
A company has an AWS CloudFormation template that includes an AWS::EC2::Instance resource and
a custom resource (Lambda function). The Lambda function fails because it runs before the EC2
instance is launched.
Which solution will resolve this issue?
Options
Discussion
A DependsOn makes CloudFormation wait for the EC2 instance before running the Lambda, so that fixes the order. But does the Lambda need to interact with something actually running on the instance, or just need it launched? That detail would affect if any other steps are needed.
Be respectful. No spam.