Skip to content

Instantly share code, notes, and snippets.

@zdotfive
Forked from srcecde/sqs_scenario1.py
Created January 31, 2023 16:21
Show Gist options
  • Save zdotfive/77c599ea84d604109e61d1e0f5a9018b to your computer and use it in GitHub Desktop.
Save zdotfive/77c599ea84d604109e61d1e0f5a9018b to your computer and use it in GitHub Desktop.
import json
import boto3
def lambda_handler(event, context):
region_name = os.environ['AWS_REGION']
if event:
for record in event['Records']:
body = record['body']
# process message
return {
'statusCode': 200,
'body': json.dumps('Message processed successfully!')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment