DEV Community

Sylvia Waweru
Sylvia Waweru

Posted on

Cloud Resume API Challenge

Cloud Resume Architecture diagram
As a beginner in the cloud computing field, I cannot emphasize much how the Cloud Resume Challenge by Rishab Kumar and RexTech gave me a chance to expand my knowledge.

Challenge Objective

The task is to create a Serverless function that fetches resume data stored in a NoSQL Database and returns it in JSON format. To level up the challenge, integrate GitHub Actions to automatically deploy updates to your Cloud Serverless function whenever you push to your repository.

Project Features

  1. NoSQL Database: A DynamoDB to store the resume.
  2. Serverless Function: A Lambda function to Fetch and return resume data.
  3. GitHub Actions: Automatically package and deploy your serverless on every push to the repository.

Setup and Deployment

1. Infrastructure as Code using Terraform

Define the DynamoDB table, API Gateway, and the Lambda function in Terraform configuration files. Link your GitHub repository with Terraform Cloud to manage your Terraform state file and trigger deployments automatically. Set up Terraform Cloud to monitor your GitHub repository for changes. Terraform Cloud will automatically trigger runs and apply updates as changes are detected. Configure your Terraform Cloud workspace with your AWS credentials and environment variables.

Steps
  • Install Terraform Use this link to install Terraform
  • Create a directory for your Terraform project
  • Create Terraform configuration files
  • Define the DynamoDB table, API Gateway, and Lambda function in the main.tf file
  • Write the Lambda function

Lambda Function

  • Package the Lambda function and all the dependencies in a zip file

Zip file

  • Open a Terraform account and create your Terraform Workspace. Create an Organization

Terraform Workspace Account

  • Update your Terraform configuration with the name of your Terraform organization

Terraform Organization Configuration

  • initialize Your Terraform Workspace

Initializing Terraform Workspace

Expected output

Terraform Workspace

2. Upload DynamoDB Items
The DynamoDB is created manually and then the data is uploaded using GitHub actions. This is done by adding 'DynamoDB Upload Step' to your GitHub Actions workflows to Ensure your workflow uploads JSON data to DynamoDB. This way the database is automatically updated in case of any changes in the resume.

My workflow

3. API Deployment
The API is defined in your terraform configuration as shown below:

API Configuration

Key Takeaways

The key takeaways of this project are Serverless Architecture, Infrastructure as Code, AWS Security Best Practices, and Design of Architectural Diagrams, and Documentation. I was able to have hands-on experience in AWS services, Terraform as an IaC tool, GitHub Actions, Git, GitHub Actions, and Lucid Charts. This is an enriching experience in my quest to become a Solutions Architect as I look forward to the AWS Solutions Architect Associate exam.
Check out my GitHub repository for the complete code and API endpoint.

Thanks for reading! Please feel free to share your feedback (with any corrections)/questions, and let me know how I can help you.
Follow me on Linkedin|GitHub

Top comments (0)