- Newest
- Most votes
- Most comments
Hi, I recommend visiting this documentation to understand how routing configured when you are using S3 endpoint type Gateway: https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html#associate-route-tables-s3
The steps taken are a bit different than adding a route to your table. Simply just associate the Gateway with the route table and AWS will take care of adding the routes and influence traffic from VPCs using this route table. So the method using GatewayId isn't for S3 Gateway endpoints.
during the steps of creating the VPC endpoint type Gateway, associate the route table to the Gateway using the property RouteTableIds shown here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-routetableids
If that helped solving the problem, please accept the answer.
Relevant content
asked 4 years ago

Yes the documentation could be improved a lot. The link you provided to the routetableids was not enough to figure it out. The property description provided little usable information about needing to use RouteTableIds for gateway endpoints. A hint maybe, but what was helpful were the examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#aws-resource-ec2-vpcendpoint--examples--Create_a_gateway_endpoint Without that it would haven't been impossible to figure it out from reading the docs.