Skip to content

Commit 2ebcb85

Browse files
committed
simpe sns lambda function
added other AWS Lambda Labs reference
1 parent 047e1d7 commit 2ebcb85

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525

26-
#### [S3 (Simple Cloud Storage)](s3)
26+
#### [S3 (Simple Storage Service)](s3)
2727

2828

2929

@@ -95,6 +95,27 @@
9595

9696

9797

98+
---
99+
100+
101+
## Other AWS Lambda Labs
102+
103+
104+
### [AWS Lambda: Node.js Labs](https://github.com/a-patel/aws-lambda-nodejs-labs)
105+
106+
107+
### [AWS Lambda: .NET Labs](https://github.com/a-patel/aws-dotnet-labs)
108+
109+
110+
111+
112+
113+
---
114+
115+
116+
117+
118+
98119

99120

100121

s3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AWS Lambda: Python Labs - S3
22

3-
> AWS Lambda - Python Examples - S3 (Simple Cloud Storage)
3+
> AWS Lambda - Python Examples - S3 (Simple Storage Service)
44
55

66

sns/lambda_function.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import json
2+
import logging
3+
4+
5+
log = logging.getLogger()
6+
log.setLevel(logging.INFO)
7+
8+
9+
def lambda_handler(event, context):
10+
log.debug('Event: %s', event)
11+
# print("Received event: " + json.dumps(event, indent=2))
12+
13+
message = event['Records'][0]['Sns']['Message']
14+
print("From SNS: " + message)
15+
16+
# TODO: do your work
17+
18+
return message

sns/requirements.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)