LambdaRestApi throws an error in C#
See original GitHub issueDescribe the bug I’ve seen a new error using CDK 0.29 and 0.30 in .Net. Using LambdaRestApi throws an error.
“principal: required but missing”
To Reproduce This code:
var api = new LambdaRestApi(this, "myrestapi",
new LambdaRestApiProps
{
Handler = lambda
});
gives me this error: While synthesizing stack-name/lambda-name/ApiPermission.ANY…: Supplied properties not correct for “CfnPermissionProps” principal: required but missing
I could not reproduce using Typescript so I believe it’s a .Net specific issue.
My collegue made a work around by recreating the CustomLambdaIntegration in C# and using that directly.
Expected behavior Should be able to use LambdaRestApi to create an Lambda integration with API Gateway
Version:
- Windows 10
- C#
- 0.29 and 0.30
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Handle Lambda errors in API Gateway - AWS Documentation
If there is no match, API Gateway returns the error as a default response or throws an invalid configuration exception if no default...
Read more >Automatically deploy REST APIs with Lambda authorizers ...
Developer C sits at a desk working on an intermediate-level project. ... catch (error) { throw Error(`Error in backend: ${error}`); ...
Read more >Error Handling in AWS Lambda and API Gateway - Medium
If createDeal() throws an error that is not caught and rethrown we will not break the gateway handling. serverless.yml: createDeal: handler: ...
Read more >The Missing Guide to AWS API Gateway Access Logs
Debugging: If you get a spike in 500 Internal Server Error responses, ... required auth header or if your custom authorizer throws an...
Read more >How to handle Lambda errors in API Gateway - Fathom
Best practices for handling errors in AWS Lambda functions when working with API ... we can't simply throw an error back to API...
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 FreeTop 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
Top GitHub Comments
@Kylia669, we created a line for line remake of the CustomLambdaIntegration class but in C# (see below). Then we used the RestApi construct and set it’s default integration to an instance of our CustomLambdaIntegration class.
CustomLambdaIntegration (it’s private because we implemented it inside the class where we used it and expect to remove our implementation when this bug is fixed)
Then, in place of using a LambdaRestApi we used a RestApi in the following manor
Thanks for letting us know. Closing for now