Skip to content

feat: add s3-bucket and s3-prefix inputs for large template upload#196

Merged
kddejong merged 2 commits into
aws-actions:masterfrom
kddejong:feat/s3-template-upload
Apr 27, 2026
Merged

feat: add s3-bucket and s3-prefix inputs for large template upload#196
kddejong merged 2 commits into
aws-actions:masterfrom
kddejong:feat/s3-template-upload

Conversation

@kddejong
Copy link
Copy Markdown
Contributor

Summary

Adds s3-bucket and s3-prefix inputs so that large templates exceeding the 51,200 byte inline limit can be automatically uploaded to S3 before creating the change set.

When s3-bucket is provided and the template is a local file, the action uploads it via PutObject and passes TemplateURL instead of TemplateBody to CloudFormation.

Closes #180

Changes

  • action.yml: Added s3-bucket and s3-prefix inputs
  • package.json: Added @aws-sdk/client-s3 dependency
  • src/main.ts: S3 upload logic when s3-bucket is provided
  • src/validation.ts: Added new inputs to validation schemas
  • __tests__/main.test.ts: 3 new tests covering S3 upload with/without prefix and URL passthrough

Usage

- name: Deploy large template
  uses: aws-actions/aws-cloudformation-github-deploy@v2
  with:
    name: MyStack
    template: my-large-template.yaml
    s3-bucket: my-deployment-bucket
    s3-prefix: cfn-templates

Testing

All 209 tests pass.

…ws-actions#180)

When s3-bucket is provided, the action uploads the local template file
to S3 and uses TemplateURL instead of TemplateBody, avoiding the
51,200 byte inline template limit.

Closes aws-actions#180
@kddejong kddejong merged commit e040a2b into aws-actions:master Apr 27, 2026
2 checks passed
@kddejong kddejong deleted the feat/s3-template-upload branch April 27, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add option to upload template file to S3 bucket

1 participant