aws checking on all the permission associated to a resource
How do you get all the permission granted to an AWS resources for example a storage s3 bucket? We can use the following commands.
For the ACL, it asks AWS to tell you the legacy permissions attached directly to that bucket. It shows who owns the bucket and which AWS accounts or public groups have been granted specific read or write permissions via the ACL system.
// To get bucket access control list
aws s3api get-bucket-acl --bucket appjerwo-demo-test
aws s3api get-bucket-policy --bucket appjerwo-demo-test
This is an example of the bucket policy :-
Unfortunately there is no clean way of reusing the command across different resources such as SQS.
So for sqs you probably need to use
aws sqs get-queue-attributes --queue-url https://sqs.ap-southeast-2.amazonaws.com/xxxxxxxxxxxx/mytestsqs --attribute-names Policy --query Attributes.Policy --output text --region ap-southeast-2
Comments