Skip to content

Instantly share code, notes, and snippets.

@cagingulsen
Last active March 1, 2022 21:16
Show Gist options
  • Select an option

  • Save cagingulsen/6cedaf9a7dde5c89ab036cfc3aa20be3 to your computer and use it in GitHub Desktop.

Select an option

Save cagingulsen/6cedaf9a7dde5c89ab036cfc3aa20be3 to your computer and use it in GitHub Desktop.
for Production-Ready CDK - CDK Pipelines
import { Stack, StackProps } from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { Construct } from 'constructs';
// example cdk app stack
export class LambdaStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
new lambda.Function(this, 'ExampleFunction', {
functionName: 'example-lambda',
code: lambda.Code.fromAsset('lambda'),
handler: 'hello.handler',
runtime: lambda.Runtime.NODEJS_14_X,
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment