Skip to content

Sergix/cloud-resume-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Resume Challenge

AWS Edition

Tutorial

Project Structure

aws-sam/

AWS SAM template and function configuration.

  • visitor_count/: lambda function
  • events/: JSON tests for visitor count function
  • tests/: integration and unit tests for API Gateway and function

www/

S3 bucket static site. Deployed to cloudresume.sergix.dev

.github/workflows/

GitHub Actions workflows.

  • sam-pipeline
    • pytest for Lambda function and API Gateway in CloudFormation stack
    • sam build / sam deploy
  • www
    • Upload to S3
    • Invalidate CloudFront CDN

Deployment

Environment

  • AWS_ACCESS_KEY from IAM user Access Key ID
  • AWS_SECRET_ACCESS_KEY from IAM user Secret Access Key
  • AWS_CLOUDFRONT_ID from AWS CloudFront distribution ID

Build/Deploy: AWS SAM

  • aws-sam/ $ sam build
  • aws-sam/ $ sam deploy

Deploy: AWS S3

  • www/ $ aws s3 sync ./ s3://BUCKET --delete
  • www/ $ aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_ID --paths '/*'

Test: AWS Lambda and API Gateway

  • aws-sam/ $ pytest

About

Cloud resume challenge repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published