You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stage variable updates will cause an API Gateway UpdateStage call during SAM API stack deployment. However, since API Stage variables are not considered as hash input to ApiGatewayDeployment.make_auto_deployable, an update to a SAM API Stage can be made without a new deployment.
The API Stage variables updates are not 'deployed',
UpdateStage will reset the Active API Deployment to it's last known good API Deployment ID. If you have made other non-SAM managed deployments since your last SAM managed deployment, a latest change with just API Stage Variable changes will revert the active deployment Id to the last known good deployment. This effectively reverts your latest changes made outside of the SAM managed changes.
My team uses scripts to adjust the API Resource Policy (to onboard new clients), then deploy those authz changes using create-deployment, The above issue 2) recently caused an issue where our latest onboarding Resource Policy changes were no longer active after an API Stage Variable only change SAM deployment
REPRO:
Deploy SAM Api
Manually update the API Resource Policy
Manually deploy the API
Update SAM definition to add / change an API Stage Variable
Deploy the updated SAM definition
OBSERVE:
Step 5) creates an CFN Changeset with the update to the API Stage variables.
Processing that change set produces a Cloud Trail UpdateState Event where you can see both the new variable details, ,but also the 'reset' of the deploymnent value to something old.
IMPACT:
Your manual policy update step 2) is no longer active.
The text was updated successfully, but these errors were encountered:
It appears changing any number of stage properties could cause CFN to UpdateStage and reset the Active deploymentId if new changes are not detected via the current auto_deployable hash.
Is there any reason not to use the property values of the stage parameter passed into make_auto_deployable as hash input to create a new deployment when stage properties change?
In my case, it was an isolated change to the Stage variables that caused the UpdateStage without a new deployment.
Stage variable updates will cause an API Gateway UpdateStage call during SAM API stack deployment. However, since API Stage variables are not considered as hash input to ApiGatewayDeployment.make_auto_deployable, an update to a SAM API Stage can be made without a new deployment.
serverless-application-model/samtranslator/model/apigateway.py
Lines 95 to 103 in 17000c1
This means
My team uses scripts to adjust the API Resource Policy (to onboard new clients), then deploy those authz changes using create-deployment, The above issue 2) recently caused an issue where our latest onboarding Resource Policy changes were no longer active after an API Stage Variable only change SAM deployment
REPRO:
OBSERVE:
IMPACT:
Your manual policy update step 2) is no longer active.
The text was updated successfully, but these errors were encountered: