AWS S3 [ Simple Storage Service ]

 

Amazon S3 [ Simple Storage Service ]

 

aws s3 help 

aws s3api 

 

一、AWS S3

  1、Managing Buckets 

    High-level aws s3 commands support commonly used bucket operations, such as creating, removing, and listing buckets.

 

    $aws s3 mb  s3://bucket_name   # create buckets 

    $aws s3 rb s3://bucket_name      # remove buckets  [ the bucket must be empty  ]

    $aws s3 rb   s3://bucket_name --force # remove buckets

    $aws s3 ls              # list buckets

      CreationTime Bucket

      $aws s3 ls s3://bucket_name

    

  2、Managing Objects

    The high-level aws s3 commands make it convenient to manage Amazon S3 objects as well.

    The object commands include aws s3 cpaws s3 lsaws s3 mvaws s3 rm, and sync. The cplsmv, and rm commands work similarly to their Unix counterparts and enable you to work seamlessly across your local directories and Amazon S3 buckets.

    The sync command synchronizes the contents of a bucket and a directory, or two buckets.

   

   Note

    All high-level commands that involve uploading objects into an Amazon S3 bucket (aws s3 cpaws s3 mv, and aws s3 sync) automatically perform a multipart upload when the object is large.    

    Failed uploads cannot be resumed when using these commands. If the multipart upload fails due to a timeout or is manually cancelled by pressing CTRL+C, the AWS CLI cleans up any files created and aborts the upload. This process can take several minutes.

    If the process is interrupted by a kill command or system failure, the in-progress multipart upload remains in Amazon S3 and must be cleaned up manually in the AWS Management Console or with the s3api abort-multipart-upload command.

  

  $aws cp /  mv / sync  + --grants Permission=Grantee_Type=Grantee_ID

    Permission :  can be set : read , readacl , writeacl or full

    Grantee_Type : Specifies how grantee is to be identified , 

      can be set : uri , emailaddress , or id

    Grantee_ID : Specifies the grantee based on Grantee_Type

      uri : The group's URI .

      emailaddress : The account's email address

      id : The account's canonical ID 

 

  $aws s3 cp local_path/file_name s3://bucket_name/ --storage-class REDUCE_REDUNANCY

  $aws s3 sync <source> <target> [--options]

     When the --recursive option is used on a directory/folder with cpmv, or rm, the command walks the directory tree, including all subdirectories. These commands also accept the --exclude--include, and --acl options as the sync command does.

 

  

 

转载于:https://www.cnblogs.com/Nancy0401/p/5505947.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值