将超时从AWS Lambda连接到AWS CodePipeline

发布于 2025-01-28 14:55:59 字数 562 浏览 3 评论 0原文

我正在尝试使用以下链接从lambda触发代码管道,也获得了Lambda Python代码。

https://aws.amazon.com/blogs/devops/adding-custom-custom-logic-to-to-waws-codepipeline-with-with-aw-aws-lambda-and-amazon-cloudwatch-events/

Noreferrer 跑步我有例外 连接端点URL上的超时网站“ https://codepipeline.ap-southeast-2.amazonaws.com/”

我使用lambda附加的安全组打开了所有流量。

请建议在这里检查什么。

谢谢 莎拉德

I am trying to trigger code pipeline from lambda using below link got the lambda python code as well.

https://aws.amazon.com/blogs/devops/adding-custom-logic-to-aws-codepipeline-with-aws-lambda-and-amazon-cloudwatch-events/

But somehow while running i am getting exception as
Connect timeout on endpoint URL "https://codepipeline.ap-southeast-2.amazonaws.com/"

I have opened all traffic using security group attached to lambda.

Please suggest what else to check here.

Thanks
Sharad

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞花火° 2025-02-04 14:55:59

您正在通过VPC运行Lambda功能(您说的是附加了一个安全组的事实)。如果没有通往NAT网关的路线,VPC中的Lambda功能将无法访问VPC之外的任何内容。 VPC中的lambda功能永远不会分配给公共IP,因此它永远无法直接使用VPC Internet网关。因此,要访问VPC之外的任何内容,例如AWS API触发codepipeline运行,lambda函数只需要在VPC子网的子网中部署,该子网具有通往NAT网关的路由。

另一种选择是为要访问的特定AWS服务添加VPC端点。

You are running your Lambda function in a VPC (as evidenced by the fact that you said it has a security group attached). A Lambda function in a VPC cannot access anything outside the VPC without a route to a NAT Gateway. A Lambda function in a VPC never gets a public IP assigned to it, so it can never use a VPC Internet Gateway directly. Thus to access anything outside your VPC, such as the AWS API to trigger a CodePipeline run, the Lambda function needs to be deployed only in subnets of your VPC that have a route to a NAT Gateway.

The alternative would be to add a VPC Endpoint for the specific AWS Service you want to access.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文