udacity / cd0157-Server-Deployment-and-Containerization

Server Deployment and Configuration project. This was formerly the nd0044 course 4 project.
74 stars 2.88k forks source link

Boilerplate adjustments to avoid Pods creation issue #82

Closed jungleBadger closed 5 months ago

jungleBadger commented 5 months ago

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 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.

image

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.

image

Problem 5: Outdated Dockerfile base image

The Python version in the Dockerfile base image was 3.7. I updated it to 3.9.

SudKul commented 5 months ago

Thanks @jungleBadger