Reputation: 622
I need to dynamically create git branch testing resources on AWS. So, I need to webhook -> api gateway -> lambda -> provision resources.
I wrote an example to let AWS CDK can be executed in AWS Lambda environment.
https://github.com/imyoungyang/cdk-in-lambda
Upvotes: 0
Views: 442
Reputation: 622
The key point is that you need to create aws credential and config file in the /tmp path because the default path is at Lambda default HOME is /home/usrXXX.
You can see the lambda index.js to get more detail information:
https://github.com/imyoungyang/cdk-in-lambda/blob/master/cdkInit/index.js#L42
Upvotes: 1