Cannot add API permissions to new lambda function
See original GitHub issueBefore opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.10.1
Amplify CLI Version
4.45.0
What operating system are you using?
Windows/Ubuntu (WLS2)
Amplify Categories
api
Amplify Commands
add, push
Describe the bug
I can no longer add API permissions to a new lambda function. This was working before I “upgraded” to the latest Amplify CLI version…
UPDATE_FAILED functioncreateNewCompany AWS::CloudFormation::Stack Wed Mar 10 2021 13:33:54 GMT+0000 (Greenwich Mean Time) Output 'ApiId' not found in stack 'arn:aws:cloudformation:us-east-1xxxxxxxxxxx:stack/amplify-resourceshub-develop-xxxxxxx-apiAdminQueries-xxxxxxxxxxxxx/958aae00-6c96-11eb-b487-0e53bf60440d'
Expected behavior
To be able to create a new lambda function with access to my GraphQL API.
Reproduction steps
amplify add function
and add permissions to access your API instance.amplify push
and see the stack fail to deploy since an ApiId does not exist.
Log output
# Put your logs below this line
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Resolve API Gateway REST API Lambda integration errors
To add Lambda invoke permission to a REST API with a Lambda integration using the AWS CLI ... Run the following add-permission AWS...
Read more >How do I troubleshoot Invalid Permissions on Lambda ...
Your browser can't play this video. ... you how to troubleshoot Invalid Permissions on Lambda function errors from API Gateway REST APIs.
Read more >How do I troubleshoot "Invalid permissions on Lambda ...
Your browser can't play this video. ... you how to troubleshoot "Invalid permissions on Lambda function " errors from API Gateway REST APIs....
Read more >Issue with Lambda-Permission for API-Gateway #59 - GitHub
All, it seems to me that there is a bug with the created LAMBDA-Policy when creating a "ANY"- API-Gateway-Mapping to a Lambda-Function, ...
Read more >AWS API Gateway Invoke Lambda Function Permission
You can add a resource based policy for your API Gateway to invoke your Lambda function on AWS API Gateway console. These are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kylekirkby I am happy that you are unblocked, I was able to reproduce the same issue, so I’m marking it as a bug:
CREATE_FAILED functionadminqff5fda81 AWS::CloudFormation::Stack Thu Mar 11 2021 13:59:25 GMT-0800 (Pacific Standard Time) Output 'ApiId' not found in stack 'arn:aws:cloudformation:us-west-2:xxxxxxx:stack/amplify-adminq-dev-135206-apiAdminQueries-xxxxxxx/fcf54a30-82b4-11eb-xxxx-xxxxxxxxxxxx'
Repro:
Output parameters needs to include the
ApiId
to support the CRUD scenario.I’ve moved away from this approach anyway, so doesn’t block me but should still be looked at, I believe. I’ve added the
adminQueriesAPI
functions to a lambda layer so I’m running some Congito admin bits through that.