question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidClientTokenId with "AWS_SES_REGION_NAME = 'eu-central-1'"

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
starenkacommented, Apr 22, 2020
0reactions
GitRoncommented, Jun 3, 2020

@pcraciunoiu It works now! At first I used the tox command but now I can debug and started fixing the tests 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found