【发布时间】:2020-12-11 03:54:20
【问题描述】:
我正在使用 CDK(打字稿)配置 API 网关,目前我必须使用 HttpIntegration 为在 VPC 下运行的 EC2 实例创建一个端点。
所以我做下一个:
api.root.resourceForPath("/{pathVar}/smth/{pathVar}")
.addMethod("GET",
new HttpIntegration("https://endpoint-from-ec2-under-vpc", {
options: {
connectionType: ConnectionType.VPC_LINK,
vpcLink: ???
}
}), ...
我在哪里可以获得 vpcLink?
我试过这样:
const vpc= VpcLink.fromVpcLinkId(this, "vpc-link", "VpcID");
但在部署过程中——出现错误:Vpc link VpcID was not found in account ********
所以 VpcLinkId 不是 VpcId,那是什么?
我在哪里可以在其他地方的 aws console 矿石中找到它?
【问题讨论】:
标签: typescript amazon-web-services aws-api-gateway amazon-vpc aws-cdk