s3cmd config
s3cmd --configure
host_base = s3files.domain.com
host_bucket = s3.domain.com/%(bucket)s
signature_v2 = True
mb make bucket
s3cmd mb s3://static
put file
s3cmd put a.txt s3://static
acl
set all files of bucket public
s3cmd setacl s3://static/ --acl-public --recursive
# awscli
cat s3.env
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_S3_EDNPOINT_URL=https://s3.domain.com
source s3.env
aws --endpoint-url=${AWS_S3_EDNPOINT_URL} s3 ls
网友评论