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
Adding (or removing) FunctionName property to an AWS::Serverless::Function doesn't trigger an API Gateway deployment. This means executing a change set that adds a function name will cause API Gateways pointing to a Lambda Function to cease connecting. (In other words, the APIs will continue to point to a previous Lambda Function name and never update to the new name)
Steps to reproduce the issue:
Write a template to deploy an AWS::Serverless::Api backed by an AWS::Serverless::Function
Deploy the template
Make some calls to the API - it will work
Make a change set that adds a FunctionName property to the AWS::Serverless::Function
Deploy the template
Make some calls to the API -nothing connects
This also breaks in reverse, by removing a FunctionName property. (Meaning it's not possible to "roll back" since auto-generated names will not match before and after this action.)
Note: If anyone else experiences this, you can at least manually re-deploy the API Gateway stage for an immediate fix. (through the web console, CLI, or the SDKs)
Observed result:
API Gateway fails all calls to its resources with 500 errors.
Expected result:
API Gateway is deployed with its APIs pointing to new Lambdas.
Best case scenario, we'd be able to make use of Lambda aliases and CodeDeploy to make the switch seemlessly. Otherwise, some brief outage during the switch would be preferable to the current behavior of "breaks and never works without a manual deployment"
The text was updated successfully, but these errors were encountered:
This is another flavor of #479. SAM only generates a new API Gateway Deployment if the swagger definition changes. If SAM uses an intrinsic function inside the swagger definition, the definition is not seen as changed, even if the value returned by the intrinsic function changes. Here's an example SAM output showing that the Function's ARN is put into the swagger definition using intrinsic functions:
So when you change the FunctionName property, it doesn't change the actual swagger definition. A workaround for your specific case is to change the logical name of the resource.
Description:
Adding (or removing)
FunctionName
property to anAWS::Serverless::Function
doesn't trigger an API Gateway deployment. This means executing a change set that adds a function name will cause API Gateways pointing to a Lambda Function to cease connecting. (In other words, the APIs will continue to point to a previous Lambda Function name and never update to the new name)Steps to reproduce the issue:
AWS::Serverless::Api
backed by anAWS::Serverless::Function
FunctionName
property to theAWS::Serverless::Function
This also breaks in reverse, by removing a
FunctionName
property. (Meaning it's not possible to "roll back" since auto-generated names will not match before and after this action.)Note: If anyone else experiences this, you can at least manually re-deploy the API Gateway stage for an immediate fix. (through the web console, CLI, or the SDKs)
Observed result:
API Gateway fails all calls to its resources with 500 errors.
Expected result:
API Gateway is deployed with its APIs pointing to new Lambdas.
Best case scenario, we'd be able to make use of Lambda aliases and CodeDeploy to make the switch seemlessly. Otherwise, some brief outage during the switch would be preferable to the current behavior of "breaks and never works without a manual deployment"
The text was updated successfully, but these errors were encountered: