This website's design relies on a Serverless Infrastructure with two main
sections:
Frontend: Amplify + GitHub was chosen for its simplicity. You associate
your app in Amplify with your GitHub repository, and that's it. In our
case, we also integrated Certificate Manager and Route 53.
Alternatively, we considered using an Nginx image to deploy the website in
EKS via ECR, using GitHub Actions for CI/CD. However, as this approach
wasn't needed, we opted for Amplify.
Backend: Lambda, a powerful AWS tool, was chosen for its versatility. The
backend is composed of pure lambda microservices.
In this case, five lambdas are used:
- **getURLS**: Generates image URLs using CloudFront distribution and the
Object Key. Signs the URL with an expiration period.
- **getThumbnail**: Triggered when an image is uploaded, it creates a record
in DynamoDB storing Object Keys and resizes the image.
- **deleteThumbnail**: Deletes the DynamoDB record and the Thumbnail when
the original image is deleted.
- **deleteWallpaper**: Exposed to the API, it deletes the original image in
the S3 Bucket.
- **uploadWallpaper**: Also exposed to the API, it uploads the image to the
S3 Bucket using a signed URL.
Serverless Deploy: Implemented GitHub Actions with IAM Role (OIDC Provider) for CI/CD, specific
to the Backend repository.
Environment Variables: Securely managed using SSM Parameter Store for easy and safe modification.
Image Bucket: The Bucket is PRIVATE, not accessible publicly (CORS enabled). CloudFront with
KeyGroups enhances security.