This GitHub Action updates existing CloudFormation stack by changing some of its parameters while preserving all other settings.
- uses: artyom/update-cloudformation-stack@main
with:
stack: my-stack-name
parameters: |
Name1=value1
Name2=value2
stack
- name of the CloudFormation stack to updateparameters
- pairs of parameters in the Name=Value format, each pair on a separate line
This action uses the AWS SDK default credential provider chain. Configure AWS credentials using standard GitHub Actions methods:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/my-role
aws-region: us-east-1
This action requires the following permissions:
- cloudformation:DescribeStacks
- cloudformation:UpdateStack
- cloudformation:DescribeStackEvents
jobs:
update-stack:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/my-role
aws-region: us-east-1
- uses: artyom/update-cloudformation-stack@main
with:
stack: production-stack
parameters: |
ImageTag=v123
The action will monitor stack update progress and fail if update fails.
This action doesn't work for stacks that rely on template transformations (stack template has non-empty “Transform” section).
On such stacks UpdateStack API call does not recognize parameters-only changes and the action reports there's nothing to update.