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.
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
Hey! Is your code open source? I'd like to take a look and help :)