To start with chapters 5 or 7

For those who want to start with Stage 2 or Stage 3, this section guides you through the steps to shortcut your previous work.

  • Stage 2 - Early Stage (Chapter 5 ~ Chapter 6)
  • Stage 3 - Middle Stage (Chapter 7 - Chapter 8)

1. Download

  • To start with Stage 2, use amplify-sns-workshop-from-stage2.tar.gz
  • To start with Stage 3, use amplify-sns-workshop-from-stage3.tar.gz

Download right compressed files. Right click on the link below to save it and place it in the appropriate directory.

2. Thaw

Open a terminal and move to the directory where the tar.gz file you just saved is located, then execute the following command:

tar xvzf amplify-sns-workshop-from-stage2.tar.gz # change '2' to '3' according to your stage

3. Amplify Settings

Configure AWS Amplify for the unpacked React application to connect to the AWS Cloud.

cd amplify-sns-workshop-from-stage2/boyaki # change '2' to '3' according to your stage
npm install
amplify init

A few questions are asked to you along the way. Note the following choices, and others are default choices.

  • environment name: production
  • Choose your default editor: Vim (via Terminal, Mac OS only) (Choose your favorite editor)
  • Please choose the profile you want to use amplify-handson (Please choose the Profile created for Amplify in 1.3)

Below is an example of the answer to all questions.

  • Enter a name for the environment production
  • Choose your default editor: Vim (via Terminal, Mac OS only)
  • Do you want to use an AWS profile? Yes
  • Please choose the profile you want to use amplify-handson

4. Creating Cloud Resources

Finally, let’s create cloud resources, such as AWS AppSync, Amazon DynamoDB, and Amazon Cognito, as defined in Amplify.

Execute the $ amplify publish command to apply changes to cloud resources and build and deploy the application, and answer Yes to confirm.

amplify publish
✔ Successfully pulled backend environment production from the cloud.

Current Environment: production

...

? Are you sure you want to continue? Yes

...

✔ Zipping artifacts completed.
✔ Deployment complete!
https://production.XXXXXXX.amplifyapp.com

You can access the web app by visiting the last URL.