Tag: docker boto3

docker boto3 AWS无法validation提供的访问凭证

我在一个命令行工具中使用运行python:3.4图像的容器中的boto3,在我的笔记本电脑中,我可以运行代码没有问题,但在容器内我收到以下错误: File "/usr/local/lib/python3.4/site-packages/botocore-1.3.26-py3.4.egg/botocore/client.py", line 310, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/lib/python3.4/site-packages/botocore-1.3.26-py3.4.egg/botocore/client.py", line 407, in _make_api_call raise ClientError(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (AuthFailure) when calling the DescribeInstances operation: AWS was not able to validate the provided access credentials 我一直在试图find问题的原因,我发现在Docker时区同步的一个可能的原因,但我试图改变时区,但没有任何成功,这是我的Dockerfile: #Docker container image # Set the base image to use to Ubuntu FROM python:3.4 MAINTAINER […]

从Mac Docker容器中的botocore.exceptions.EndpointConnectionError

当我试图从在Mac上运行的Docker容器内联系DynamoDB时,我最近开始得到一个EndpointConnectionError(超时后)。 相同的代码和安装程序以前工作正常。 以下是一些示例代码: >>> from boto3 import resource >>> r = resource('dynamodb') >>> table = r.Table('Users') >>> table.put_item(Item={'id':'987987'}) 我的〜/ .aws / config: [default] output = json region = us-east-1 我正在使用的代码重build和重新启动容器(从Mac OS): #!/bin/sh docker-machine ssh default "docker ps | awk 'NR > 1 {print \$1}' | xargs –no-run-if-empty docker kill" docker build -t <image_name> . docker-machine […]