-
Couldn't load subscription status.
- Fork 2.4k
Closed
Description
Description:
Only renaming (no code change) a Serverless::Function using a FunctionName property does not trigger an Api Gateway stage deploy and the API Gateway stage still points to the previous lambda, which in that case does not exist anymore, generating an internal server error.
Manually triggering an API Gateway deploy does solve the problem, but according to me that should be done automatically when the FunctionName changes.
Steps to reproduce the issue:
- Using cloudformation, create an AWS::Serverless::Api pointing at a AWS::Serverless::Function . Deploy it, check that the calls are correctly triggering the lambda.
- Add a static FunctionName property to the Function, different than the one previously generated during the first deploy. Redeploy the stack.
- Try to call the lambda through the api gateway again.
Observed result:
- Error 500, Internal Server Error code
- No event is routed to the lambda function
Expected result:
- Correct invocation of the lambda function
Metadata
Metadata
Assignees
Labels
No labels