From 34d48eb89bfd680f0acba0b7ab936a5e9eb7726d Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 21 Jul 2016 10:54:40 -0500 Subject: [PATCH] Add CAPABILITY_NAMED_IAM to cloudformation capabilities While from the documentation[1] one would assume that replacing CAPABILITY_IAM with CAPABILITY_NAMED_IAM; this as empirically been shown to not be the case. 1: "If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM." http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html --- cloud/amazon/cloudformation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/amazon/cloudformation.py b/cloud/amazon/cloudformation.py index 59cd7215e69..615f11527c5 100644 --- a/cloud/amazon/cloudformation.py +++ b/cloud/amazon/cloudformation.py @@ -319,7 +319,7 @@ def main(): stack_policy_body=stack_policy_body, template_url=template_url, disable_rollback=disable_rollback, - capabilities=['CAPABILITY_IAM'], + capabilities=['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM'], **kwargs) operation = 'CREATE' except Exception as err: @@ -342,7 +342,7 @@ def main(): stack_policy_body=stack_policy_body, disable_rollback=disable_rollback, template_url=template_url, - capabilities=['CAPABILITY_IAM']) + capabilities=['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM']) operation = 'UPDATE' except Exception as err: error_msg = boto_exception(err)