How I learnt practical skills in AWS with the Cloud Resume Challenge

Lessons learnt when doing a challenge I thought I didn't need (but I needed it very much)

·

6 min read

I started my journey in cloud in November 2020, at the time I had experience with Python, git, Docker, Lambda and S3 from AWS, nothing about Azure and nothing about GCP.

The first thing I did was take the ⭐️ AWS Cloud Practitioner Certification, which covers the basics of the main AWS resources: EC2 and Lambda for compute, S3 for storage, RDS and DynamoDB for databases, and a bit of networking and security. After that, I passed the ⭐️⭐️ AWS Developer Associate Certification, which went deeper into the resources and laid the foundation of my cloud knowledge.

I wrote all my notes in Github ➡️ github.com/anebz/cloud

I learnt everything theoretically and didn't play around AWS resources so my knowledge was 100% theory and 0% practice, which now I regret

After that I got involved in an Azure project at work, which allowed me to get practical skills. I later complemented that with a couple of certifications and that made a really balanced skillset.

However, I was still lacking practical skills in AWS. For a personal project, I used S3 and Lambda and used Serverless framework as IaC. But I wanted to dive deeper into various AWS resources and while I was looking for projects, I stumbled upon 🚀 The Cloud Resume Challenge, which was advertised as a guide to get basic notions in cloud. At first, I was unsure why I would need this since I already knew the basics of cloud. But I read deeper and saw that this challenge requires you to use several AWS resources where I had no experience, so it might be a good idea for me.

📝 Taking the Cloud Resume Challenge

I had already passed the cloud foundations certification, regarding the HTML and CSS I browsed to codepen.io and searched for a CV template. I found one I liked and adapted it to my education and skills. I already had HTML, CSS and a small file of JS.

Static website on S3

This part was easy for me since I had experience in S3, I had no problem in uploading the files to an S3 bucket, enabling static website hosting and writing the appropriate permissions. After this step I had my website with a long S3 URL. Next step was to get my own domain name.

HTTPS

I started creating a CloudFront distribution for the website but my account didn't have permission to create CloudFront distributions so I had to request this to AWS, which took some days. In the meantime I made progress with the Backend.

DynamoDB

I had theoretical knowledge about DynamoDB but very little practical experience. However, this part was quite easy for me. I created a Table with a Partition key (date) and an attribute count. Each day, the webpage has a certain amount of visitors.

I started doing Infrastructure as Code (IaC) as soon as possible and I created this Table using AWS CloudFormation.

The code to retrieve items from a Table and to update the count, I searched it online and found the code for Python.

Lambda

The Lambda function was no issue for me since I already had experience. I created a function with Python code to update the count in the table, and at the same time get the count number. I added the IAM role for the function to access the DynamoDB table, and tested that it was working.

I also used CloudFormation to create the Lambda function, zip and upload the code, and add the read and write permissions to access DynamoDB.

API Gateway

I had never used this service but I had learnt about it and I was familiar with the concept of an API, I understood its goal and function and therefore this step was quick as well.

It was very easy to create an HTTP API using the console but I struggled a lot to replicate it in CloudFormation. I didn't found clear documentation and I tried several things, I managed to create an HTTP API but I didn't succeed at linking it to the Lambda function. I posted about it on Twitter and someone mentioned that I could use AWS SAM. I spent some time researching what it was, the differences with CloudFormation, and in the end migrated everything to SAM. SAM is based on CloudFormation so it wasn't a very big change, and SAM actually makes it very very easy to create APIs and attach them to Lambda functions.

After this, backend was done. I could call the API link, this triggered the Lambda function, which increased the count by 1 and returned the value.

Back to HTTPS

This was the hardest part of the project for me. I didn't know much about networking and setting up HTTPS in a website, so I had some learning curve. I created a domain name for my CV website, then created a certificate for the domain, validated it through DNS and then created the CloudFront distribution. After everything had been deployed, my website finally had HTTPS 🥳

The front-end part I did everything manually. Even though it was possible to automate the creation of the S3 bucket and the upload of the static files, creating the domain, certificate and CloudFront distribution with SAM looked too complicated.

Tests

I had previous experience with unit tests so I wrote some tests for the Lambda function.

Infrastructure as Code

At this point the backend infrastructure creation was fully automated with SAM and the frontend was done fully manually.

Source control

I used git from the beginning and stored my code and all my files in Github --> github.com/anebz/cv-website

CI/CD

I had never used Github Actions but I had used a similar CI/CD tool, so this step was quite fast and fun.

I created my template and first ran the unit tests for the Lambda function. In the second step, I used the predefined SAM action to build and deploy the infrastructure to AWS.

In the last step, I upload the static files to S3.

This way, every time I push to the main branch, this pipeline is ran automatically 🚀

Conclusion

This project was really amazing, it gave me a purpose for trying AWS resources I hadn't tried before, gave me experience in the parts where I was lacking skills (frontend I'm looking at you 👀😂), made me learn a couple of very useful skills and made me feel comfortable with making projects in AWS.

Now I feel like I have both theory and practical knowledge in AWS! I might do the same challenge in Azure and GCP to get exposure as well.

I feel much more confident to take on more challenging projects and get even more practical skills in AWS.

Thank you for reading! If you want to know my cloud adventures, I'm happy to connect on Twitter --> twitter.com/anebzt

Did you find this article valuable?

Support Ane by becoming a sponsor. Any amount is appreciated!