diff --git a/samcli/lib/utils/managed_cloudformation_stack.py b/samcli/lib/utils/managed_cloudformation_stack.py index 83cee2e0a5..2835f1b665 100644 --- a/samcli/lib/utils/managed_cloudformation_stack.py +++ b/samcli/lib/utils/managed_cloudformation_stack.py @@ -253,7 +253,7 @@ def _create_stack( Tags=[{"Key": "ManagedStackSource", "Value": "AwsSamCli"}], ChangeSetType="CREATE", ChangeSetName=change_set_name, # this must be unique for the stack, but we only create so that's fine - Capabilities=["CAPABILITY_IAM"], + Capabilities=["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"], Parameters=parameters, ) stack_id = change_set_resp["StackId"] diff --git a/tests/unit/lib/utils/test_managed_cloudformation_stack.py b/tests/unit/lib/utils/test_managed_cloudformation_stack.py index 277a21f078..e7dff209b8 100644 --- a/tests/unit/lib/utils/test_managed_cloudformation_stack.py +++ b/tests/unit/lib/utils/test_managed_cloudformation_stack.py @@ -99,7 +99,7 @@ def test_new_stack(self, boto_mock): "Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}], "ChangeSetType": "CREATE", "ChangeSetName": "InitialCreation", - "Capabilities": ["CAPABILITY_IAM"], + "Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"], "Parameters": [], } ccs_resp = {"Id": "id", "StackId": "aws-sam-cli-managed-default"} @@ -210,7 +210,7 @@ def test_change_set_creation_fails(self, patched_boto, patched_session): "Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}], "ChangeSetType": "CREATE", "ChangeSetName": "InitialCreation", - "Capabilities": ["CAPABILITY_IAM"], + "Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"], "Parameters": [], } stubber.add_client_error("create_change_set", service_error_code="ClientError", expected_params=ccs_params) @@ -233,7 +233,7 @@ def test_change_set_execution_fails(self, patched_boto): "Tags": [{"Key": "ManagedStackSource", "Value": "AwsSamCli"}], "ChangeSetType": "CREATE", "ChangeSetName": "InitialCreation", - "Capabilities": ["CAPABILITY_IAM"], + "Capabilities": ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"], "Parameters": [], } ccs_resp = {"Id": "id", "StackId": "aws-sam-cli-managed-default"}