Created
February 22, 2021 02:30
-
-
Save apoorvmote/f2adcd20c50b725c36af2f4b86a2a197 to your computer and use it in GitHub Desktop.
This file contains 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
exports.handler = async (event) => { | |
console.log(event) | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ message: 'success' }) | |
} | |
} |
This file contains 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 { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; | |
import * as cdk from '@aws-cdk/core'; | |
export class LambdaLocalStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
// The code that defines your stack goes here | |
const oneFn = new Function(this, 'oneFn', { | |
runtime: Runtime.NODEJS_14_X, | |
code: Code.fromAsset(`${__dirname}/../lambda-fns/one/deployment.zip`), | |
handler: 'index.handler' | |
}) | |
} | |
} |
This file contains 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
# https://taskfile.dev | |
version: '3' | |
tasks: | |
default: | |
cmds: | |
- rm deployment.zip -f | |
- zip deployment.zip index.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment