Closed rynop closed 4 years ago
If I understand this correctly, when you try to invoke the API gateway endpoint, you get the error that you pasted in this issue, but this error goes away when you edit + save the lambda integration request to lambda.
Is this correct?
Correct. When you save an APIG Lambda integration request, you get a popup stating that AWS will apply some permissions automatically on your behalf. If I accept the popup, error goes away.
@rynop I have deployed the given template (used InlineCode instead of CodeUri) and the template was working as expected. I didn't get any popup about applying permissions automatically nor any errors in the cloudwatch logs.
The RestApi output value (https://${APIG}.execute-api.${AWS::Region}.amazonaws.com/${StageName}/test1
) as well as the invoke URL from API Gateway are working as expected
Please let me know if I am missing anything to recreate this issue.
My guess is your AWS acct is not new. AFAIK this permission grant is once per acct.
@rynop I have created a new account and ran the same template and I am able to invoke URL without adding any other permissions Please let me know if you are still facing this issue
Thanks @ShreyaGangishetty . I'm closing this issue, maybe it was a timing issue / anomaly. I'll re-open if this happens again.
This issue is somewhat similar to https://github.com/awslabs/serverless-application-model/issues/59 and https://github.com/awslabs/serverless-application-model/issues/110
Description:
sam template.yml creates my API Gateway and Lambda resources. I can invoke lambda fine from API Gateway web
Method test
UI viaGET
. I can make an HTTP request just fine throughsam local start-api
viaGET
as well.Steps to reproduce the issue:
I have a full sample project at https://github.com/rynop/abp-sam-nestjs however, I think my sam template.yml should be sufficient:
I also tried adding the following without luck:
FWIW, If I use the API Gateway web console, go to Integration request, hit the edit pencil on
Lambda function
(dont modify) and hit save, the permission prompt comes up. If I hit yes, deploy API and test everything works...Observed result:
API Gateway Logs:
Expected result:
200 with JSON response body.