I am writing a SAM template, I am trying to reference the security group id in the VpcConfig
section in a lambda function as the following:
VpcConfig:
SecurityGroupIds:
- !GetAtt aurora-mysql.GroupId
SubnetIds:
- subnet-1234abcd
- subnet-abcd1234
where aurora-mysql
is the name of the security group created earlier as the following:
When I try to deploy the stack it gives the following error message:
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template error: instance of Fn::GetAtt references undefined resource aurora-mysql
It can't see the aurora-mysql
security group.
This security group already exists and was created earlier outside the cloudformation template.
Any solutions please?