You are on page 1of 7

https://aws.amazon.

com/getting-started/hands-on/deploy-react-app-cicd-amplify/

Open the git bash command shell

git config --global user.name prabhakarg-dm

$ git config --global user.email prabhakarg@decisionminds.com

Change Directory

$ cd app

Create the react app


$ npx create-react-app cloudamplifyapp

Create a git repository in the web browser

Change to the new directory

$ cd cloudamplifyapp

Initialize the directory to become git repository

$ git init

Add all the files

$ git add .
Commit the push event

$ git commit –m “frustration”

Add the remote origin to the directory

$ git remote add origin https://github.com/prabhakarg-dm/cloudamplifyapp.git

Test the remote repo connection

$ git remote –v

Push all files to remote repository

$ git push -f origin master

In the AWS Console go to AWS Amplify

5. Log in to the AWS Amplify Console

Open the AWS Management Console in a new browser window, so you can keep this step-
by-step guide open. When the screen loads, enter your user name and password to get started.
Then type Amplify in the search bar and select AWS Amplify to open the service console.

6. Deploy your app to AWS Amplify


In this step, you will connect the GitHub repository you just created to the AWS Amplify
service. This will enable you to build, deploy, and host your app on AWS.

a. Select Get Started under Deploy.

b. Select GitHub as the repository service and select Next.

c. Authenticate with GitHub and return to the Amplify Console. Choose the repository you
created earlier and the master branch, then select Next.
d. Accept the default build settings and select Next.

e. Review the final details and select Save and Deploy.

f. AWS Amplify Console will now build your source code and deploy your app at
https://<branchname>.<appid>.amplifyapp.com
g. Once the build completes, select the thumbnail to see your web app up and running live.

7. Automatically deploy code changes

In this step, you will make some changes to the code and push the changes to the master
branch of your app.

a. Edit the src/App.js file.


$ git status

$ git add .

$ git commit -m “modified commit”

$ git remote -v

$ git push –f origin master

Wait for some time for the app to be built.

b. Once the build is complete, select the thumbnail on the AWS Amplify console to view
your updated app.
8. Clean up your resources

You can easily terminate the resources you created on AWS Amplify Console. In fact, it is a
best practice to terminate resources you are no longer using so you avoid getting charged.

Select Action and then Delete app. In the modal that opens, type delete to confirm that you
want to delete your app. Your app is now deleted.

Congratulations

You might also like