question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push removing required keys from Lambda Layers in nested-cloudformation-stack.yml

See original GitHub issue

Describe 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:

image

Healthy layer in same stack shown below:

image

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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
PeteDuncansoncommented, Feb 10, 2021

@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 and amplify 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 fresh amplify pull and that fixed it! My team-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.

4reactions
naldertowncommented, Nov 12, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with nested stacks - AWS CloudFormation
Nested stacks are stacks created as part of other stacks. You create a nested stack within another stack by using the AWS::CloudFormation::Stack resource....
Read more >
Lambda Layers with Nested SAM Applications | by Luke Miller
Create a new, separate, SAM template and code repo for this Layer. I set up a CodePipeline with mine as well, which means...
Read more >
How do I implement Nested Stacks in AWS Cloud formation?
I want the URL that was made with template.yaml to be applied to all lambda functions, regardless of which nested stack it is...
Read more >
Top 10 Serverless Deployment Errors (and How to Fix Them)
The CloudFormation stack is in an invalid state for preparation ... the case when a function requires a parameter such as an API...
Read more >
How to Deploy Your Lambda Functions with CloudFormation
This approach is a key point to remember as we discuss Lambda deployments and also exposes one of the first holes in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found