|
Size: 1358
Comment:
|
Size: 1358
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 15: | Line 15: |
| docker run --rm -p 5000:5000 --name moto motoserver/moto:latest | docker run --rm -p 4000:4000 --name moto motoserver/moto:latest |
moto
A python library that allows you to easily mock out tests based on AWS infrastructure.
Create S3 bucket
compose.yaml
1 docker compose up
2 # Install aws cli
3 cd ~/Downloads
4 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
5 unzip awscliv2.zip
6 sudo ./aws/install
7 aws --version
8 export AWS_ENDPOINT_URL="http://localhost:4000"
9
10 aws s3 ls
11 aws s3api create-bucket --bucket my-bucket
12 # https://docs.aws.amazon.com/cli/latest/reference/s3api/
13 echo "test" > test.txt
14 aws s3api put-object --bucket my-bucket --key dir-1/test.txt --body test.txt
15 aws s3api get-object --bucket my-bucket --key dir-1/test.txt test2.txt
16 cat test2.txt
