From 20dd5a47a5d084a10da8b38cb10770a5cbe2eeb5 Mon Sep 17 00:00:00 2001 From: edd Date: Fri, 4 Aug 2023 11:51:13 +0100 Subject: [PATCH] Change supported python versions for the cloudformation-cross-account sample lambda_function ADD: Support for Python 3.8, 3.9, 3.10 DROP: Support for Python 3.6 environments (support for which has been deprecated by AWS) --- .../packages/CfnStackAssumeRole/lambda.zip | Bin 10267 -> 4555 bytes .../CfnStackAssumeRole/lambda_function.py | 9 +++++---- .../CfnStackAssumeRole/requirements.txt | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt diff --git a/samples/cloudformation-cross-account/functions/packages/CfnStackAssumeRole/lambda.zip b/samples/cloudformation-cross-account/functions/packages/CfnStackAssumeRole/lambda.zip index 23f8f134d0f77f1064b77f7246679fe95208517d..b2c571730298bf9d1b779de7e90f6e1fe17c7af0 100644 GIT binary patch delta 4477 zcmV-@5rXcUP|G71P)h>@6aWAK2mpgz1Xm2mW#$nP004`TK^}jV)XZd+)XZdccnbgl z1n2_*00ig*007M!Yj4}g@w``|7~NsjLdR4`z1IXg2uJMUd(n{8Ru?53>Cx1&rxRB@4(8~r5eDl2aF zQ(oTQT95Tz#p8d}8fdCK&u-o__JSR!DNotW16#b;Z+{bIFcJ|Bh{O{4}d3164 z;jfpAt1D-G0CfK0{l(ehdVzx{3;brFh@kcHK3<$4!Chp!uUl%}H=1ZPKU*B1f4p!p z9i(e`UP*sgFDs&LRo=ob3R^NA{?zh@x!%ix!^U3bHAkXJk`6ZmlD3CB*uB;05%eYH zYc!=ODT{S>8}Lt{OJf|#;cGrSFAF{M-1tTnz zd;TB-1*|7%#4Xrz2+4|p<+Gx!4JT7aWO@|Tb`O7&WlL`5aADT-WH!tUmk%?1h>@1! zN(*mzb=J!K&v8|NNAv9&1B}>A_#FL!obdu&2$5jmk#0(n)enr|#Hd5*mV*??BgbUWw(=3b}emTmS*Bd$ zaT;$Cvc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Qo zx+VoA4W+dx$gY*Tjr8T#Z~3=4OoHMG?h$-AlCd}*dkp=dybQ)Ax#i&_z#D@{>P}{& z5XbT6g9?Em6VCN~T-d(^Na~_q5$5~Ka(aH#7Nevu_Kn?gK}g8D|GJ+%K%?*tt%QA= zIsYRVl|5wGax1ut?hv0t6&g-rcYY!T%vhmE>qO0KWzwY(ne6;cfeJ;FxvOzgYj~EQ z5vpEw?6rqZu^B0=adq|gkQXKC^oF0qjsR^PC*f=6sV??L5STXZoj;CcL09?B&r<4- zuK1TdE0^cGRXe?+GJ%Fo9a&G1L}rQ)f2+6{z;2)SD>X4I7lZl!^AS57{bcE8&3%Z}XTm{l2lc+g8(}2S*-D_Re8HH5YuY+%M-tXcogtvz# zwEP!aHn8zgSb^^HDK-=<>Xze=ROBHgP%-HATtznVCA2ZxJ+JhnhP-@f4}iRp|YwXEZo1b(ErS{e>^eWzo-8N7i)p1 diff --git a/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/lambda_function.py b/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/lambda_function.py index cfc81c3..21773e2 100644 --- a/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/lambda_function.py +++ b/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/lambda_function.py @@ -3,7 +3,7 @@ import string import logging import threading -import requests +import urllib3 # Added by EM import json from botocore.credentials import ( AssumeRoleCredentialFetcher, @@ -14,6 +14,8 @@ from botocore.exceptions import ClientError +http = urllib3.PoolManager() # Added by EM + cfn_states = { "failed": ["CREATE_FAILED", "ROLLBACK_IN_PROGRESS", "ROLLBACK_FAILED", "ROLLBACK_COMPLETE", "DELETE_FAILED", "UPDATE_ROLLBACK_IN_PROGRESS", "UPDATE_ROLLBACK_FAILED", "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS", @@ -83,9 +85,8 @@ def send(event, context, response_status, response_data, physical_resource_id, l } try: - response = requests.put(response_url, - data=json_response_body, - headers=headers) + response = http.request('PUT', response_url, headers=headers, body=json_response_body) + logger.info("CloudFormation returned status code: " + response.reason) except Exception as e: logger.error("send(..) failed executing requests.put(..): " + str(e)) diff --git a/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt b/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt deleted file mode 100644 index f229360..0000000 --- a/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -requests