Setting up the AWS serverless reference app and backend API

Recently, I tried amazon’s aws-serverless-auth-reference-app app to check best practices to connect with DynamoDB from a mobile or web-app. While the concept (and the app) is cool, and there is a video (https://www.youtube.com/watch?v=n4hsWVXCuVI) to explain it all, I still felt a need to have a quick-start quide to help spin it fast.

Overview:

The App consists of two parts:

  1. API part will get deployed to AWS. It comes with a CloudFormation template to make is easier for you.
  2. APP is your Ionic2 app.

Deploying API to AWS

  • Install node.js and python (You will need ‘pip’ to install aws-cli)
  • Create a user in AWS IAM and give appropriate permissions. If you are not sure what permission to give and only deploying the app for testing purpose, then give ‘AdministratorAccess’ permission. Further, it’s a good practice to create separate groups for permission management.
  • Install AWS-CLI and run ‘aws configure’ to configure API access.
  • Then follow the instruction on this page ( https://github.com/awslabs/aws-serverless-auth-reference-app/blob/master/DevGuide.md ) to setup the API part.

Once the API part is done, we can quickly spin our Ionic2 app to test the setup.

Run the App

  • Go to the app directory ‘cd aws-serverless-auth-reference-app/app’.
  • Install required packages ‘npm install’
  • run the app ‘ionic serve’

Hurray! All set.

Have questions or suggestions? Please let me know in the comments below.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s