AWS Elastic Beanstalk Express Sample App
This sample application uses the Express framework and Bootstrap to build a simple, scalable customer signup form that is deployed to AWS Elastic Beanstalk. The application stores data in Amazon DynamoDB and publishes notifications to the Amazon Simple Notification Service (SNS) when a customer fills out the form.
Installed themes include:
You can get started using the following steps:
- Install the AWS Elastic Beanstalk Command Line Interface (CLI).
- Create an IAM Instance Profile named aws-elasticbeanstalk-sample-role with the policy in iam_policy.json. For more information on how to create an IAM Instance Profile, see Create an IAM Instance Profile for Your Amazon EC2 Instances.
eb init -r <region> -p "Node.js"to initialize the folder for use with the CLI. Replace
<region>with a region identifier such as
us-west-2(see Regions and Endpoints for a full list of region identifiers). For interactive mode, run
- Pick a region of your choice.
- Select the [ Create New Application ] option.
- Enter the application name of your choice.
- Answer yes to It appears you are using Node.js. Is this correct?.
- Choose whether you want SSH access to the Amazon EC2 instances.
Note: If you choose to enable SSH and do not have an existing SSH key stored on AWS, the EB CLI requires ssh-keygen to be available on the path to generate SSH keys.
eb create --instance_profile aws-elasticbeanstalk-sample-roleto begin the creation of your environment.
- Enter the environment name of your choice.
- Enter the CNAME prefix you want to use for this environment.
- Once the environment creation process completes, run
eb opento open the application in a browser.
eb terminate --allto clean up.