Skip to content

Instantly share code, notes, and snippets.

@oliverjumpertz
Created December 19, 2020 13:35
Show Gist options
  • Save oliverjumpertz/6db50cb3d5134b6287a94a40ae07888d to your computer and use it in GitHub Desktop.
Save oliverjumpertz/6db50cb3d5134b6287a94a40ae07888d to your computer and use it in GitHub Desktop.
Minimum contents of a project for a containerized Lambda
FROM public.ecr.aws/lambda/nodejs:12
COPY package*.json ./
RUN npm install
COPY index.js ./
CMD [ "index.handler" ]
module.exports.handler = async (event, context) => {
return { msg: 'Hello from lambda!' };
};
{
"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