Lambda Functions raise forbidden error until stack deleted and redeployed

0

Currently if I add a new Lambda Function to the SAM Template and Route to it through an API Gateway (WebSocket type), it will raise a 'Forbidden' error until I manually delete the entire Stack and redeploy the SAM Template.

The Lambda Function, API Gateway and routing, and Permissions are all established in the SAM Template and work just fine on a clean deploy (no existing stack). But, if I add a new Lambda Function to the SAM Template with all the previously mentioned plumbing, it will not be accessible until I delete the stack manually, then re-run the deployment.

Is there any guidance to ensure that every deployment, where the plumbing is correct, will result in accessible Lambda Functions?

已提問 4 年前檢視次數 297 次
1 個回答
0

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html

AutoDeploy defaults to false

Add the AutoDeploy property to the Stage and set to true and the problem is solved.

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南