Deploying Existing AWS Amplify Projects using the Amplify CLI

nader dabit
Instructornader dabit
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

In this video, we'll learn how to deploy an existing React Native application with user authentication powered by AWS Amplify and a navigation flow built around the authentication state using React Navigation.

Instructor: [00:01] To get started, we'll need to begin with an existing Amplify project. For this example, we'll head over to the AWS samples repository and clone the AWS Amplify Auth Starters repo.

[00:30] Next, we'll change into the cloned repo and check out the React to Native branch. In this project, we'll notice that we have an existing Amplify project that contains a back-end folder. To deploy this project, we can now run Amplify in it. Here, we'll choose the environment name, the default text editor, and the AWS profile we'd like to use.

[01:06] Once the Amplify project has been initialized, we can run Amplify status to see the current status of the project. To deploy the resources into our account, we can now run Amplify push. If the deployment is successful, we'll see a message that says that all resources are updated in the cloud.

[01:26] We can now test the application now by running it locally. To do so, we'll first need to install the dependencies by running MPM install. Next, we can run the React Native application by running either React Native Run iOS or React Native Run Android.

[01:54] When the app launches, we should now see a sign-in screen. Let's click Sign Up to create a new account. After signing up, check your email for an MFA code. Enter your MFA code, and click Confirm Sign-up. We should now be able to sign in using the user name and password we used when we signed up.

[02:42] After we've logged into the application, we can now navigate between the routes. After signing in, if we refresh the application, we notice that the user stays signed in because the user information has persisted locally. If we click Sign Out, we're redirected back to the sign-in screen.

egghead
egghead
~ 18 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today