If you are OSX user:
AWS is considering time skew when validating credentials. You can have a time drift on your Docker machine. You should run periodically docker-machine ssh $docker_machine 'sudo ntpclient -s -h pool.ntp.org' to sync the clock. For details see http://stackoverflow.com/questions/22800624/will-docker-container-auto-sync-time-with-the-host-machine.
For boto3 running corectly you must provide AWS credentials and eventual AWS configuration. The easiest way to achieve that is to mount ~/.aws directory to the container's /root/.aws.
Running example script may look like this: docker run --rm -it -v ~/.aws:/root/aws:ro -v $(pwd):$(pwd)-w $(pwd) kopiczko/boto3 YOUR_SCRIPT_USING_BOTO3.
It's good idea to make an alias like:
alias boto3='docker run --rm -it -v ~/.aws:/root/.aws:ro -v $(pwd):$(pwd) -w $(pwd) kopiczko/boto3 "$@"'
After that you can run your boto3 scripts like:
boto3 YOUR_SCRIPT_USING_BOTO3
FROM alpine:latest
MAINTAINER Pawel Kopiczko <[email protected]>
RUN apk --no-cache add \
python3 \
&& \
pip3 install boto3
Content type
Image
Digest
Size
25.5 MB
Last updated
about 10 years ago
docker pull kopiczko/boto3