Accessing Parameter Store from VPC / Lambda

依然范特西╮ 提交于 2021-02-18 11:45:14

问题


My lambda function can access Systems Manager parameters (ssm.getParameter) when NOT in a VPC. When I add the lambda function to my VPC, I lose access to SSM. The function times out.

Clearly I am missing a security group setting or something but can't figure it out. What do I need to do to enable lambda access to SSM when running it in my VPC?


回答1:


Most likely this is because you're creating your lambda function in the public subnet, Lambda does get public ip address and uses NAT to access resources outside VPC.

Also, as a side note AWS now provides an endpoint for SSM https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-setting-up-vpc.html so you don't even need to go through the internet anymore



来源:https://stackoverflow.com/questions/51390038/accessing-parameter-store-from-vpc-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!