InvalidClientTokenId with "AWS_SES_REGION_NAME = 'eu-central-1'"
See original GitHub issueHi,
I have been using Django-ses for a while and everything worked fine. When I wanted to move out of the ses sandbox, I realised that I had not set the region to “eu-central-1”.
After I did that, I cannot send emails anymore and instead get this error message:
boto.exception.BotoServerError: BotoServerError: 403 Forbidden
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidClientTokenId</Code>
<Message>The security token included in the request is invalid.</Message>
</Error>
<RequestId>ec8c6de9-9bdc-48ab-8a35-50c8caf4fcd1</RequestId>
</ErrorResponse>
Any idea what the problem is? Cheers, Gregor
BTW: my settings.py looks like this:
DEFAULT_FROM_EMAIL = '***@gmail.com'
EMAIL_BACKEND = 'django_ses.SESBackend'
with open('/etc/AWS_ACCESS_KEY_ID.txt') as f:
AWS_ACCESS_KEY_ID = f.read().strip()
with open('/etc/AWS_SECRET_ACCESS_KEY.txt') as f:
AWS_SECRET_ACCESS_KEY = f.read().strip()
AWS_SES_REGION_NAME = 'eu-central-1'
AWS_SES_REGION_ENDPOINT = 'email.eu-central-1.amazonaws.com'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:18 (12 by maintainers)
Top Results From Across the Web
Regions and Amazon SES - Amazon Simple Email Service
Provides information about Regions and endpoints in Amazon SES. ... feedback-smtp.eu-central-1.amazonses.com ... Region Name, Email Receiving Endpoint ...
Read more >How can I resolve the error "The security token included in the ...
A client error (InvalidClientTokenId) occurred when calling the UploadServerCertificate operation: The security token included in the request is invalid. I have ...
Read more >How to configure Amazon AWS SES SMTP?
Step 1: Register AWS account/Login to your current account ... one among 3 regions that Amazon supports: US East (N. Virginia), EU (Ireland) ......
Read more >aws sts get-session-token - Intellipaat
region = eu-central-1. mfa_serial = arn:aws:iam:<number>:mfa/<name>. This string can be found in the console, IAM service under the user, ...
Read more >Amazon SES Client :: Quarkiverse Documentation
Configuration property Type Default
boolean false
string localstack
AWS SDK client configurations Type Default
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
maybe the signature version (needs v4 for Frankfurt) comes to play?
https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
@pcraciunoiu It works now! At first I used the
tox
command but now I can debug and started fixing the tests 😃