Skip to content

Commit 218e553

Browse files
authored
Merge pull request #83 from ssnskar/main
2 parents 10182c7 + aae8b02 commit 218e553

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

integration-sqs-to-lambda/Function.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def lambda_handler(event, context):
2+
for message in event['Records']:
3+
process_message(message)
4+
print("done")
5+
6+
def process_message(message):
7+
try:
8+
print(f"Processed message {message['body']}")
9+
# TODO: Do interesting work based on the new message
10+
except Exception as err:
11+
print("An error occurred")
12+
raise err

integration-sqs-to-lambda/snippet-data.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Sample Amazon SQS function code",
44
"type": "Integration",
55
"services": ["lambda", "sqs"],
6-
"languages": ["Node", ".NET", "TypeScript", "Java"],
6+
"languages": ["Node", ".NET", "TypeScript", "Java","Python"],
77
"tags": [],
88
"introBox": {
99
"headline": "How it works",
@@ -63,6 +63,17 @@
6363
"language": "java"
6464
}
6565
]
66+
},
67+
{
68+
"id": "Python",
69+
"title": "Usage Example with Python:",
70+
"description": "Sample Amazon SQS function code using Python without batch item handling.",
71+
"snippets": [
72+
{
73+
"snippetPath": "Function.py",
74+
"language": "py"
75+
}
76+
]
6677
}
6778
]
6879
}
@@ -90,6 +101,12 @@
90101
"image": "https://avatars.githubusercontent.com/u/8285987?s=400&v=4",
91102
"bio": "Senior Solutions Architect at AWS",
92103
"linkedin": "girishbalachandran"
104+
},
105+
{
106+
"headline": "Python Example Presented by Girish B",
107+
"name": "Sanskar",
108+
"bio": "Cloud Support Engineer at AWS",
109+
"linkedin": "Sanskar05"
93110
}
94111
]
95112
}

0 commit comments

Comments
 (0)