Debian with AWS CLI included.
For the aws
command usage, please refer to the following documents.
In order to use image from GitHub Container Registry instead of Docker Hub, you can replace rtsp/aws-cli
with ghcr.io/rtsp/docker-aws-cli
anywhere in the instruction below.
docker pull rtsp/aws-cli
docker run --rm -it rtsp/aws-cli bash
docker run --rm -it \
-e AWS_ACCESS_KEY_ID=AKIAXXXX \
-e AWS_SECRET_ACCESS_KEY=XXXX \
-e AWS_DEFAULT_REGION=ap-southeast-1 \
rtsp/aws-cli bash
docker run --rm \
-e AWS_ACCESS_KEY_ID=AKIAXXXX \
-e AWS_SECRET_ACCESS_KEY=XXXX \
-e AWS_DEFAULT_REGION=ap-southeast-1 \
rtsp/aws-cli aws s3 ls
WARNING: This will leave your keys in the running container.
docker run -d --name aws-cli \
-e AWS_ACCESS_KEY_ID=AKIAXXXX \
-e AWS_SECRET_ACCESS_KEY=XXXX \
-e AWS_DEFAULT_REGION=ap-southeast-1 \
rtsp/aws-cli
docker exec aws-cli aws s3 ls
docker exec -it aws-cli bash
WARNING: This will leave your keys in the running pod.
---
apiVersion: v1
kind: Pod
metadata:
name: aws-cli
spec:
containers:
- name: aws-cli
image: rtsp/aws-cli:latest
env:
- name: AWS_ACCESS_KEY_ID
value: AKIAXXXX
- name: AWS_SECRET_ACCESS_KEY
value: XXXX
- name: AWS_DEFAULT_REGION
value: ap-southeast-1
kubectl exec aws-cli -- aws s3 ls
kubectl exec -it aws-cli -- bash
WARNING: This will leave your keys in the running pod.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-cli
spec:
replicas: 1
selector:
matchLabels:
name: aws-cli
template:
metadata:
labels:
name: aws-cli
spec:
containers:
- name: aws-cli
image: rtsp/aws-cli:latest
imagePullPolicy: Always
env:
- name: AWS_ACCESS_KEY_ID
value: AKIAXXXX
- name: AWS_SECRET_ACCESS_KEY
value: XXXX
- name: AWS_DEFAULT_REGION
value: ap-southeast-1
kubectl exec deployment/aws-cli -- aws s3 ls
kubectl exec -it deployment/aws-cli -- bash
- Docker Hub: rtsp/aws-cli
- GitHub: ghcr.io/rtsp/docker-aws-cli