Giter VIP home page Giter VIP logo

lesson7's Introduction

Deploy to AWS S3

Setup your AWS Account

Create an account, https://portal.aws.amazon.com/billing/signup.

Log in to the AWS console, https://signin.aws.amazon.com/signin

Click Services at the top left and search for IAM.

On the IAM console, we need to create a user with AdministratorAccess

Copy Access Key ID and Secret key

Create a S3 Bucket

choose s3 bucket service

In proproties tab, choose host static website

type index.html in index and error document input

After save properties, you will see the Bucket website endpoint at the bottom of page

http://your-bucket-name.s3-website-us-east-1.amazonaws.com

in permissions tab,

tick off Block all public access

and change the policy to the following

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowPublicReadAccess", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::your-bucket-name/*" } ] }

Intall AWS CLI

brew install awscli on macos aws configure AWS Access Key ID [None]: XXXX AWS Secret Access Key [None]: XXXX Default region name [None]: us-west-1 Default output format [None]: ENTER

Create a react app or reuse

npx create-react-app my-app

add the script to package.json

"deploy": "npm run build & aws s3 sync build/ s3://your-bucket-name"

npm run deploy

lesson7's People

Contributors

jackietian 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.