zoukankan      html  css  js  c++  java
  • [AWS DA Guru] S3

    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.


    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.

  • 相关阅读:
    js 类型转换学习
    Prototypes in Javascript 收集.__proto__
    不想说作用域scope,因为是scopeTree,
    在家学习 利器 记录每日点滴
    图片切换特效的分析和学习
    js 无缝滚动效果学习
    MySQL 在高并发下的 订单撮合 系统使用 共享锁 与 排他锁 保证数据一致性
    (二)区块链的共识算法:PoS 及其 例子 代码 实现
    以太坊: ETH 发送交易 sendRawTransaction 方法数据的签名 和 验证过程
    Golang 的 协程调度机制 与 GOMAXPROCS 性能调优
  • 原文地址:https://www.cnblogs.com/Answer1215/p/14716445.html
Copyright © 2011-2022 走看看