https://github.com/nuanv/crc-aws
The Cloud Resume Challenge
https://github.com/nuanv/crc-aws
aws cloudflare cloudresumechallenge python-lambda terrafrom
Last synced: 4 months ago
JSON representation
The Cloud Resume Challenge
- Host: GitHub
- URL: https://github.com/nuanv/crc-aws
- Owner: nuanv
- License: mit
- Created: 2024-12-29T06:50:19.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T04:37:59.000Z (5 months ago)
- Last Synced: 2025-02-03T05:28:03.626Z (5 months ago)
- Topics: aws, cloudflare, cloudresumechallenge, python-lambda, terrafrom
- Language: HCL
- Homepage:
- Size: 2.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Cloud Resume Challenge
This repository contains the code for the [Cloud Resume Challenge](https://cloudresumechallenge.dev/docs/the-challenge/aws/) project using AWS.

## Running the project
1. Clone the repository.
```bash
git clone https://github.com/nuanv/cloud-resume-project.git
cd cloud-resume-project
```2. Copy the example terraform var file `example_terraform.tfvars` to `terraform.tfvars`.
```bash
cp example_terraform.tfvars terraform.tfvars
```> [!NOTE]
> Install [terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) and [aws-cli](https://aws.amazon.com/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.3. Initialize a working directory containing config files and install plugins for required providers.
```bash
terraform init
```> [!WARNING]
> 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.4. Now we will run our `function module` which will setup the API gateway, Lambda function and DynamoDB.
```bash
terraform apply -target=module.function
```
5. Once the infrastructure is deployed you will receive api invoke URL in your terminal. Change the url in `src/app/api/getViews.ts` to the url you received.```ts
const API_URL = '';
```6. Install required packages & Build static files for our website.
```bash
npm install
npm run export
```7. Now we will run our `website module` which will setup the S3 bucket and cloudflare DNS.
```bash
terraform apply -target=module.website
```8. To bring down the whole infrastructure run.
```bash
terraform destroy
```## Visit your domain to update view count
