其他分享
首页 > 其他分享> > [AWS DA Guru] S3

[AWS DA Guru] S3

作者:互联网

S3 File Size

 

 

 

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

Grant Access to Objects

Fine Grained Control

 

 

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.

 


 

 

 

 

 

 

Amazon recommends that you use multipart uploading for the following use-cases:

If you're uploading large objects over a stable high-bandwidth network, use multipart uploading to maximize the use of your available bandwidth by uploading object parts in parallel for multi-threaded performance.

If you're uploading over a spotty network, use multipart uploading to increase resiliency to network errors by avoiding upload restarts.

You need to use multi-part upload for large files: In general, when your object size reaches 100 MB, you should consider using multipart uploads instead of uploading the object in a single operation.

 

A Single put request max size is 5 GB, but multi-part uplaod can accumlate multi 5 GB upload.

 

标签:use,Guru,S3,AWS,object,uploading,different,objects,bucket
来源: https://www.cnblogs.com/Answer1215/p/14716445.html