Skip to main content
Welcome to this comprehensive guide on AWS Amplify. In this article, you will learn how to quickly develop and deploy web and mobile applications using AWS Amplify. We will work within an AWS Cloud9 environment using an event planner app that has been pre-deployed and tested. This demo covers initializing an Amplify environment, adding authentication, and reviewing the app within AWS Amplify Studio.

Initializing AWS Amplify

Begin by navigating to your event planner app directory (My Event Planner) and initializing the Amplify environment:
During the initialization process, you’ll be prompted for a project name along with several configuration details. For example:
The default configuration typically uses Visual Studio Code as the default editor, specifies a JavaScript app type, and selects a framework such as Vue. Below is a sample configuration:
After confirming your settings, the CLI will request your AWS profile credentials (access key and secret access key). Once provided, Amplify deploys the backend resources. An excerpt from the deployment log may look like this:
Once the environment has been initialized, verify the status with:
Running the command from the root of your project helps avoid configuration issues.

Adding Authentication

To secure your application, add Cognito-based authentication. In this demo, manual configuration is used to create a Cognito user pool along with an admin group. Execute the following command from the My Event Planner directory:
You will then encounter prompts similar to the following:
Proceed by creating the necessary user pool groups (e.g., an “admins” group) and follow the remaining configuration steps. This process sets up essential registration features, including email-based sign-up, while keeping multi-factor authentication disabled. Push your changes to AWS Amplify with the following command:
This action provisions the necessary AWS Cognito resources such as the user pool and identity pool.

Verifying in AWS Amplify Console and Amplify Studio

After deploying authentication resources, verify your backend configuration in the AWS Amplify Console. This console displays details such as hosting environments, backend configurations, and authentication settings. To pull the latest configuration, run:
Afterward, click on “Launch Studio” in the Amplify Console to access a graphical interface for managing backend resources, user management, and deployment activity. Notice that changes made via the CLI will be reflected in Amplify Studio. Below is an image displaying the AWS Amplify Console with project configuration details:
The image shows a code editor with a terminal, displaying AWS Amplify deployment logs and project configuration details.

Managing Users and Groups

Within Amplify Studio, select “Launch Studio” and allow any necessary pop-ups. Then, navigate to the “User Management” section under the Management tab. Initially, no users are displayed. You can either register users manually or allow user self-signup. For demonstration, create a user (e.g., Michael at KodeKloud) with a temporary password and assign them to the “admins” group. The image below shows the “Create user” form:
The image shows a user management interface with a "Create user" form, including fields for email and password, and a password generator tool.
After the user is created, you will see confirmation and status details as shown here:
The image shows a user management interface in AWS Amplify Studio, displaying a confirmation message for adding a user with email details and status.

Additional Amplify Features

Beyond authentication, AWS Amplify offers a suite of features including analytics, REST APIs, Lambda functions, and GraphQL (AppSync) for API development. Although this demo focuses on authentication, you can extend functionality to include file storage, data modeling, and more backend resources. For instance, to add a function, use:
And if necessary, install the Amplify CLI with:
You can also synchronize your local environment with the cloud using:

Reviewing the Backend in Amplify Studio

Revisit the AWS Amplify Console to monitor and manage your backend. In the backend environment tab, view the “dev” environment with details on authentication and hosting configurations. The image below shows access control and backend environment details:
The image shows the AWS Amplify console, displaying app settings for "myeventplanner," including access control and backend environment details.
Additionally, explore Amplify Studio for data modeling, UI development, and further backend configurations:
The image shows the AWS Amplify Studio interface for "myeventplanner's" development environment, displaying deployment activity logs and options for data modeling and UI development.
Review the authentication configuration in detail:
The image shows the authentication configuration page in AWS Amplify Studio, detailing login and sign-up settings with options for email and multi-factor authentication.

Conclusion

This guide demonstrated how to initialize an AWS Amplify environment, add Cognito-based authentication, and manage backend resources using both the AWS CLI and Amplify Studio. AWS Amplify simplifies the deployment of web and mobile applications, enabling you to focus on enhancing features and scaling your application efficiently. Thank you for following along with this AWS Amplify demo. Happy coding!

Watch Video