I'm trying to trigger Email using SES and API gateway without using Lambda function. It will contain pdf file and text. I'm able to trigger Email using QueryString parameters, but as i need to send files also I want to map from the body. Tried body mapping in API-gateway as below,
BODY MAPPING TEMPLATE
{
'Destination': {
ToAddresses:'[email protected]'
},
'Message': {
'Body': {
'Text': {
'Data': 'message body ! hurray !!!',
'Charset': 'UTF-8'
}
},
'Subject': {
'Data': 'subject data',
'Charset': 'UTF-8'
}
},
'Source': '[email protected]'
}
RESPONSE FROM SES
`{
"Output": {
"__type": "com.amazon.coral.service#SerializationException",
"Message": null
},
"Version": "1.0"
}`
Questions
- Is it possible to achieve this without using lambda?
Am I using the body mapping correctly?
Could anyone please throw light on how to achieve this? Any help highly appreciated.