Closed yiweixia closed 3 years ago
@josefaidt transferred as this sounds like more of a cli issue than a js one.
@yiweixia This is a bug I can verify that for now you could push the api first by invoking amplify push api
and then do an amplify push
. The lambda function gets deployed first and looks for the table while it's not deployed yet.
Thanks @ammarkarachi, I had the same issue.
I still had to remove the function before running amplify push api
, which worked, and then re-added the function.
When I ran amplify push api
it still tried to update the function (which fails), perhaps because the function still has a dependency on the API? I'm not really sure.
@ngnathan I believe we are missing a depends on when the deployment happens in the same call. As another workaround you could remove the permission and add the permissions back. I know this is kind of an inconvenience but we should have a fix out soon
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels for those types of questions.
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
GraphQL API
Amplify Categories
function
Environment information
Describe the bug
If I define a new @model in my schema.graphql, then try to give one of my functions access to it through the amplify CLI using
amplify function update
-> select function -> resource access permissions -> storage -> choose table,then push, the push fails with
No export named qifwdw4eyfcabcgphqnnygcele:GetAtt:ExpendedBudgetTable:Name found
Expected behavior
The deployment should succeed, with the API changes being deployed first, and the resource permissions afterwards.
Reproduction steps
amplify function update
-> select function -> resource access permissions -> storage -> choose table, e.g. MyTable: @model(appsync) -> give it permissions, etc.Code Snippet
N/A
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response