Reputation: 4930
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:
The lambda function's role has permission to execute all SSM actions on all resources (just a temporary situation to rule out iam permissions)
I have tried console.log debugging, and it shows the lambda function timing out after it tries to get info from SSM.
Can anyone suggest how I might debug this?
Thanks
Upvotes: 4
Views: 2072
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