Skip to content

Commit 860550c

Browse files
committed
cleanup readme
1 parent 0aa0a28 commit 860550c

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,7 @@ This branch shows advanced instrumentation with the AWS X-Ray SDK and includes f
88
## AWS Lambda Integration
99
From branch: [`lambda`](https://github.com/awslabs/eb-java-scorekeep/tree/lambda)
1010

11-
In the [`UserFactory`](https://github.com/awslabs/eb-java-scorekeep/tree/xray/src/main/java/scorekeep/UserFactory.java) class, Scorekeep calls a Node.js AWS Lambda function to generate random usernames. If the call to Lambda fails, Scorekeep falls back on a public API to generate names.
12-
13-
Run the script in the `_lambda` folder to create the AWS Lambda function that Scorekeep calls to generate random names:
14-
15-
eb-java-scorekeep/_lambda$ ./create-random-name.sh
16-
17-
The script uses a CloudFormation template and the AWS CLI to create the function and its execution role:
18-
- `_lambda/random-name.yml` - Template that defines the role and function
19-
- `_lambda/create-random-name.sh` - Script to create the role and function
20-
- `_lambda/delete-random-name.sh` - Script to delete the role and function
21-
22-
If you don't have the AWS CLI, [install it](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) or use the CloudFormation console to create a stack with the template.
23-
24-
Next, add Lambda permission to your instance profile ([aws-elasticbeanstalk-ec2-role](https://console.aws.amazon.com/iam/home#/roles/aws-elasticbeanstalk-ec2-role)) to let the environment update the Lambda function:
25-
- AWSLambdaFullAccess
26-
27-
Note: In the `lambda` branch, Scorekeep creates the Lambda function with a configuration file. In this branch, you create the function independently with the same template that creates the role. This lets the `xray` branch work even if the Lambda function and role have not been created, whereas in the `lambda` branch, the deployment fails if you haven't created the required role.
28-
29-
Finally, redeploy this branch to your environment. During deployment, the [update script in `lambda-function.config`](https://github.com/awslabs/eb-java-scorekeep/blob/xray/.ebextensions/lambda-function.config#L31) builds the function and uploads the source code to Lambda.
11+
In the [`UserFactory`](https://github.com/awslabs/eb-java-scorekeep/tree/xray/src/main/java/scorekeep/UserFactory.java) class, Scorekeep calls a Node.js AWS Lambda function to generate random usernames.
3012

3113
Create a new user in the web app and refresh your service map to see the two Lambda nodes.
3214

0 commit comments

Comments
 (0)