Giter Site home page Giter Site logo

aws-fullstack's Introduction

AWS Fullstack App using Terraform

Tech Stack

AWS, Bash, Terraform, JavaScript, TypeScript, React, Vite, and Tailwind.

Configuration:

You need an AWS account and an IAM role with an Access Key that has AdministratorAccess.

Download the AWS CLI or install using Homebrew brew install awscli

Download Node.js or install using Homebrew brew install node

Download Terraform or install using Homebrew:

brew tap hashicorp/tap
brew install hashicorp/tap/terraform
brew update
brew upgrade hashicorp/tap/terraform

This repo requires a domain name in Route 53. It scaffolds out all the infrastructure necessary for your web app and API including DNS records, multiple ACM Certs the for apex domain and sub domains, S3 buckets, CloudFront distributions, API Gateway, and a Lambda function.

The apex domain (domain-name.com for example) is redirected to the www version (www.your-domain.com) of the site. The API will be at api.your-domain.com.

Who this repo is inteded for:

Simple fullstack apps in a single enviornment where you typically only need a few API endpoints and Lamdba functions.

What you'll deploy

Frontend SPA (Single Page Application) using React, Vite, and Tailwind.

SPA App

API uses JavaScript and TypeScript with logging and associated permissions.

API

Permissions to run the scripts

Give the scripts execute permissions:

chmod +x ./infra/setup.sh ./infra/api.sh ./infra/deploy.sh ./infra/web.sh

Change into your infra folder to continue:
cd infra

Run the setup using the below: ./setup.sh your-domain-name.com

Provided everything works, run: ./deploy.sh

Terraform

The scripts should import your Hosted Zone into terraform state seemlessly. If there are any issues you can reference the Hosted Zone Id of your domain in infra/config/aws-hosted-zone-id.txt.

If you need to manually import your domain run terraform import aws_route53_zone.hosted_zone YOUR_HOSTED_ZONE_ID.

If you need to destroy Terraform state run terraform state rm aws_route53_zone.hosted_zone prior to terraform destroy and comment out the hosted_zone in infra/main.tf

aws-fullstack's People

Contributors

aaronwhitedev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.