AWS: S3

S3 is advertised as infinitely scaling storage

S3 Use Cases

  • Backup and storage
  • Disaster Recovery
  • Archive
  • Hybrid Cloud storage
  • Application hosting
  • Media hosting
  • Data lakes & big data analytics
  • Software delivery
  • Static website

Buckets

  • Amazon S3 allows people to store objects(files) in “buckets” (directories)
  • Buckets must have a globally unique name (across all regions all accounts)
  • Buckets are defined at the region level
  • S3 looks like a global service but buckets are created in a region
  • Objects(Files) have a key. The key is the full path:
    • s3://my-bucket/my_file.txt
    • s3://my-bucket/my_folder/anoter_folder/my_file.txt
  • There’s no concept of “directories” within buckets

    Buckets Policies

  • JSON based policies
    • Resources: buckets and objects
    • Actions: Set of API to Allow or Deny
    • Effect: Allow / Deny
    • Principal: The account or user to apply the policy to
      Example:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      {
      "Version": "2012-10-17",
      "Statement": [
      {
      "Sid": "PublicRead",
      "Effect": "Allow",
      "Principal": "*",
      "Action": [
      "s3:GetObject"
      ],
      "Resource": [
      "arn:aws:s3:::examplebucket/*"
      ]
      }
      ]
      }