Dan Hardiker
Dan Hardiker

Reputation: 3053

How do I set the AWS peering connection DNS resolution options through CloudFormation?

I have two VPCs:

We have successfully setup a VPC peering connection, routes and security groups to allow appropriate communication.

In order to resolve the RDS instance AZ-appropriate local IP address from it's hostname, we need to follow these instructions and set --requester-peering-connection-options AllowDnsResolutionFromRemoteVpc=true.

If I do this manually through the AWS Console or the AWS CLI it all works fine, however I'm creating the cluster of EC2 instances through CloudFormation and the option is missing from the CloudFormation documentation.

The effect of this is that my stack starts up and fails because the services themselves cannot connect to the database.

Am I doing something obvious wrong, or is this just Amazon being incomplete?

Thanks!

Upvotes: 10

Views: 1718

Answers (1)

Dan G
Dan G

Reputation: 1118

Due to the frequency of updates, there are many times where an AWS feature isn't available in CloudFormation (ALB targeting Lambda used to be) - you end up having to create a custom resource to manage it. It's not too bad, just make sure that your lambda responds with success or failure in all scenarios, including exceptions, otherwise your stack will be 'in progress' for hours.

Upvotes: 3

Related Questions