{"id":34991277,"url":"https://github.com/buildkite-plugins/aws-lambda-deploy-buildkite-plugin","last_synced_at":"2026-04-28T03:34:46.975Z","repository":{"id":310496489,"uuid":"1040061366","full_name":"buildkite-plugins/aws-lambda-deploy-buildkite-plugin","owner":"buildkite-plugins","description":"👷WORK IN PROGRESS! 👷 Deploy AWS Lambda functions with Buildkite","archived":false,"fork":false,"pushed_at":"2025-08-28T13:50:35.000Z","size":19,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T20:13:05.273Z","etag":null,"topics":["aws","buildkite","buildkite-plugin","deployment","lambda","rollback"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildkite-plugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T11:56:16.000Z","updated_at":"2025-08-26T08:11:08.000Z","dependencies_parsed_at":"2025-08-21T18:47:32.060Z","dependency_job_id":null,"html_url":"https://github.com/buildkite-plugins/aws-lambda-deploy-buildkite-plugin","commit_stats":null,"previous_names":["buildkite-plugins/aws-lambda-deploy-buildkite-plugin"],"tags_count":1,"template":false,"template_full_name":"buildkite-plugins/template-buildkite-plugin","purl":"pkg:github/buildkite-plugins/aws-lambda-deploy-buildkite-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite-plugins%2Faws-lambda-deploy-buildkite-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite-plugins%2Faws-lambda-deploy-buildkite-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite-plugins%2Faws-lambda-deploy-buildkite-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite-plugins%2Faws-lambda-deploy-buildkite-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildkite-plugins","download_url":"https://codeload.github.com/buildkite-plugins/aws-lambda-deploy-buildkite-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite-plugins%2Faws-lambda-deploy-buildkite-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32365509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","buildkite","buildkite-plugin","deployment","lambda","rollback"],"created_at":"2025-12-27T01:54:50.313Z","updated_at":"2026-04-28T03:34:46.966Z","avatar_url":"https://github.com/buildkite-plugins.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Lambda Deploy Buildkite Plugin\n\nA Buildkite plugin for deploying AWS Lambda functions with alias management, health checks, and automatic rollback capabilities.\n\n## Features\n\n- ✅ **Deploy \u0026 Rollback**: Deploy new Lambda versions and rollback on failure\n- ✅ **Package Types**: Support for both Zip files and Container images\n- ✅ **Alias Management**: Manages Lambda aliases for blue/green deployments\n- ✅ **Health Checks**: Optional function invocation testing\n- ✅ **Auto Rollback**: Automatic rollback on deployment or health check failures\n- ✅ **Build Metadata**: Tracks deployment state across pipeline steps\n- ✅ **Annotations**: Creates detailed deployment and rollback annotations\n\n## Quick Start\n\n```yaml\nsteps:\n  - label: \":rocket: Deploy Lambda\"\n    plugins:\n      - aws-lambda-deploy#v1.0.0:\n          function-name: \"my-function\"\n          alias: \"production\"\n          mode: \"deploy\"\n          zip-file: \"function.zip\"\n          region: \"us-east-1\"\n          auto-rollback: true\n          health-check-enabled: true\n          health-check-payload: '{\"length\": 5, \"width\": 10}'\n\n```\n\nFor complete examples, see the [examples/](examples/) directory:\n\n- **[deploy-zip-file.yml](examples/deploy-zip-file.yml)** - Deploy from local zip file with full configuration\n- **[deploy-s3.yml](examples/deploy-s3.yml)** - Deploy from S3-stored package  \n- **[deploy-container.yml](examples/deploy-container.yml)** - Deploy container image with auto-rollback\n- **[manual-rollback.yml](examples/manual-rollback.yml)** - Manual rollback workflow\n\n## Configuration\n\n### Required Parameters\n\n| Parameter | Description |\n|-----------|-------------|\n| `function-name` | AWS Lambda function name |\n| `alias` | Lambda alias to manage (e.g., \"production\", \"staging\") |\n| `mode` | Operation mode: `deploy` or `rollback` |\n\n### Deploy Mode Parameters\n\n#### Package Configuration\n\n| Parameter | Type | Description | Required |\n|-----------|------|-------------|----------|\n| `package-type` | String | Package type: `Zip` or `Image` | No (default: `Zip`) |\n\n**For Zip packages (choose one):**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `zip-file` | String | Path to local zip file |\n| `s3-bucket` + `s3-key` | String | S3 location of zip file |\n| `s3-object-version` | String | S3 object version (optional) |\n\n**For Container images:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `image-uri` | String | ECR image URI |\n| `image-config` | Object | Container configuration (entrypoint, command, working-directory) |\n\n#### Function Configuration\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `runtime` | String | Lambda runtime (for Zip packages) |\n| `handler` | String | Function handler (for Zip packages) |\n| `timeout` | Integer | Function timeout in seconds |\n| `memory-size` | Integer | Memory allocation in MB |\n| `description` | String | Function description |\n| `environment` | Object | Environment variables |\n\n#### Health Checks \u0026 Rollback\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `auto-rollback` | Boolean | `false` | Enable automatic rollback on failure |\n| `health-check-enabled` | Boolean | `false` | Enable health check testing |\n| `health-check-timeout` | Integer | `300` | Health check timeout in seconds |\n| `health-check-payload` | String | `{}` | JSON payload for test invocation |\n| `health-check-expected-status` | Integer | `200` | Expected HTTP status code |\n\n### Common Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `region` | String | AWS region |\n\n## How It Works\n\n### Deploy Mode\n\n1. **Capture Current State**: Records the current alias target for potential rollback\n2. **Update Function Code**: Publishes new Lambda version with provided package\n3. **Wait for Active**: Ensures the new version becomes active\n4. **Update Configuration**: Applies any function configuration changes\n5. **Health Checks**: Runs optional health checks on the new version\n6. **Update Alias**: Points the alias to the new version\n7. **Post-deployment Checks**: Final health validation\n8. **Auto Rollback**: Automatically rolls back if any step fails (when enabled)\n\n### Rollback Mode\n\nThe rollback mode assesses the deployment state and takes appropriate action:\n\n- **Failed Deployment**: Rolls back alias to previous version and deletes failed version\n- **Successful Deployment**: Creates success annotation\n- **Manual Rollback**: Allows manual rollback regardless of deployment state\n\n### Build Metadata\n\nThe plugin uses Buildkite build metadata to track deployment state. All keys are namespaced by function name to support multiple function deployments:\n\n- `deployment:aws_lambda:{function_name}:current_version` - Current Lambda version\n- `deployment:aws_lambda:{function_name}:previous_version` - Previous version for rollback\n- `deployment:aws_lambda:{function_name}:result` - Deployment result (success/failed/rolled_back)\n- `deployment:aws_lambda:{function_name}:package_type` - Package type used\n- `deployment:aws_lambda:{function_name}:auto_rollback` - Whether auto-rollback was triggered\n\nFor example, when deploying a function named `my-api`, the metadata keys would be `deployment:aws_lambda:my-api:current_version`, etc.\n\n## Requirements\n\n- AWS CLI v2\n- jq\n- Appropriate AWS IAM permissions for Lambda operations\n\n### Required IAM Permissions\n\nExample policy\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"lambda:GetFunction\",\n        \"lambda:UpdateFunctionCode\",\n        \"lambda:UpdateFunctionConfiguration\",\n        \"lambda:PublishVersion\",\n        \"lambda:GetAlias\",\n        \"lambda:UpdateAlias\",\n        \"lambda:CreateAlias\",\n        \"lambda:DeleteFunction\",\n        \"lambda:InvokeFunction\"\n      ],\n      \"Resource\": \"arn:aws:lambda:*:*:function:*\"\n    }\n  ]\n}\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/my-feature`)\n3. Commit your changes (`git commit -am 'Add my feature'`)\n4. Push to the branch (`git push origin feature/my-feature`)\n5. Create a Pull Request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildkite-plugins%2Faws-lambda-deploy-buildkite-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildkite-plugins%2Faws-lambda-deploy-buildkite-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildkite-plugins%2Faws-lambda-deploy-buildkite-plugin/lists"}