From cd63e2882e8b8aa07a642f083ab842637b35f267 Mon Sep 17 00:00:00 2001 From: Matthias Kerk Date: Mon, 31 Oct 2016 14:22:42 +0100 Subject: [PATCH] add support for CAPABILITY_NAMED_IAM --- senza/aws.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/senza/aws.py b/senza/aws.py index c7f04681..40320c8a 100644 --- a/senza/aws.py +++ b/senza/aws.py @@ -149,7 +149,10 @@ def get_required_capabilities(data: dict): capabilities = [] for logical_id, config in data.get('Resources', {}).items(): if config.get('Type').startswith('AWS::IAM'): - capabilities.append('CAPABILITY_IAM') + if config.get('Properties', {}).get('RoleName'): + capabilities.append('CAPABILITY_NAMED_IAM') + else: + capabilities.append('CAPABILITY_IAM') return capabilities