I'm quite happy with the speed of aws cli
But can't seem to find a way to find out what the permissions are on a file/folder.
E.g. I do:
$ curl http://my.s3.amazonaws.com/deploy/tool1/license.key -o ./license.key
$ cat license.key | sed 's/></>\n</g'
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>E4D50F0606FFFD48</RequestId>
<HostId>+xxxyyyaaaa=</HostId>
$
$
Now curl http://my.s3.amazonaws.com/deploy/tool1/tool.sh -o ./tool.sh
works just fine and I can get the tool.sh
. So I suspect teh permissions on license.key
to be the problem.
In order to get the permissions on a file in S3 with the CLI, use the get-object-acl
command of s3api
(full documentation http://docs.aws.amazon.com/cli/latest/reference/s3api/get-object-acl.html)
Using your example:
$ aws s3api get-object-acl \
--bucket my \
--key deploy/tool1/license.key
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With