Created
December 19, 2020 13:35
-
-
Save oliverjumpertz/6db50cb3d5134b6287a94a40ae07888d to your computer and use it in GitHub Desktop.
Minimum contents of a project for a containerized Lambda
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
FROM public.ecr.aws/lambda/nodejs:12 | |
COPY package*.json ./ | |
RUN npm install | |
COPY index.js ./ | |
CMD [ "index.handler" ] |
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
module.exports.handler = async (event, context) => { | |
return { msg: 'Hello from lambda!' }; | |
}; |
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
{ | |
"name": "hello-lambda", | |
"description": "A containerized lambda example", | |
"version": "1.0.0", | |
"main": "index.js", | |
"author": "Your Name", | |
"license": "MIT", | |
"repository": "none" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment