Is there a way to create presigned URL for objects in S3 bucket using AWS CLI?
I know that could be done using SDK, but is it possible with CLI?
I found this on one of the AWS docs, but can't complete the command:
s3cmd signurl s3://BUCKET/OBJECT <expiry_epoch|+expiry_offset>
Any help?
So the command for pre-signed URL is:
But the caveat is; we can have pre-signed URL's that works for individual file/object level and not on directory level.
Happy to be corrected if wrong.
Wildcards are now supported.
E.g.
aws s3 presign s3://mybucket/*
Did you try aws s3 presign?
This will generate a URL that will expire in 3600 seconds (default)
This will generate a URL that will expire in 300 seconds
Output
@Michael and @Shabbir,
Yes,
aws s3 presign
does not accept globbing/wildcards/,--include
,--exclude
, or--recursive'. aws
lsdoes not accept
-1; it behaves as
ls -lpor
ls -lph`.a loop works: