This repo represents my implementation of the Cloud Resume Challenge!
I mostly followed the AWS path, with a few minor tweaks:
- CloudFlare for DNS instead of Route53
- Pulumi for IaC instead of AWS Serverless Application Model
- Minimal html, js, and css files
- Deployed to S3 bucket fronted by Cloudfront CDN
- DynamoDB table uses an
environment
key with aview_count
value - Python AWS Lambda function defines a single API route handler which increments the view count for the relevant environment and returns that incremented value.
- Deployed via AWS Lambda + API Gateway
- Infrastructure as code configuration for all resources:
s3.py
- Bucket to store client filess3_objects.py
- Client filesdynamodb.py
- Database to persistview_count
lambda_fn.py
- Serverless api handlerapi_gateway.py
- HTTP API routing to Lambdadns.py
- Cloudflare DNS records to set up custom domaincloudfront.py
- CDN definition
- Pulumi doesn't wait for the SSL certificate to be issued, but it must be active before using it in the API gateway and Cloudfront distribution
- The Pulumi AWS provider does not support adding cache invalidations for cloudfront distributions so I ended up using the
pulumi-command
package to call out to the AWS CLI
- Execute python tests in github action workflow
- Add separate dev/staging/production Pulumi stacks