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
Copy file name to clipboardExpand all lines: README.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,21 +22,22 @@ Create a Java 8 SE environment in Elastic Beanstalk to host the application.
22
22
3. When your environment is ready, the console redirects you to the environment Dashboard.
23
23
4. Click the URL at the top of the page to open the site.
24
24
25
-
## Give the application permission to use DynamoDB
26
-
When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of its EC2 instance to call AWS. Elastic Beanstalk provides a default instance profile that you can extend to grant the application the permissions it needs to read from and write to resource tables in DynamoDB.
25
+
## Give the application permission to use DynamoDB and SNS
26
+
When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of its EC2 instance to call AWS. Elastic Beanstalk provides a default instance profile that you can extend to grant the application the permissions it needs to read from and write to resource tables in DynamoDB, and send notifications with SNS.
27
27
28
-
*To add DynamoDB permissions to the instances in your Elastic Beanstalk environment*
28
+
*To add DynamoDB and SNS permissions to the instances in your Elastic Beanstalk environment*
29
29
30
30
1. Open the Elastic Beanstalk instance profile in the IAM console: [aws-elasticbeanstalk-ec2-role](https://console.aws.amazon.com/iam/home#roles/aws-elasticbeanstalk-ec2-role)
31
31
2. Click **Attach Policy**.
32
32
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
33
+
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
33
34
34
35
## Deploy the application
35
36
Deploy the source code for the project to your Elastic Beanstalk environment.
36
37
37
38
*To deploy the source code*
38
39
39
-
1. Download the source bundle: [eb-java-scorekeep-v1.zip](https://github.com/awslabs/eb-java-scorekeep/releases/download/v1.1/eb-java-scorekeep-v1.zip)
40
+
1. Download the source bundle: [eb-java-scorekeep-v1.zip](https://github.com/awslabs/eb-java-scorekeep/releases/download/v1.3/eb-java-scorekeep-v1.zip)
40
41
2. Open the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home).
41
42
3. Click your environment's name to open the Dashboard.
42
43
4. Click **Upload and Deploy**.
@@ -47,6 +48,17 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
47
48
48
49
Click through the app to explore its functionality. Use the network console in your browser to see the HTTP requests that it sends to the API to read and write users, sessions, games, moves and game state to DynamoDB via the API.
49
50
51
+
## Configure Notifications
52
+
The API uses Amazon SNS to send a notification email when a game ends. To enable notifications, configure your email address in an environment variable.
53
+
54
+
*To enable notifications*
55
+
1. Open your environment's page in the [environment management console](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-console.html).
56
+
2. Choose **Configuration**.
57
+
3. Choose **Software Configuration**
58
+
4. Under **Environment Properties**, set **NOTIFICATION_TOPIC** to your email address.
59
+
5. Check your email for a subscription confirmation.
60
+
6. Complete a game to trigger a notification.
61
+
50
62
# How it works
51
63
The project includes two independent components, an HTML and JavaScript frontend in Angular 1.5 and a Java backend that uses Spring to provide a public API.
0 commit comments