1. 8
    Change the properties of a lambda function deployed with AWS CDK
    1m 27s

Change the properties of a lambda function deployed with AWS CDK

InstructorTomasz Łakomy

Share this video with your friends

Send Tweet

Every resource we deploy to AWS with CDK has some default values configured for us so that we don't have to configure everything ourselves.

This comes in handy because it allows us to focus on building our infrastructure and solving our problems instead of configuring everything.

With that being said - CDK allows us to configure various properties of our resources! In this quick lesson we're going to learn how to configure the memory size and timeout of an AWS Lambda function.

Quang Le
Quang Le
~ 2 months ago

Not sure why there is a compilation error on timeout: cdk.Duration.seconds(10) as

  Types have separate declarations of a private property 'amount'.

26       timeout: cdk.Duration.seconds(10)
         ~~~~~~~

  node_modules/@aws-cdk/aws-lambda/lib/function.d.ts:67:14
    67     readonly timeout?: Duration;
                    ~~~~~~~
    The expected type comes from property 'timeout' which is declared here on type 'FunctionProps'

Does there anyone have any idea? Thanks

Tomasz Łakomy
Tomasz Łakomy(instructor)
~ 2 months ago

Hey! Is your code open source? I'd like to take a look and help :)