Last active
March 1, 2022 21:16
-
-
Save cagingulsen/6cedaf9a7dde5c89ab036cfc3aa20be3 to your computer and use it in GitHub Desktop.
for Production-Ready CDK - CDK Pipelines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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