【问题标题】:Easiest way to retrieve snapshot time stamp and ID from AWS in python?在 python 中从 AWS 检索快照时间戳和 ID 的最简单方法?
【发布时间】:2018-10-28 05:33:05
【问题描述】:

我正在尝试使用此代码 (AWS Lambda - Copy EC2 Snapshot automatically between regions?) 自动将快照备份的副本传递到不同的区域。

我曾尝试在 python 中使用 boto3 库,但我不断收到此错误:

EndpointConnectionError: Could not connect to the endpoint URL: "https://ec2.us-east-1a.amazonaws.com/"

使用此代码:

client = boto3.client('ec2')

client.describe_snapshots(OwnerIds=['self'])

我已确保我的配置文件具有正确的安全密钥。不知道我还能做些什么来检索我需要的信息。

【问题讨论】:

    标签: python amazon-web-services


    【解决方案1】:

    配置文件是这样的:

    region=us-east-1a
    

    改为:

    region=us-east-1
    

    适用于其他地区。(example region=us-east-2c is region=us-east-1)

    【讨论】:

      猜你喜欢
      • 2019-05-29
      • 1970-01-01
      • 1970-01-01
      • 2017-03-06
      • 2020-04-09
      • 2018-07-14
      • 1970-01-01
      • 2020-05-10
      • 2010-09-19
      相关资源
      最近更新 更多