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
+48-52Lines changed: 48 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,17 @@
2
2
3
3
This example uses [Twilio](https://www.twilio.com/) to save an image from your mobile phone to the AWS cloud. A user sends an image using MMS to a Twilio phone number which sends a request to an Amazon API Gateway endpoint that triggers a Lambda function. The app then returns a publicly accessible link to the image in AWS S3. This app uses AWS Lambda, API Gateway, DynamoDB & S3. It is also 100% serverless!
4
4
5
-
###AWS Lambda
5
+
NOTE: The project has been updated to use AWS Serverless Application Model (AWS SAM)
6
6
7
-
[Lambda](https://aws.amazon.com/lambda/) is a compute service that runs your code in response to events. Events are triggered or invoked by resources in your AWS environment or via API Gateway. Here our Lambda function is triggered by an API Gateway endpoint that Twilio hits after an MMS is received. The Lambda function is responsible for writing user info to DynamoDB, writing the image to S3 with meta data and returning a response to Twilio.
8
-
9
-
###Amazon API Gateway
10
-
[API Gateway](https://aws.amazon.com/api-gateway/) is a fully managed API as a service where you can create, publish, maintain, monitor, and secure APIs at any scale. In this app, we use API Gateway to create an endpoint for Twilio to make a GET request. API Gateway transforms Twilio's URL encoded request into a JSON object, so that Lambda can process it. Lastly, API Gateway takes Lambda's response and builds an XML object for Twilio.
11
-
12
-
###Amazon DynamoDB & Amazon S3
13
-
[DynamoDB](https://aws.amazon.com/dynamodb/) is Amazon's non-relational database service. This app leverages DynamoDB to store user data. [S3](https://aws.amazon.com/s3/) provides developers with object level storage that is endlessly scalable. We use S3 to store images received via MMS.
7
+
##Architecture
14
8
15
-
**Please Note:** Twilio is a 3rd party service that has terms of use that the user is solely responsible for complying with (https://www.twilio.com/legal/tos)
Step-by-step on how to configure, develop & deploy this app on AWS.
20
14
21
-
###Housekeeping
15
+
###Pre-Requisites
22
16
1. Sign-in to AWS or [Create an Account](https://us-west-2.console.aws.amazon.com).
23
17
2. Pick a region in the console and be consistent throughout this app. Use either `us-east-1`, `us-west-2` & `eu-west-1`.
24
18
3. Create a table in DynamoDB with a single Hash for primary key of type String. We don't need any additional indexes and you can keep the read/write capacity at 1 for this example. [Screenshot](https://s3-us-west-2.amazonaws.com/mauerbac-hosting/dynamoDB.png)
@@ -41,6 +35,9 @@ the following AWS CLI commands in order.
41
35
NOTE: Make sure you update the template.yaml and swagger.yaml (sam/ folder) with the code-uri, region and
42
36
account id before running the commands. Refer to comments in the files for more info
43
37
38
+
You can use the basic_lambda_function.py as the reference for a simple backend to test the end to
39
+
end flow
40
+
44
41
```
45
42
aws cloudformation package \
46
43
--template-file template.yaml \
@@ -53,6 +50,46 @@ aws cloudformation deploy \
53
50
--capabilities CAPABILITY_IAM
54
51
```
55
52
53
+
### Generating the Lambda code
54
+
55
+
Connect to a 64-bit Amazon Linux instance via SSH.
**Please Note:** Twilio is a 3rd party service that has terms of use that the user is solely responsible for complying with (https://www.twilio.com/legal/tos)
0 commit comments