I want to create a subscription for a Lambda function endpoint, which does not support Raw Message Delivery, so I send the attribute 'RawDelivery'='false' as illustrated in the below code:
sns_client = boto3.client('sns', region_name='us-east-2')
topic_arn = 'arn:aws:sns:us-east-2:myacct:my-topic'
protocol = 'lambda'
endpoint = 'arn:aws:lambda:us-east-2:myacct:function:my-lambda-function'
attribs = dict()
attribs['RawMessageDelivery'] = 'false'
sns_client.subscribe(TopicArn=topic_arn, Protocol=protocol, Endpoint=endpoint,
Attributes=attribs)
However, AWS responds with this error:
Invalid parameter: Attributes Reason: Delivery protocol [lambda] does not support raw message delivery.
According to the AWS Boto3 docs:
When set to true ,[RawMessageDelivery] enables raw message delivery to Amazon SQS or HTTP/S endpoints.
I'm setting it to 'false', not 'true', so why does AWS think I'm trying to enable raw message delivery?