Skip to content

Instantly share code, notes, and snippets.

@hto
Last active March 1, 2022 08:31
Show Gist options
  • Save hto/22ba997df45729792c9d3ae3f9f2f24b to your computer and use it in GitHub Desktop.
Save hto/22ba997df45729792c9d3ae3f9f2f24b to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: '2010-09-09'
Transform: "AWS::Serverless-2016-10-31"
Description: ExampleStack - v.1
Parameters:
DynamoTableName:
Type: "String"
ExampleLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Code:
ZipFile: |
exports.handler = async (event) => {
console.log("Hello World.")
console.log("DYNAMODBTABLENAME", process.env.DYNAMODBTABLENAME);
return "Hello World"
};
Handler: index.handler
MemorySize: 128
Runtime: nodejs12.x
Timeout: 5
Environment:
Variables:
DYNAMODBTABLENAME: !Ref DynamoTableName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment