AWS CLI CloudFormation Cheat Sheet/Package local artifacts

Upload local artifacts and rewrite a template.

Section: Packaging and Artifact Flows

Package local artifacts

bash
bash
aws cloudformation package --template-file template.yaml --s3-bucket my-cfn-artifacts --output-template-file packaged.yaml
Explanation

Useful when templates reference local Lambda zips or nested templates.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Packaging and Artifact Flows
Deploy with parameter overrides
Pass parameters at deployment time.
OpenIn sheetbashsame section
Deploy without failing on empty change set
Treat no-op deployments as success.
OpenIn sheetbashsame section
Validate a template
Check a template for basic syntax and structural validity.
OpenIn sheetbash2 tag match
Create a change set
Preview stack changes before execution.
OpenIn sheetbash2 tag match
Create a stack
Create a CloudFormation stack from a local template.
OpenIn sheetbash2 tag match
Describe a change set
Inspect the changes proposed for a stack.
OpenIn sheetbash2 tag match