【发布时间】:2019-01-26 12:18:00
【问题描述】:
我在学习 boto3 时正在尝试做笔记,我想使用 Jupyter。下面的代码在交互式控制台中工作,但它失败了
EndpointConnectionError:无法连接到端点 URL: "https://ec2.Central.amazonaws.com/"
当我在 Jupyter 中尝试时。我怀疑这是因为 Jupyter 无法找到配置和凭据文件,但我不确定,消息并没有完全说明这一点
import boto3
ec2=boto3.resource('ec2')
response = ec2.create_vpc(
CidrBlock='10.0.0.0/16',
)
print(response)
【问题讨论】:
标签: amazon-ec2 jupyter-notebook boto3