zoukankan      html  css  js  c++  java
  • aws安装

    1 在Python虚拟环境中安装 AWS CLI  

    pip install awscli --user

    2  查看当前版本

    aws --version

    3  卸载

    pip uninstall awscli

    4  配置 AWS CLI

    aws configure

    填写 id , secret 和region , [以下是瞎填的]
    AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
    AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    Default region name [None]: us-east-2
    Default output format [None]: json
    然后可以去这里更改: 
    vi ~/.aws/config

    vi .aws/credentials

    5 访问s3: 需要输入endpoint

    每次需要输入  aws s3 --endpoint=http://***** --profile sh "$@" ls s3://

    很麻烦, 可以设置为 aws-sh=aws s3 --endpoint=http://pub-shyc2.s3.addops.soft.360.cn --profile sh "$@"

    之后就可以通过aws-sh ls s3://***来查看s3了.

    6  s3命令

    • aws-sh ls s3://***
    • aws-sh cp fileName s3://***/fileName  [复制文件]
    • aws-sh cp --recursive filePath s3://***/filePath  [ 复制目录i]
    • aws-sh rm s3://*** 删除
    • 从s3获取 aws-sh cp s3://***/fileName ./
    
    
  • 相关阅读:
    2020/10/10周总结
    2020/10/02周总结
    2020/9/28周总结
    第十二周总结
    第十一周总结
    人月神话阅读笔记03
    人月神话阅读笔记02
    人月神话阅读笔记01
    冲刺一8
    冲刺一7
  • 原文地址:https://www.cnblogs.com/Lee-yl/p/14238251.html
Copyright © 2011-2022 走看看