V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Oane
V2EX  ›  Amazon Web Services

亚马逊 aws s3 Python 连接

  •  
  •   Oane · 2019-02-14 17:11:58 +08:00 · 2335 次点击
    这是一个创建于 1890 天前的主题,其中的信息可能已经有所发展或是发生改变。

    python3 连接 aws s3 必须先配置 aws cli 吗? 能不能只导入 boto3 包 在代码里写 access_key 和 secret_key,region name? 可以的话 能不能给个 demo

    2 条回复    2019-03-13 13:10:30 +08:00
    Oane
        1
    Oane  
    OP
       2019-02-14 17:35:47 +08:00
    成功了 但是官方是不是不推荐这样写啊
    infra
        2
    infra  
       2019-03-13 13:10:30 +08:00
    也能从配置文件或者环境变量中读 key 吧?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5649 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 01:48 · PVG 09:48 · LAX 18:48 · JFK 21:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.