You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# AWS Elastic Beanstalk Express Sample App with Dynamo
2
2
This sample application uses the [Express](https://expressjs.com/) framework and [Bootstrap](http://getbootstrap.com/) to build a simple, scalable customer signup form that is deployed to [AWS Elastic Beanstalk](http://aws.amazon.com/elasticbeanstalk/). The application stores data in [Amazon DynamoDB](http://aws.amazon.com/dynamodb/) and publishes notifications to the [Amazon Simple Notification Service (SNS)](http://aws.amazon.com/sns/) when a customer fills out the form.
3
3
4
-
## Features
5
-
### Themes
4
+
This example cannot be run locally.
5
+
6
+
You can get started using the following steps:
7
+
1. Install the [AWS Elastic Beanstalk Command Line Interface (CLI)](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html).
8
+
2. Add policies to the [default instance profile](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-instanceprofile.html) to grant the EC2 instances in your environment permission to access DynamoDB and Amazon SNS:
9
+
- Open the [Roles](https://console.aws.amazon.com/iam/home#roles) page in the IAM console.
10
+
- Choose `aws-elasticbeanstalk-ec2-role`.
11
+
- On the Permissions tab, choose Attach policies.
12
+
- Select the managed policy for the additional services that your application uses. For this specific example, add `AmazonSNSFullAccess` and `AmazonDynamoDBFullAccess`.
13
+
- Choose Attach policy.
14
+
3. Run `eb init --platform node.js --region <region>` to initialize the folder for use with the CLI. Replace `<region>` with a region identifier such as `us-east-2` (see [Regions and Endpoints](https://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#elasticbeanstalk_region) for a full list of region identifiers).
15
+
4. Run `eb create --sample nodejs-example-express-dynamo` to begin the creation of a sample application that contains a load-balanced environment with the default settings for the Node.js platform.
16
+
5. Once the environment creation process completes, run `eb open` to load the sample environment in your browser to verify the deployment has succeeded and is accessible.
17
+
6. Deploy the source in this bundle using `eb deploy`.
18
+
7. Once the deployment of this source bundle completes, run `eb open` to interact with the new webpage.
19
+
8. Run `eb terminate --all` to clean up.
20
+
21
+
22
+
## Themes
6
23
The code includes several Bootstrap themes from [bootswatch.com](http://bootswatch.com/). You can dynamically change the active theme by setting the THEME environment variable in the [Elastic Beanstalk Management Console](https://console.aws.amazon.com/elasticbeanstalk):
7
24
8
25

@@ -13,20 +30,4 @@ Installed themes include:
13
30
*[default](http://bootswatch.com/default)
14
31
*[flatly](http://bootswatch.com/flatly)
15
32
*[slate](http://bootswatch.com/slate)
16
-
*[united](http://bootswatch.com/united)
17
-
18
-
You can get started using the following steps:
19
-
1.[Install the AWS Elastic Beanstalk Command Line Interface (CLI)](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html).
20
-
2. Create an IAM Instance Profile named **aws-elasticbeanstalk-sample-role** with the policy in [iam_policy.json](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](https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-create-iam-instance-profile.html).
21
-
3. Run `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](https://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#elasticbeanstalk_region) for a full list of region identifiers). For interactive mode, run `eb init` then,
22
-
1. Pick a region of your choice.
23
-
2. Select the **[ Create New Application ]** option.
24
-
3. Enter the application name of your choice.
25
-
4. Answer **yes** to *It appears you are using Node.js. Is this correct?*.
26
-
7. Choose whether you want SSH access to the Amazon EC2 instances.
27
-
*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.*
28
-
4. Run `eb create --instance_profile aws-elasticbeanstalk-sample-role` to begin the creation of your environment.
29
-
1. Enter the environment name of your choice.
30
-
2. Enter the CNAME prefix you want to use for this environment.
31
-
5. Once the environment creation process completes, run `eb open` to open the application in a browser.
0 commit comments