Yang Young
Yang Young

Reputation: 622

Execute AWS CDK in Lambda environment

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

Answers (1)

Yang Young
Yang Young

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

Related Questions