티스토리 뷰

공부

[aws] s3 mkdir

승가비 2023. 1. 7. 14:55
728x90
S3=s3://bucket/asdf/

BUCKET=`echo ${S3} | egrep -o 's3://[^/]*' | sed -e s/s3:\\\\/\\\\///g`
KEY=`echo ${S3} | sed -e s/s3:\\\\/\\\\/${BUCKET}\\\\///g`

aws s3api put-object --bucket ${BUCKET} --key ${KEY}

https://stackoverflow.com/questions/36837975/how-to-create-folder-on-s3-from-ec2-instance

 

How to create folder on S3 from Ec2 instance

I want to create folder in S3 bucket from Ec2 instacne . I tried the put object but its not working . Is there any way of creating folder on s3 from ec2 instace using cli.

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[python] random.randomrange(start, end, interval)  (0) 2023.01.07
[aws] s3 lifecycle  (0) 2023.01.07
[aws] s3 bucket list  (0) 2023.01.07
[airflow] `(reached max retries: 4): Rate exceeded`  (0) 2023.01.07
[aws] s3 delete files  (0) 2023.01.06
댓글