DEV Community

Cover image for From Idea To Development: My Journey Completing the Cloud Resume Challenge AWS
Yashwanth Kothakota
Yashwanth Kothakota

Posted on

From Idea To Development: My Journey Completing the Cloud Resume Challenge AWS

I recently earned my AWS Solutions Architect. Following that I want to showcase my knowledge through a project. Through X I discovered the Cloud resume challenge. I thought it is a great way to present my skills and gain real-world experience. This blog is about how I completed this challenge, the decisions I made and why I made them.

The Cloud Resume Challenge is a hands-on project that provides a taste of real-world tasks you might encounter in a cloud role. It involves a series of tasks ranging from creating a basic portfolio template to configuring CI/CD pipelines with automatic deployments. The full requirements can be found here

Let me simplify the tasks involved:

  1. Create a Portfolio website using html, css or any framework of your choice.
  2. Upload the static website to AWS S3.
  3. Provide HTTPS for S3 url using Amazon CloudFront.
  4. Set up a custom domain name pointing to CloudFront distribution via Amazon Route53.
  5. Store website visitors count in Amazon DynamoDB.
  6. Write an AWS Lambda function to fetch, increment, and return the visitor count from DynamoDB.
  7. Integrate the API call through Amazon API Gateway for loose coupling between the frontend and backend.
  8. Write tests for the backend.
  9. Provision infrastructure using IaC tool like Terraform.
  10. Use GitHub for source control.
  11. Implement separate CI/CD pipelines for the frontend and backend using GitHub Actions.

Frontend:

I used Nextjs React framework along with TailwindCSS for the frontend. As the portfolio website consists of only one page, I split it into different components and combined them in page.tsx. Running npm run build generates an out folder, which I uploaded to an Amazon S3 bucket.
Initially, I encountered an issue with Next.js’s Image tag. After building, Next.js modifies the source URL as part of its optimization process, causing errors when the out folder is uploaded to S3. Adding the unoptimized attribute to the Image tag resolved the issue.

Backend:

I used Python and Boto3 to write a Lambda function which retrieves and updates the visitors_count in DynamoDB. Boto3 is an AWS SDK for managing AWS resources through code.
For testing, I used Pytest and Moto, which mocks AWS services for testing purposes. Although I had no prior experience with Boto3 or Moto, I relied heavily on documentation to understand and implement them.

Infrastructure:

I used Terraform to provision the infrastructure on AWS. I created a new S3 bucket and DynamoDB table to store the Terraform state remotely and enable locking.
This resource is immensely helpful. As a beginner with Terraform, this part took considerable time. I read the docs and practiced creating resources with examples before implementing the final setup.

CICD:

For me most challenging part was this one. Initially, I created two pipelines: frontend-ci and backend-ci.

  • frontend-ci: Installed dependencies, ran tests, built the project, deployed to S3, and invalidated the CloudFront cache.
  • backend-ci: Installed dependencies, ran tests, created a deployment package, and deployed it to Lambda.

However, this approach had limitations:

  1. Future infrastructure changes would require manual updates.
  2. Frontend and backend pipelines needed resource names and IDs from terraform apply.

To address this, I created three pipelines:

  • infrastructure-ci: Triggered by changes to *.tf files. It creates infrastructure, uploads Terraform outputs to an S3 bucket, and triggers the other pipelines.
  • frontend-ci: Triggered by changes in frontend/* or events from infrastructure-ci. It retrieves Terraform outputs from the S3 bucket.
  • backend-ci: Triggered by changes in backend/* or events from infrastructure-ci. It also retrieves Terraform outputs from the S3 bucket.

This approach decouples infrastructure, frontend, and backend, allowing minimal changes if switching cloud providers in the future.

Final architecture:
HLD

Key Takeaways:

Every project comes with challenges and hurdles, and this was no different. From debugging CI/CD errors to writing Terraform configurations with correct integrations, this project was a great learning experience.

By the end of the challenge, I gained:

  • A clearer understanding of cloud concepts.
  • Hands-on experience in cloud development.
  • Problem-solving skills and knowledge of where to find resources.

If you want practical experience in the cloud, I highly recommend taking on the
challenge you will definitely love the journey.

Finally, don’t give up! If you'd like to check out my implementation, here’s the repo.

If you have suggestions, best practices, or questions, feel free to comment. I would love to connect with you on X and LinkedIn.

Thanks for reading! 😊

Top comments (0)