A simple AWS Lambda function with automated CI/CD and releases.
lambda-basic/
├── src/ # Lambda function code
├── .github/workflows/ # GitHub Actions
└── deploy.sh # Local deployment
# Install dependencies
npm install
# Test locally
npm run test
# Package for deployment
npm run package- Push to
mainbranch triggers automatic release - Download
function.zipfrom releases - Upload to AWS Lambda
./deploy.sh- PR: Validation and testing
- Main: Creates release with
function.zip - Tags:
v{number}+latest
- Runtime: Node.js 20.x
- Handler:
index.handler - No environment variables needed
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}
]
}MIT License