My Experience Testing the Next Generation of AWS Amplify

Alejandro Castañeda Ocampo
Globant
Published in
5 min readJun 28, 2024
Image source: Unsplash

What better way to get an online presence in the digital age? Consider creating your own biography page. I want to show you how AWS Amplify Gen 2 helped me develop web and mobile applications. In this regard, I want to mention my recent participation in the AWS Amplify Gen 2 challenge. In this post, I will share some of the impressive things that make AWS AMPLIFY GEN 2 unique, all of which can be found and available on my bio page.

What is AWS Amplify Gen 2

AWS Amplify is a powerful development platform provided by Amazon Web Services (AWS), which simplifies the process for developers to build, deploy, and maintain web and mobile apps. Amplify’s second generation (Gen 2) comprises many enhancements that further brand-new features that streamline the development process more. The next Key Features and Improvements in AWS Amplify Gen 2 are described:

  • Pull Request Previews: Among the most potent features of Amplify Gen2 is its capability to allow for provisioning transient environments that test changes before they are merged. This can be very handy in the intervening period between development and merging so that you can see what impact your change will have on the project without interfering with production. Therefore, a pull request sandbox feature might save many potential troubles.
  • Sandbox Environments: To this end, a sandbox environment acts as an enclosed space where developers can debug functionality before they roll it out to production. No experimental features or code alterations should interfere with the live application. It provides peace of mind and facilitates smoother development workflows.
  • Enhanced CI/CD: Amplify Gen 2 offers more efficient continuous integration and continuous deployment with more customization options. This ensures that your application is always up-to-date and running smoothly. You can automate the entire deployment pipeline, reducing manual intervention and accelerating the deployment process.

New Backend Capabilities

  • Support for More Types of Databases: With Amplify Gen 2, offers support for a broader range of relational and non-relational databases. This allows you the flexibility to choose the best option for your project. Whether you need the robustness of SQL databases or the flexibility of NoSQL databases, Amplify Gen 2 has you covered.
  • Improved API Management: Support for GraphQL and REST has been enhanced, offering advanced authentication and authorization features. This makes it easier to create robust and secure APIs. You can now implement complex data access patterns and ensure the APIs are well-protected against unauthorized access.
  • Expanded Lambda Support: Integration with AWS Lambda is simpler than ever, making it easy to implement serverless backend logic in your application. You can trigger Lambdas from various events and seamlessly integrate them with other AWS services.

Enhanced Storage and Authentication

With deeper integration with Amazon S3 and AWS Cognito, you can handle storage and authentication more efficiently and securely. Amazon S3 provides scalable and durable storage solutions, while AWS Cognito offers powerful user authentication and management capabilities.

Improved Development Experience

The Amplify CLI brings new capabilities and a better user experience, offering a more intuitive way to set up and manage your project. You can easily initialize projects, configure backend services, and manage deployments directly from the command line.

My Experience Creating a Biography Page

I created a biography page, which you can view here. The process was remarkably straightforward and effective thanks to all the improvements and new features of Amplify Gen 2, you can find the code as an open-source project on its repository. This is a sample of the results:

Screenshot of the bio web platform.

The idea is that each user will be able to create their presentation page, using a friendly user interface, furthermore, the users will expose their page similar to it alejandro.bio.awslearn.cloud.

Prerequisites

To be able to complete the following exercise, you need to have the following prerequisites ready:

  • An AWS Account.
  • GitHub or similar code repository tool.
  • Basic knowledge related to AWS Serverless.

Setting Up Amplify Configuration

For this application, I used the following modules:

Structure Folder of AWS Amplify Configuration.
  • Auth: The Auth module gives the capability to integrate the authentication layer using AWS Cognito behind the scenes, all the users will be able to create the account and execute the login action.
Auth file configuration.
  • Storage: The Storage module allows the users to upload their profile picture. We need its module to save the static and picture files in an S3 bucket.
Storage file configuration, with custom permissions.
  • Data: The Data module is used to keep the information about the user together with their bio information. We need to define a model of the user. Behind the scenes, AWS will create an API using App Sync with GraphQL and use it as a database for Dynamo DB.
User model to persist the information.
  • Functions: With the Functions module, we can deploy a custom lambda function with an API Gateway. Its function will help us obtain a Credly user’s certifications using the public endpoint of Credly.
Lambda function configuration.

The following code, in Node.js, obtains the certifications of the specific user using the username of the Credly platform:

handler.ts

Conclusions

AWS Amplify Gen 2 is a powerful tool that allows developers to create web and mobile applications more efficiently and effectively. The improvements in the development lifecycle, new backend capabilities, and enhanced integration with other AWS services make Amplify Gen 2 an excellent choice for any development project.

Consider giving AWS Amplify Gen 2 a try if you aim to optimize your development workflow and build powerful and scalable applications. Its comprehensive set of tools and features can significantly enhance your development experience, making bringing your ideas to life easier.

I hope this guide has been helpful, and I encourage you to explore all the wonders AWS Amplify Gen 2 brings!

--

--