Amazon S3 Bucket Policies. How to configure Amazon S3 Bucket Policies.
CS Browser
Free Windows client for Amazon S3 and Amazon S3 compatible storage services
 
Follow

Working with Amazon S3 Buckets

Working with Amazon S3 Bucket Policies

A bucket policy is a JSON document that controls access to a bucket and the files it contains. You can grant or deny access based on the requester, action, file path, and optional conditions such as an IP address.

Each bucket has a single bucket policy document. Editing the policy replaces the current document.

To edit an Amazon S3 Bucket Policy

  1. Select the bucket whose policy you want to edit.

  2. Open the Buckets menu and choose Edit Bucket Policy..

    Bucket Policies. Edit Amazon S3 Bucket policies.
    You can also press Ctrl+O to open the Bucket Policy Editor.

    The Bucket Policy Editor dialog will open:

    Amazon S3 bucket policies editor
    Use the Bucket Policy Editor to view, edit, or remove the policy for the selected bucket.
  3. Enter or edit a valid JSON policy, then click Apply.

To remove the current bucket policy, click remove policy, then click Apply. The link clears the editor; the stored policy is deleted only after you apply the change.

See the examples below. For more details, see Policies and permissions in Amazon S3 and the official bucket policy examples.

Examples of Amazon S3 Bucket Policies

Replace the sample bucket name, IAM role, and network range with your own values before applying a policy. Test the result carefully to avoid granting unintended access.

Grant public-read access to files in a folder

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowPublicRead",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-brand-new-bucket/public-folder/*"
    }
  ]
}
This policy makes every file under public-folder publicly readable. Amazon S3 Block Public Access may prevent the policy from being saved or taking effect. Disable it only when anonymous access is intentional.

Grant an IAM role access to a bucket and its files

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowRoleBucketOperations",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::123456789012:role/MyS3Role"
      },
      "Action": [
        "s3:ListBucket",
        "s3:GetBucketLocation"
      ],
      "Resource": "arn:aws:s3:::my-brand-new-bucket"
    },
    {
      "Sid": "AllowRoleFileOperations",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::123456789012:role/MyS3Role"
      },
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::my-brand-new-bucket/*"
    }
  ]
}

Replace the account ID and role name with the ARN of an existing IAM role. Additional permissions may be required for file versions, multipart uploads, or AWS KMS encryption.

Grant public-read access from a specific IP address range

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowAnonymousReadFromSpecificPublicCidr",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-brand-new-bucket/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "192.0.2.0/24"
        }
      }
    }
  ]
}

The range 192.0.2.0/24 is reserved for documentation; replace it with your public network range. This statement does not revoke access granted by other policies.

For requests through an Amazon VPC endpoint, use aws:SourceVpc, aws:SourceVpce, or aws:VpcSourceIp instead of aws:SourceIp.

CS Browser 13.5.5 Freeware
Powered by Amazon Web Services and Rated by CNET Editors!
Social Connection
 
People like CS Browser!
People like us
Our customers say

"CS Browser is an invaluable tool to me as a web developer to easily manage my automated site backups" -Bob Kraft, Web Developer

"Just want to show my appreciation for a wonderful product. I use CS Browser a lot, it is a great tool." -Gideon Kuijten, Pro User

"Thank You Thank You Thank You for this tool. A must have for anyone using Amazon S3!" -Brian Cummiskey, USA

Related Products
RdpGuard
protects your Windows Server from RDP Brute-force Attacks.
CS Browser is developed by Netsdk Software FZE and is not affiliated with, endorsed by, or sponsored by Amazon or AWS. Amazon S3 and Amazon S3 Glacier are trademarks of Amazon.com, Inc. or its affiliates.
Copyright © 2008-2026 Netsdk Software FZE. All rights reserved.  Terms of Use.  Privacy Policy.  Mount Amazon S3 Bucket.  RDP brute-force protection.