diff --git a/CHANGELOG.md b/CHANGELOG.md index e7949ea..376a81d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Version 2.1.10 (2019-5-1) + +Issues: +- Fixes package error after awscli `1.16.145` + ## Version 2.1.9 (2019-3-14) Hotfix diff --git a/awscfncli2/runner/runbook/package.py b/awscfncli2/runner/runbook/package.py index 650cb46..5f822c1 100644 --- a/awscfncli2/runner/runbook/package.py +++ b/awscfncli2/runner/runbook/package.py @@ -72,14 +72,25 @@ def package_template(ppt, session, template_path, bucket_region, else: raise e - s3_uploader = S3Uploader( - s3_client, - bucket_name, - bucket_region, - prefix, - kms_key_id, - force_upload=False - ) + try: + s3_uploader = S3Uploader( + s3_client, + bucket_name, + bucket_region, + prefix, + kms_key_id, + force_upload=False + ) + except TypeError: + # HACK: since awscli 1.16.145+ the bucket region parameter is removed + s3_uploader = S3Uploader( + s3_client, + bucket_name, + prefix, + kms_key_id, + force_upload=False + ) + template = Template(template_path, os.getcwd(), s3_uploader, resources_to_export=EXPORTS) diff --git a/samples/Simple/PyPiRelease/PyPiRelease.template.yaml b/samples/Simple/PyPiRelease/PyPiRelease.template.yaml index c0516b8..048f962 100644 --- a/samples/Simple/PyPiRelease/PyPiRelease.template.yaml +++ b/samples/Simple/PyPiRelease/PyPiRelease.template.yaml @@ -178,7 +178,7 @@ Resources: Action: - sts:AssumeRole ManagedPolicyArns: - - arn:aws:iam::aws:policy/AWSCloudFormationReadOnlyAccess + - arn:aws:iam::aws:policy/AdministratorAccess Policies: - PolicyName: CloudWatchLogsAccess PolicyDocument: @@ -346,6 +346,12 @@ Resources: - echo Entered the build phase... - cfn-cli --version - cfn-cli -v -f samples/Simple/DynamoDB/cfn-cli.yml validate + - cfn-cli -v -f samples/Simple/DynamoDB/cfn-cli.yml -s Default.DDB stack deploy + - cfn-cli -v -f samples/Simple/DynamoDB/cfn-cli.yml -s Default.DDB stack delete -qi + - cfn-cli -v -f samples/SAM/api_backend -s Production.ApiBackend-Production stack sync + - cfn-cli -v -f samples/SAM/api_backend -s Production.ApiBackend-Production drift detect + - cfn-cli -v -f samples/SAM/api_backend -s Production.ApiBackend-Production drift diff + - cfn-cli -v -f samples/SAM/api_backend -s Production.ApiBackend-Production stack delete -qi finally: - echo Leaving build phase... post_build: diff --git a/setup.py b/setup.py index 23f0ffe..bd8c5f6 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ name='awscfncli2', # Version and description - version='2.1.9', + version='2.1.10', description='AWS CloudFormation CLI', long_description=long_description,