AWS/S3 Bucket Policies
< AWS
Jump to navigation
Jump to search
Working with JSON
Download Notepad++ plugin nppjsonviewer. Install the plugin by just dropping the DLL in the plugin folder. You can also use Plugin Manager bu going to Plugins > Plugin Manager > Show Plugin Manager > find JSON Viewer last current version 1.21.
Plugin shows the JSON in a tree format in a separate frame, it also formats JSON in a readable format in the main Notepad++ window. To format a JSON string, paste it into Notepad++ and select it. Then go to Plugins > JSON Viewer > Format JSON [Ctrl+Alt+Shift+M] and it should instantly format it for you, then choose Show JSON Viewer [Ctrl+Alt+Shift+J]
Example Policy
A sample AWS IAM json policy file with read-only access to certain S3 buckets. Formatted by JSON Viewer in NP++
{ "Statement": [{ "Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetObject", "s3:GetObjectVersion"], "Resource": ["arn:aws:s3:::my_bucket/*", "arn:aws:s3:::my_bucket"] }], "Statement": [{ "Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetObject", "s3:GetObjectVersion"], "Resource": ["arn:aws:s3:::my_other_bucket/*", "arn:aws:s3:::my_other_bucket"] }], "Statement": [{ "Effect": "Allow", "Action": ["s3:ListAllMyBuckets"], "Resource": "*", "Condition": { } }] }