Menu
Getting Started with AWS
Deploying a Web Application

Prerequisites

Before you start this tutorial, complete the following tasks.

Sign Up for AWS

When you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up for all services in AWS and you can start using them immediately. You are charged only for the services that you use.

If you created your AWS account less than 12 months ago, you can get started with AWS for free. For more information, see AWS Free Tier.

If you have an AWS account already, skip to the next step. If you don't have an AWS account, use the following procedure to create one.

To create an AWS account

  1. Open https://aws.amazon.com/, and then choose Create an AWS Account.

    Note

    This might be unavailable in your browser if you previously signed into the AWS Management Console. In that case, choose Sign In to the Console, and then choose Create a new AWS account.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phone keypad.

Download the Code for the App

You can download the code for the app from the AWS Labs GitHub repository. Open eb-node-express-signup repo and then choose Download ZIP.

You're going to make a few changes to the code as you complete the tutorial, so you need to unzip eb-node-express-signup-master.zip. The code for the app is stored in the eb-node-express-signup-master directory.

Create an IAM Policy and Role

Next you need to create an IAM role that grants your app permission to publish Amazon SNS notifications and put items into your DynamoDB table. You will apply the role to the EC2 instances that run your application when you create an AWS Elastic Beanstalk environment.

To create an IAM policy

  1. Open the AWS Identity and Access Management (IAM) console at https://console.aws.amazon.com/iam.

  2. In the navigation pane, choose Policies.

  3. Choose Create policy.

  4. Next to Create Your Own Policy, choose Select.

  5. For Policy Name, enter gsg-signup-policy.

  6. Open the iam_policy.json file from the eb-node-express-signup-master directory and copy its contents. Paste the contents into the Policy Document box.

  7. Choose Create Policy.

Create an IAM role and attach the policy to it.

To create an IAM role

  1. In the navigation pane, choose Roles.

  2. Choose Create new role.

  3. On the Select role type page, next to Amazon EC2, choose Select to allow EC2 instances to use the role to call AWS services on your behalf.

  4. On the Attach Policy page, attach the following policies.

    • gsg-signup-policy – The policy that you created earlier.

    • AWSElasticBeanstalkWebTier – Elastic Beanstalk provided role that allows the instances in your environment to upload logs to Amazon S3.

    To locate policies quickly, type part of the policy name in the filter box. Select both policies and then choose Next Step.

  5. For Role name, enter gsg-signup-role.

  6. Choose Create role.

For more information on permissions, see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles.html in the AWS Elastic Beanstalk Developer Guide.