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
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ A simple Java Lambda based server-less application that implements a reimburseme
10
10
4. Sign up for AWS Lambda, API Gateway, DynamoDB, and SES (if you have not done so, yet).
11
11
12
12
### Upload Lambda Functions
13
-
5. Right click on the LambdaForm project folder > Amazon Web Services > Upload Function to AWS Lambda > Follow the steps in the wizard and create a new Lambda Function.
14
-
6. Upload the Lambda Functions of the other two projects LambdaSendMail and LambdaApproval.
15
-
7. Give the Lambda Functions an IAM role that allows access to DynamoDB and SES.
13
+
1. Right click on the LambdaForm project folder > Amazon Web Services > Upload Function to AWS Lambda > Follow the steps in the wizard and create a new Lambda Function.
14
+
2. Upload the Lambda Functions of the other two projects LambdaSendMail and LambdaApproval.
15
+
3. Give the Lambda Functions an IAM role that allows access to DynamoDB and SES.
16
16
17
17
### AWS Services setup
18
-
8. Set up a DynamoDB table named 'lambda-reimbursment' with the Hash Key 'employee_id' of type String. In the example, the EU-WEST-1 region (Ireland) is chosen.
19
-
9. In the AWS dashboard, go to Lambda > LambdaSendMail > Event source. Add an event source of type DynamoDB (table: lambda-reimbursment) with default settings.
20
-
10. Do the same as in step 5 for LambdaApproval.
21
-
11. In the AWS dashboard, go to API Gateway and create a new API that points at the LambdaApproval Function. Create a Resource "reimbursment" and a GET method. Click on "Method Request" and add a query string parameter "id". Click on "Integration Request" and add a Mapping Template with content type "application/json" and Template:
18
+
1. Set up a DynamoDB table named 'lambda-reimbursment' with the Hash Key 'employee_id' of type String. In the example, the EU-WEST-1 region (Ireland) is chosen.
19
+
2. In the AWS dashboard, go to Lambda > LambdaSendMail > Event source. Add an event source of type DynamoDB (table: lambda-reimbursment) with default settings.
20
+
3. Do the same as in step 5 for LambdaApproval.
21
+
4. In the AWS dashboard, go to API Gateway and create a new API that points at the LambdaApproval Function. Create a Resource "reimbursment" and a GET method. Click on "Method Request" and add a query string parameter "id". Click on "Integration Request" and add a Mapping Template with content type "application/json" and Template:
22
22
```
23
23
{
24
24
"employee_id" : "$input.params('id')"
@@ -27,8 +27,8 @@ A simple Java Lambda based server-less application that implements a reimburseme
27
27
Deploy the API.
28
28
29
29
### Run Lambda Functions
30
-
12. Right click on the LambdaForm project folder > Amazon Web Services > Run Function on AWS Lambda > Enter a JSON object like this one:
30
+
1. Right click on the LambdaForm project folder > Amazon Web Services > Run Function on AWS Lambda > Enter a JSON object like this one:
13. If the Lambda Function completes successfully, a new entry will be added to the DynamoDB table lambda-reimbursment that you created in step 8.
33
-
14. LambdaSendMail gets triggered by the DynamoDB stream (pull model) and sends an e-mail with the info that has been added to the table.
34
-
15. If you have received the e-mail and click on the approval URL in the e-mail body, the LambdaApproval Function will be called and add an "approved" column entry to DynamoDB.
32
+
2. If the Lambda Function completes successfully, a new entry will be added to the DynamoDB table lambda-reimbursment that you created in step 1 of the AWS Services setup.
33
+
3. LambdaSendMail gets triggered by the DynamoDB stream (pull model) and sends an e-mail with the info that has been added to the table.
34
+
4. If you have received the e-mail and click on the approval URL in the e-mail body, the LambdaApproval Function will be called and add an "approved" column entry to DynamoDB.
0 commit comments