Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Latest commit

 

History

History
19 lines (14 loc) · 879 Bytes

07-change-the-properties-of-a-lambda-function-deployed-with-aws-cdk.md

File metadata and controls

19 lines (14 loc) · 879 Bytes

Change the properties of a lambda function deployed with AWS CDK

📹 Video

Back in the aws console we can see that our lambda came preconfigured with memory size (128MB) and a timeout of 3 seconds. Let's change that!

Add the following lines to your stack document:

const helloLambda = new lambda.Function(this, "HelloLambda", {
  // to create a 10 second timeout (max is 15 minutes)
    timeout: cdk.Duration.seconds(10),
    // memory size of 256MB
    memorySize: 256,
});

Lambda Function Image

Run cdk diff and cdk deploy then verify your changes in the aws console.