【发布时间】:2026-01-17 01:25:01
【问题描述】:
我正在编写一个 cft 来连接 dynamodb uisng vpcEndpoint。
DynamoDBEndpoint:
Type: "AWS::EC2::VPCEndpoint"
Properties:
RouteTableIds:
- !Ref PublicRouteTable
- !Ref Private0RouteTable
- !Ref Private1RouteTable
- !Ref Private2RouteTable
ServiceName:
!Sub "com.amazonaws.${AWS::Region}.dynamodb"
VpcId: !Ref VPC
Parameters:
vpcId:
Description: Choose the existing one
Type: AWS::EC2::VPC::Id
我通过使用参数获取现有的 vpcId,有什么办法可以利用我现有的路由表,请建议我如何定义这个 ref PublicRouteTable 和 ref PrivateRouteTable。
【问题讨论】:
-
您到底遇到了什么错误?此外,您提供的模板无效。
-
嗨,我只想知道我应该如何获得这个 routetableId ?
-
您将它们作为输入参数传递给您的模板。
-
我将如何通过?你能提一下吗,因为我没有像 vpc 这样的 Id。
-
你必须事先知道ID。从您的问题中不清楚您真正要实现什么。如果您没有路由 ID,您希望如何在模板中使用它们?
标签: amazon-cloudformation aws-cloudformation-custom-resource