码迷,mamicode.com
首页 > 其他好文 > 详细

[AWS DA Guru] S3

时间:2021-05-03 12:56:01      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:style   div   ges   The   setting   png   load   source   image   

S3 File Size

  • Single S3 Object can range in size from 0 bytes to 5TB
  • Largest object that can be uploaded in a single PUT request is 5GB
  • For Objects larger than 100MB, customers should consider using Multipart upload capability.
  • Total volume of data and number of object you can store are unlimited

 

技术图片

 

技术图片

 

Bucket policies

Applied at Bucket Level

The permissions granted by the policy apply to all of the objects within the bucket.

Not Individual Objects

You cannot attach a bucket policy to an individual object.

Groups of Files

A group of files which need to be accessed by the same people

 

技术图片

Principal: "*": Anyone can access.

 

S3 Bucket Access Control Lists (Bucket ACLs)

Access Control List

  • Applied at an object Level
  • We can define permissions for different objects within a bucket

Grant Access to Objects

  • We can define which accounts or groups are granted access and also the type of access. e.g. read, write, or full control.

Fine Grained Control

  • Grant a different type of access to different objects within the same bucket.
  • E.g to apply different permissions for different objects for different users and groups.

 

技术图片

 

Enforcing Server Side Encryption

Console

Select the encryption setting in your S3 bucket. The easiest way, just a check box in the console

Bucket Policy

You can also enforce encryption using a bucket policy. This mothod does sometimes come up in exam.

 

x-amz-server-side-encryption

技术图片

技术图片

{
  "Id": "Policy1619722202508",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1619722201204",
      "Action": [
        "s3:PutObject"
      ],
      "Effect": "Deny",
      "Resource": "arn:aws:s3:::jtrterweqwerthyuyetwrwrt/*",
      "Condition": {
        "StringNotEquals": {
          "s3:x-amz-server-side-encryption": "aws:kms"
        }
      },
      "Principal": "*"
    }
  ]
}

What it does, Deny request if PUT request header doesn‘t have 

x-amz-server-side-encryption: aws:kms

Upload file:

技术图片 

Type have to be aws:kms because we have defined in JSON.

 

CORS

技术图片

 

CloudFront

技术图片

 

TTL

技术图片

How to change default TTL: Using Invalidations to remove cache, you will be charged for this.

技术图片

 


 

 

技术图片

 

技术图片

 

技术图片

 

技术图片

 

[AWS DA Guru] S3

标签:style   div   ges   The   setting   png   load   source   image   

原文地址:https://www.cnblogs.com/Answer1215/p/14716445.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!