I am trying to publish to an SNS topic which will then notify a Lambda function, as well as an SQS queue. My Lambda function does get called, but the CloudWatch logs state that my "event" object is None. The boto3 docs states to use the kwarg MessageStructure='json' but that throws a ClientError.
Hopefully I've supplied enough information.
Example Code:
import json
import boto3
message = {"foo": "bar"}
client = boto3.client('sns')
response = client.publish(
TargetArn=arn,
Message=json.dumps(message)
)
MessageStructure
param if you are trying to send different messages to different types of subscribers (e.g. email vs. SMS). Could you include the code for your Lambda function? I'm assuming that the code shown above works without any errors, right? – garnaatclient = boto3.client('sns', region_name='us-east-1')
bradmontgomery.net/blog/… – Kyle Bridenstine