为什么VPC中的AWS Lambda无法将消息发送到SNS? [英] Why aws lambda within VPC can not send message to SNS?

查看:73
本文介绍了为什么VPC中的AWS Lambda无法将消息发送到SNS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的lambda函数可以使用无VPC"的发布方法将消息发送到SNS,但是当我将其放入可以通过路由和Internet网关访问公共互联网的VPC时,它将超时.

my lambda function can send message to SNS with publish method with "no VPC", but it will timeout when I put it in a VPC which has access to public internet with route and internet gateway.

我将我的lambda放在了已经路由到Internet网关的0.0.0.0/0的公共子网中,因此无法再次将其路由到NAT.是否可以将EIP分配给lambda函数

I have my lambda in a public subnet which has 0.0.0.0/0 already routed to the internet gateway, so can not route it again to NAT. Is that possible to assign a EIP to lambda function

推荐答案

您必须添加此AWS公告.

You have to add a NAT Gateway to your VPC in order for Lambda functions (and other things in your VPC that don't have a public IP) to access anything outside the VPC. You should read the Things to Know section of this AWS announcement.

这篇关于为什么VPC中的AWS Lambda无法将消息发送到SNS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆