如何调试连接问题:从 VPC 中的 Lambda 函数连接到 SSM VPC 端点

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

我在 VPC 中有一个 lambda 函数,它应该能够通过 VPC 端点连接到 SSM。事实上,我已经在另一个 VPC(默认)中使用它,但无法在我使用 CloudFormation 构建的新 VPC 中使用它。此外,我能够通过同一 VPC 的 VPC 端点连接到 S3:

任何人都可以建议我如何调试它吗?

谢谢

终于找到了问题,我想 post 以防其他人遇到同样的问题。

VPC 端点需要启用私有 DNS。

通过控制台手动创建 VPC 端点时,默认选中 Enable Private DNS Name 复选框。

但是,当使用 CloudFormation 创建 VPC 端点时,PrivateDnsEnabled 属性 需要明确设置为 true。