From a91039299d88707b6cd9f4038fce16db02d01850 Mon Sep 17 00:00:00 2001 From: Ludvig Janiuk Date: Wed, 17 Feb 2021 10:43:33 +0100 Subject: [PATCH] Updated the way requests is imported Botocore has deprecated the vendored version: https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/ If this is not merged, deployments in recent python runtimes will cause failures. --- .../functions/source/CfnStackAssumeRole/lambda_function.py | 2 +- .../functions/source/CfnStackAssumeRole/requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt 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 42638d9..cfc81c3 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 -from botocore.vendored import requests +import requests import json from botocore.credentials import ( AssumeRoleCredentialFetcher, diff --git a/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt b/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt new file mode 100644 index 0000000..f229360 --- /dev/null +++ b/samples/cloudformation-cross-account/functions/source/CfnStackAssumeRole/requirements.txt @@ -0,0 +1 @@ +requests