amplify-cli: Cannot update existing project: Resource access permission not configured & push not in stackUpdateComplete
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.18.3
Amplify CLI Version
10.6.0
What operating system are you using?
Mac OS 12.6
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Describe the bug
My project deploys properly via the AWS Amplify console, but when I look at details from the amplify-cli it shows my Lambda functions as not having any resource access permissions, and when I try to add them, amplify push fails for all lambda functions with the ambiguous message:
AWS Amplify: Resource is not in the state stackUpdateComplete
And then when I run amplify diagnose --send-report it fails with no information other than:
✖ Sending zip
Expected behavior
- I would expect that the CLI would know about the resource access permissions between my resources
- I would expect that reapplying them from the CLI would work
- I would expect that sending diagnostics would work or give an informative error message
Reproduction steps
My project was created in November 2018, along the way I connected it to the AWS Amplify console so it could build and deploy via CI on my dev and master branches. I have not used “Studio”.
Here are the relevant categories and resource names in my project:
- Auth: fpcognito
- Api: fpapi
- Function: fpaccount, fpwebhooks
- Storage: fpusers, fpabtest
I am trying to test adding a new DynamoDB table fporgs and giving it access to a the fpaccount Function. I did the following:
- Reset everything locally to match my
devenv withamplify pull dev - Created
fporgsviaamplify storage add - Pushed the change successfully via
amplify push - Went to add resource access permissions via
amplify function update - I selected the resource
fpaccount(see the log output below to see what the CLI showed for that) - Under storage, I selected: fpusers, fpabtest, and the new fporgs tables
- I set all perms for these tables
- I ran a new
amplify push - It failed with the “Resource is not in the state stackUpdateComplete” error
Project Identifier
This command errored out, but I think this is the project identifier: d32cgdvim65k7p
EDIT: another developer was able to generate one: 0b218acd3765ca818ae3151d0fe34855
Log output
# Put your logs below this line
## Output of running amplify function update
> amplify function update
? Select the Lambda function you want to update fpaccount
General information
- Name: fpaccount
- Runtime: nodejs
Resource access permission
- Not configured
Scheduled recurring invocation
- Not configured
Lambda layers
- Not configured
Environment variables:
- Not configured
Secrets configuration
- Not configured
# I excluded the rest of the output of this command…
############################################
## Output of running amplify push
> amplify push
✔ Successfully pulled backend environment dev from the cloud.
Current Environment: dev
┌──────────┬────────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Function │ fpaccount │ Update │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Auth │ fpcognito │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Function │ fppreauth │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Function │ fpwebhooks │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Storage │ fpusers │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Storage │ fpabtest │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Storage │ fporgs │ No Change │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Api │ fpapi │ No Change │ awscloudformation │
└──────────┴────────────────┴───────────┴───────────────────┘
? Are you sure you want to continue? Yes
Deployment failed.
Deploying root stack fullpage [ ===========================------------- ] 8/12
fullpage-20190114131120 AWS::CloudFormation::Stack UPDATE_ROLLBACK_COMPLETE Mon Jan 09
storagefpusers AWS::CloudFormation::Stack UPDATE_COMPLETE Mon Jan 09
storagefporgs AWS::CloudFormation::Stack UPDATE_COMPLETE Mon Jan 09
authfpcognito AWS::CloudFormation::Stack UPDATE_COMPLETE Mon Jan 09
functionfppreauth AWS::CloudFormation::Stack UPDATE_COMPLETE Mon Jan 09
storagefpabtest AWS::CloudFormation::Stack UPDATE_COMPLETE Mon Jan 09
functionfpaccount AWS::CloudFormation::Stack UPDATE_FAILED Mon Jan 09
Deployed function fppreauth [ ======================================== ] 3/3
Deployed function fpaccount [ ======================================== ] 4/4
Deploying function fpwebhooks [ ---------------------------------------- ] 0/4
🛑 The following resources failed to deploy:
🛑 Resource is not in the state stackUpdateComplete
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Session Identifier:
✅ Report saved: /var/folders/s8/2cc1_sx93dgdm20y08gnc2900000gn/T/fullpage/report-1673313358782.zip
⠧ Sending zip
✖ Sending zip
Additional information
No response
Before submitting, please confirm:
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- I have removed any sensitive information from my code snippets and submission.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 18 (12 by maintainers)
The problem was identified as the project needing to have the storage resources updated. I ran
amplify storage updateon both existing DynamoDB tables (just ran through everything without making any actual updates, but this generated new files, likecli-inputs.json, which didn’t exist, yet, because this project is quite old and the CLI doesn’t identify the need to update/migrate).Thanks for your help @sdstolworthy and @akshbhu !
@josefaidt thanks for checking on this! This was in my local terminal output—you can see in my “Reproduction steps” the commands that I executed. I also added more to the “Log output > details” section just now.
Hey @mrcoles 👋 thanks for raising this! As we begin to look at this issue in more depth I wanted to clarify whether you are seeing a CloudFormation error for these functions in the AWS CloudFormation console or in your local terminal output?