Run the AWS CLI on Docker

Install Docker in advance.

docker -v

If it is installed, the version will be displayed.

Create an IAM (Identity and Access Management) user with the appropriate policy attached (https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_users_create.html#id_users_create_console). (AWS (Amazon Web Services) access type is programmatic access)

Create ~ / .aws / credentials and

mkdir ~/.aws/ && touch $_/credentials

Enter the access key ID and secret access key.

~/.aws/credentials


[default]
aws_access_key_id =Access key ID
aws_secret_access_key =Secret access key

See if you can list your buckets in Amazon S3 (Simple Storage Service) by running the s3 ls command.

docker run --rm -ti -v ~/.aws:/root/.aws amazon/aws-cli s3 ls

You can shorten the Docker command by creating ʻalias`.

alias aws='docker run --rm -ti -v ~/.aws:/root/.aws amazon/aws-cli'

Also check if the s3 ls command can be executed.

aws s3 ls

-Use Official AWS CLI Version 2 Docker Image

Recommended Posts

Run the AWS CLI on Docker
Try the Docker environment on AWS ECS
Run phpunit on Docker
Run VS Code on Docker
Run openvpn on Docker (windows)
Decomposing the Docker run command. .. ..
Install docker on AWS EC2
Run the Android emulator on Docker using Android Emulator Container Scripts
Install Docker on AWS Ubunt 20.04 LTS
Run AWS CLI commands in Ansible
Run SSE (Server-Sent-Event) samples on docker
Steps to run docker on Mac
Run puppeteer-core on Heroku (Docker edition)
To beginners launching Docker on AWS
Run React on a Docker container
How to run JavaFX on Docker
Run GUI application on Docker container
Run PureScript on a Docker container
Run C binaries on AWS Lambda
Run GPU-required batch processing on AWS
Run (provisionally) a Docker image with ShellCommandActivity on AWS Data Pipeline
Run NordVPN on Docker (Windows) Ubuntu container
Run Embulk on Docker to convert files
Build an environment with Docker on AWS
Until you run apache on ubuntu on docker
Run Ubuntu + ROS with Docker on Mac
Redmine on Docker
Run GUI application on Docker container (Japanese input)
Environment construction command memo with Docker on AWS
Run JSP Hello World with Tomcat on Docker
Compile and run Java on the command line
Run Docker environment Rails MySQL on Heroku. devise and hiding the twitter API
What to do if the rails server doesn't run out on AWS cloud9
Run STS4 on Mac
Docker installation on CentOS 6
Docker the development environment of Ruby on Rails project
Deploy laravel using docker on EC2 on AWS ① (Create EC2 instance)
List how to learn from Docker to AKS on AWS
Test run on rails
Run Pico with docker
Run PostgreSQL on Java
Install Docker on Manjaro
Now that you have deployed AWS with Rails On Docker, let's organize the contents.
Run Payara with Docker
The guy who could only run the Spring app on the IDE tried running it on Docker
Run Processing on Ant
Run tiscamera on Ubuntu 18.04
M.S. docker on Windows
Docker installation on WSL2
Creating a docker host on AWS using Docker Machine (personal memorandum)
[Amateur remarks] Build multiple WordPress on AWS using Docker Compose
Deploy laravel using docker on EC2 on AWS ② (Elastic IP acquisition-linking)
Until you run Quarkus and run docker image on Amazon ECS
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
Run lilypond on Docker on macOS Catalina to create sheet music
Register your own Docker image with ECR using AWS CLI
Deploy laravel using docker on EC2 on AWS ④ (git clone ~ deploy, migration)
Install docker and docker-compose on ubuntu in the shortest process
Created the first LINEbot on AWS Cloud9 (Rails + Heroku deployment)
I tried running a Docker container on AWS IoT Greengrass 2.0
Run the sample "Introduction to TensorFlow Development" on Jetson nano