This repository contains the code for the Cloud Resume Challenge project using AWS.
- Clone the repository.
git clone https://github.com/nuanv/cloud-resume-project.git
cd cloud-resume-project- Copy the example terraform var file
example_terraform.tfvarstoterraform.tfvars.
cp example_terraform.tfvars terraform.tfvarsNote
Install terraform and aws-cli before proceeding further.
Run aws configure and provide required credentials for the user account.
Change the variables in terraform.tfvars according to your preference.
- Initialize a working directory containing config files and install plugins for required providers.
terraform initWarning
While the terraform deployment allows you to choose region of your choice, make sure you change the region in modules/function/function.ts to the region of your choice.
- Now we will run our
function modulewhich will setup the API gateway, Lambda function and DynamoDB.
terraform apply -target=module.function- Once the infrastructure is deployed you will receive api invoke URL in your terminal. Change the url in
src/app/api/getViews.tsto the url you received.
const API_URL = '<API Gateway Invoke URL>';- Install required packages & Build static files for our website.
npm install
npm run export- Now we will run our
website modulewhich will setup the S3 bucket and cloudflare DNS.
terraform apply -target=module.website- To bring down the whole infrastructure run.
terraform destroy
