Problem 2: Invalid from botocore.vendored import requests import
Python 3.9 does not include requests as it did before with vendor imports. I replaced the PUT request with urllib3.
[ERROR] AttributeError: module 'botocore.vendored.requests' has no attribute 'put'
Traceback (most recent call last):
File "/var/task/index.py", line 40, in handler
put_response = requests.put(event['ResponseURL'], headers=headers, data=response_body)
Problem 3: Invalid image checksum
The https://dl.k8s.io source is valid, but the AWS pipeline is not accepting it for some reason.
Problem 4: Packages not available during test execution
The unit tests were failing due to missing packages like jwt. They were included before, but not anymore. I added a pip install—r requirements.txt instruction within the pre-build phase.
Problem 5: Outdated Dockerfile base image
The Python version in the Dockerfile base image was 3.7. I updated it to 3.9.
Problem 1: Outdated Python 3.7 runtime
The Python runtime set to 3.7 is no longer accepted. I updated it within the
ci-cd-codepipeline.cfn.yml
template.Source: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Problem 2: Invalid
from botocore.vendored import requests
importPython 3.9 does not include requests as it did before with vendor imports. I replaced the PUT request with
urllib3
.Problem 3: Invalid image checksum
The
https://dl.k8s.io
source is valid, but the AWS pipeline is not accepting it for some reason.Problem 4: Packages not available during test execution
The unit tests were failing due to missing packages like jwt. They were included before, but not anymore. I added a
pip install—r requirements.txt
instruction within the pre-build phase.Problem 5: Outdated Dockerfile base image
The Python version in the Dockerfile base image was 3.7. I updated it to 3.9.