Push removing required keys from Lambda Layers in nested-cloudformation-stack.yml
See original GitHub issueDescribe the bug
Having previously used lambda layers when released we upgraded to version 4.29.0 to take advantage of the multi-env support. We have recreated our existing layers and removed the old ones from the Amplify project
The layers are allocated to Lambda functions within the project using the amplify update function
command.
All was working fine yesterday evening with the stack pushing as expected to the cloud. This morning I ran another ampify push -y
following an amplify init
and now the stack is not picking up the s3Key and deploymentBucketName from two of the three layers and is failing with the errors below:
UPDATE_FAILED functionRTRalphaClient AWS::CloudFormation::Stack Tue Sep 08 2020 09:49:21 GMT+0100 (British Summer Time) Parameters: [s3Key, deploymentBucketName] must have values
UPDATE_FAILED functionRTRappsyncClient AWS::CloudFormation::Stack Tue Sep 08 2020 09:49:21 GMT+0100 (British Summer Time) Parameters: [s3Key, deploymentBucketName] must have values
Amplify CLI Version 4.29.0
To Reproduce
Set up Lambda layers, allocate them to functions and then run amplify push -y
.
Expected behavior The stack should not lose these keys and should deploy the layers/functions as expected.
Screenshots Two unhealthy layers in nested-cloudformation-stack.yml shown below:
Healthy layer in same stack shown below:
You can see from these screenshots that indeed the s3Key and deploymentBucketName are missing. Manually adding them in is of course overwritten by the push command.
Desktop (please complete the following information):
- OS: Mac
- Node Version. 12.18.3
Additional context We have some custom resources in the Amplify project (5 SQS queues). backend-config.json seems to be intact.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:15 (1 by maintainers)
@ammarkarachi I’ve been hit with this one today but for a S3 trigger. Currently stopping me doing a push and I don’t know what my
team-provider-info.json
file is meant to have in it to get it working again.Tried all the usual stuff (
amplify init
andamplify pull --restore
and the fuller version of the pull with environment ID that you can get from the Amplify console) and then I noticed that there was a new version out of the CLI. As a last ditched effort I installed that and did a freshamplify pull
and that fixed it! Myteam-provider-info.json
file got updated and all was good again.Hope that helps someone else for the hopefully brief window when this might cause issues.
Any potential update on this from the Amplify CLI team? It’s getting to be a real pain to have to discard or pick through changes to team-providers on each init/env checkout.