Problem
Currently, this action always creates a ZIP from code-artifacts-dir and immediately deploys to Lambda. This prevents multi-stage deployment workflows (dev → staging → prod) where the same artifact should be deployed across multiple environments.
Proposed Solution
Add two capabilities:
- Artifact-only mode: Create and store deployment package without updating Lambda function
- Deploy from ZIP file: Deploy using an existing ZIP file instead of building from source directory
Use Case
# Build phase - create artifact once
- name: Create deployment package
uses: aws-actions/aws-lambda-deploy@v1
with:
code-artifacts-dir: dist/
s3-bucket: deployment-bucket
artifacts-only: true
# Deploy phase - use same artifact for multiple environments
- name: Deploy to production
uses: aws-actions/aws-lambda-deploy@v1
with:
function-name: my-function-prod
zip-file: path/to/package.zip
Benefits
- Enables standard multi-stage deployment patterns
- Ensures identical artifacts across environments
- Reduces build time for multiple deployment