答案1
这是你要找的:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html
AWS::EC2::VPCEndpoint
AWS::EC2::VPCEndpoint 资源创建一个 VPC 终端节点,您可以使用该终端节点在您的 VPC 和其他 AWS 服务之间建立私有连接,而无需通过 Internet、VPN 连接或 AWS Direct Connect 进行访问。
快速示例:
"S3Enpoint" : {
"Type" : "AWS::EC2::VPCEndpoint",
"Properties" : {
"PolicyDocument" : {
"Version":"2012-10-17",
"Statement":[{
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::examplebucket/*"]
}]
},
"RouteTableIds" : [ {"Ref" : "routetableA"}, {"Ref" : "routetableB"} ],
"ServiceName" : { "Fn::Join": [ "", [ "com.amazonaws.", { "Ref": "AWS::Region" }, ".s3" ] ] },
"VpcId" : {"Ref" : "VPCID"}
}
}