boto3.client('ses').send_email(
Source = email_from,
Destination={
'ToAddresses': [
email_to,
]
},
Message={
'Subject': {
'Data': emaiL_subject
},
'Body': {
'Text': {
'Data': email_body.format(user_password)
}
}
}
)
I am using boto3 SES, after execution of the above code through lambda function I am getting the following error:
Could not connect to the endpoint URL: \"https://email.ap-southeast-1.amazonaws.com/\
For Lambda function my region is ap-southeast-1
Any Help will be appriciated
At the time of writing this, AWS offers its SES service only for 6 regions:
us-east-1
us-west-2
eu-west-1
ap-south-1
ap-southeast-2
eu-central-1
Use one of the above as your AWS_REGION
client = boto3.client('ses',region_name=AWS_REGION)
Note: Look for the latest list of regions on AWS website.