错误:“请求中包含的安全令牌无效"使用 Boto python 时 [英] Error: "The security token included in the request is invalid" when using Boto python

查看:13
本文介绍了错误:“请求中包含的安全令牌无效"使用 Boto python 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 nginx 上运行我的 django 项目时出现此错误.我将 dynamodb 用于数据库,将 S3 用于在项目中提供静态文件.项目在localhost上运行正常.

I am getting this error when I run my django project on nginx. I use dynamodb for database and S3 for serving static files in the project. The project runs fine when operated on localhost.

该项目最初托管在另一个 ec2 实例中,它运行起来非常有魅力.我从该实例的图像中启动了一个新的 ec2 实例.现在它抛出了这个错误.问题是,

The project originally was hosted in another ec2 instance where it ran like charm. I fired up a new ec2 instance from an image of that instance. And now it is throwing this error. The thing is,

当我在命令上运行一些测试代码时,连接工作正常行.

the connection works fine when I run some test code on the command line.

但是在项目运行的时候会抛出这个错误.

But throws this error when the project runs.

JSONResponseError: 400 Bad Request
{u'message': u'The security token included in the request is invalid.', u'__type': u'com.amazon.coral.service#UnrecognizedClientException'}
Request Method: POST
Request URL:    http://ec2-54-200-144-115.us-west-2.compute.amazonaws.com/?attempt=1&code=AQBfOzPR4Hlgrpkjz-qXQj8b7OLq6cm1NM_oZf64Wz3EmlX2-VDS6qfZ5V5f0Tmbx4MrLc4SGuJxUHa8drQClz3A1IWMVqUGKLEEW_0ol1RqClI8cZViWreBm5c3HJ-Vp48Xx81a7gvXSjRNJUn-kazXqahDrgsAeLez_8FrXIb_HWHyekhnUmxgkskRGBNzcTtpqASNe3agzG3ZZowCMYi6bDBAdVuODli3ApWQWENSmjLaN5QbZWbGo3ATvJNMAUQjj6VTHCkVS-UWcuh-PtwAAFtUqb8HkLsbFG31KevwPKz6x10ojD45pe03zA1SF_g
Django Version: 1.5
Exception Type: JSONResponseError
Exception Value:    
JSONResponseError: 400 Bad Request
{u'message': u'The security token included in the request is invalid.', u'__type': u'com.amazon.coral.service#UnrecognizedClientException'}
Exception Location: /srv/www/test/local/lib/python2.7/site-packages/boto/dynamodb2/layer1.py in _retry_handler, line 1530
Python Executable:  /srv/www/test/bin/python
Python Version: 2.7.3

无法理解发生了什么.谁能帮帮我?

Can't understand what's going on. Can anyone help me?

推荐答案

您收到此消息是因为您的 AWS 账户的安全凭证/访问密钥已更改.

You are getting this message since the security credentials / Access Keys for your AWS account has been changed.

使用新的访问密钥重试即可.

Try again with new access keys it will work.

一切顺利.

这篇关于错误:“请求中包含的安全令牌无效"使用 Boto python 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆