The instructions below cover installation on Unix-based Operating systems like macOS and Linux.
You will need the following:
and the following tooling in your local evironment:
If you have not already, configure the aws cli to interact with AWS services using aws configure
.
Note: If you are running into issues, look over the expo-diag.txt file and make sure your versions are up to date.
To build your application you will complete the following steps:
- Create Your Application Backend with the Amplify Console
- Enable User Authentication with the Amplify Admin UI
- Create Your Application's Data Model with the Amplify Admin UI
- Create A Product with the Amplify Admin UI
- Clone Our Sample Application
- Pull Our Amplify Configuration Into Our Application
- Demo Our Application
- Login to your AWS account's management console
- Navigate to the AWS Amplify service using the search box at the top
- Create your application backend:
- If you do not have any existing Amplify apps click the Get Started Button, and then the Get Started button under the Create an app backend
- If you have other Amplify Apps click the New App button at the top right, and then Create app backend
- Enter a name (i.e.
My Application
) and then select Confirm deployment - Your application will take several minutes to deploy, and then you will redirected to the App Settings page
- Click the Open admin UI button under the staging environment
- Click the Authentication link under the Set up menu
- Leave the defaults as is
- Click the Save and deploy button
- Click the Confirm deployment button
- Click the Data link under the Set up menu
- Click the Add dropdown and select the Add model option
- Set the model title to
Product
- Add the following field names/types:
sku
|String
name
|String
price
|Float
image
|String
- Click the Add dropdown and select the Add model option
- Set the model title to
LineItem
- Add the following field names/types:
qty
|Int
description
|String
price
|Float
total
|Float
- Add the following relationship:
- Related Model:
Product
- Model relationships:
One LineItem to one...
- Relationship name:
product
- Related Model:
- Click the Add dropdown and select the Add model option
- Set the model title to
Order
- Add the following field names/types:
total
|Float
subtotal
|Float
tax
|Float
createdAt
|String
- Add the following relationship:
- Related Model:
LineItem
- Model relationships:
One Order to many...
- Relationship name:
lineItems
- Related Model:
- Click the Save and deploy button
- Click the Deploy button
- Click the Content link under the Manage menu
- From the Select table dropdown select Product
- Click the Create Product button
- Add the following field names/types:
sku
|abc123
name
|My Product
price
|10.99
image
|https://aws-appsync-refarch-offline-assets.s3-us-west-2.amazonaws.com/Cookie%402x.png
- Click Save Product
- Clone this repo to your local machine
git clone https://github.com/mikeapted/aws-bow-college
cd aws-bow-college
- Install the dependencies
npm install
- Install the latest Amplify CLI
curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL
- In the Amplify Admin UI click the Local setup instructions link at the top right
- Copy the command to pull the latest into your source code
- Run that command locally
amplify pull --appId <YOUR_APP_ID> --envName staging
- Follow the authentication flow in your browser
- Accept all the defaults in the Amplify config process
- Start our local development server
expo start