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?

posta 4 anni fa297 visualizzazioni
1 Risposta
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.

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande