Joe
Joe

Reputation: 4930

How to debug connection issue: Connecting to SSM VPC Endpoint from Lambda Function in VPC

I have a lambda function in a VPC that should be able to connect to SSM via a VPC endpoint. In fact, I have had this working in another VPC (the default), but just can't get it to work in a new VPC that I have built with CloudFormation. In addition, I am able to connect to S3 via a VPC endpoint for the same VPC:

Can anyone suggest how I might debug this?

Thanks

Upvotes: 4

Views: 2072

Answers (1)

Joe
Joe

Reputation: 4930

Finally found the issue and thought I'd post this just in case anyone else has the same issue.

The VPC Endpoints needed to have private dns enabled.

When creating the VPC endpoint manually via the console, the Enable Private DNS Name checkbox is checked by default.

However, when creating the VPC endpoint using CloudFormation, the PrivateDnsEnabled property needs to be explicitly set to true.

Upvotes: 7

Related Questions