Cloud Resume Challenge Presentation - Jessica Herrera Flores
1. Cover Page
Project Title: Cloud Resume Challenge
Name: Jessica Herrera Flores
Date: April 2025

2. Project Summary
Challenge integrating web development, cloud computing, and DevOps knowledge.
Requires deploying a résumé as a static website on AWS.
Includes serverless backend, automated testing, and infrastructure as code (IaC).

3. Technologies Used
AWS S3, CloudFront, Lambda, API Gateway (HTTP), DynamoDB

AWS SAM CLI for infrastructure as code

GitHub Actions for CI/CD

Python 3.11, HTML/CSS/JS

pytest and moto for testing

4. General Architecture
S3 hosts the static frontend.

CloudFront globally distributes the content.

API Gateway (HTTP) connects to the backend.

Lambda handles the visitor counter logic.

DynamoDB stores visitor data.

5. Frontend
HTML/CSS/JS site deployed on S3.

Static hosting with a custom error page.

Automatic upload to S3 via aws s3 sync from GitHub Actions.

CloudFront invalidates the cache after each deploy.

6. Frontend Issues
❌ Error: CORS issue when calling API Gateway from JS.
Solution: Configure CORS in template.yaml.

❌ Error: aws s3 sync uploaded the entire folder instead of only the contents.
Solution: Correct the path to upload only the content.

7. Backend
Python Lambda functions with access to DynamoDB.

template.yaml defines all resources.

Endpoint created with HTTP API Gateway.

Deployed using sam deploy via CI.

8. Backend Issues
❌ Error: API configured as REST instead of HTTP → Events definition did not work.
Solution: Changed from AWS::Serverless::Api to AWS::Serverless::HttpApi in the template.

❌ Error: Local timeout due to lack of DynamoDB mocking.
Message: Function 'SamVisitorCounterFunction' timed out after 3 seconds.
Solution: Integrated moto into tests.

9. Automated Testing
Unit tests with pytest.

DynamoDB simulation using moto.

Automated test runs in GitHub Actions before deployment.

❌ Error: ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'dev-requirements.txt'
Solution: Removed that line from the workflow and used pip install moto pytest directly.

10. Infrastructure as Code
Using SAM CLI.

Defined resources: Lambda, API Gateway, DynamoDB.

Deployment from template.yaml and samconfig.toml.

Stack created: visitor-counter-stack-sam.

11. CI/CD
Frontend: changes to .html/.css/.js trigger deployment to S3.

Backend: changes trigger tests + build + SAM deployment.

GitHub Actions manages both pipelines.