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?

demandé il y a 4 ans297 vues
1 réponse
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.

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions