{"id":1627,"date":"2016-03-31T10:00:45","date_gmt":"2016-03-31T09:00:45","guid":{"rendered":"http:\/\/www.tekhead.org\/blog\/?p=1627"},"modified":"2016-10-09T16:39:49","modified_gmt":"2016-10-09T15:39:49","slug":"amazon-aws-tips-and-gotchas-part-4-direct-connect-public-private-vifs","status":"publish","type":"post","link":"https:\/\/tekhead.it\/blog\/2016\/03\/amazon-aws-tips-and-gotchas-part-4-direct-connect-public-private-vifs\/","title":{"rendered":"Amazon AWS Tips and Gotchas \u2013 Part 4 &#8211; Direct Connect &#038; Public \/ Private VIFs"},"content":{"rendered":"<p>Continuing in this series of blog posts taking a bit of a \u201cwarts and all\u201d view of a few Amazon AWS features, below are a handful more tips and gotchas when designing and implementing solutions on Amazon AWS, specific to Direct Connect.<\/p>\n<p class=\"p1\"><span class=\"s1\">For the first post in this series with a bit of background on where it all originated from, see here<\/span>:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/02\/amazon-aws-tips-and-gotchas-part-1\/\" target=\"_blank\">Amazon #AWS Tips and Gotchas \u2013 Part 1<\/a><\/p>\n<p>For more posts in this series, see here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/07\/index-of-tekhead-it-blog-posts-on-amazon-aws\/#gotchas\" target=\"_blank\">Index of AWS Tips and Gotchas<\/a><\/p>\n<h5 class=\"p1\"><span class=\"s1\"><b>Tips and Gotchas \u2013 Part 4<\/b><\/span><\/h5>\n<h6><strong>10. VPC Private \/ Public Access Considerations<\/strong><\/h6>\n<p>If you have gone out and bought a shiny new Direct Connect to your AWS platform, you might reasonably assume that all of the users and applications on your MPLS will automatically start using this for accessing S3 content and other AWS endpoints. Unfortunately, this is not so simple!<\/p>\n<p>At a high level, here is a diagram showing the <a href=\"http:\/\/docs.aws.amazon.com\/directconnect\/latest\/UserGuide\/Welcome.html\" target=\"_blank\">two primary Direct Connect configurations<\/a>, Public and Private:<\/p>\n<p><a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws1.png\" rel=\"attachment wp-att-1654\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1654\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws1.png\" alt=\"AWS Direct Connect Public and Private VIF\" width=\"294\" height=\"451\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws1.png 471w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws1-98x150.png 98w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws1-196x300.png 196w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/a>More Info on Direct Connect here:<br \/>\n<a href=\"http:\/\/www.slideshare.net\/AmazonWebServices\/aws-direct-connect-50257534?next_slideshow=1\" target=\"_blank\"> AWS Direct Connect by Camil Samaha<\/a><\/p>\n<p>A key point to note about Direct Connect is that it supports multiple VIFs per 1Gbps or 10Gbps link:<\/p>\n<p><a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws2.png\" rel=\"attachment wp-att-1655\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1655\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws2.png\" alt=\"aws2\" width=\"450\" height=\"226\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws2.png 575w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws2-150x75.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws2-300x151.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a>If you are not a giant enterprise and don&#8217;t need this kind of bandwidth, you can buy single VIFs from your preferred network provider, but you will pay for it on a per-VIF basis and as such multiple VPCs Direct Connect access to public endpoints will bump up your costs a bit.<\/p>\n<p>The question therefore becomes, what is the cost-effective and simple solution to access service endpoints (such as S3 in the examples below), when you also want to access your private resources in your own VPCs?<\/p>\n<p>This is not always a straight forward answer if you are on a tight budget.<\/p>\n<h6><strong>Accessing S3 via your Direct Connect<\/strong><\/h6>\n<p>As I understand it, the S3 endpoint acts very much like VPC peering, only it is from your VPC to S3, and is therefore subject to similar restrictions. Specifically, the <a href=\"http:\/\/docs.aws.amazon.com\/AmazonVPC\/latest\/UserGuide\/vpc-endpoints.html#vpc-endpoints-s3\" target=\"_blank\">S3 endpoint documentation<\/a> has a very key statement:<\/p>\n<p>\u201c<em>Endpoint connections cannot be extended out of a VPC. Resources on the other side of a VPN connection, a VPC peering connection, an AWS Direct Connect connection, or a ClassicLink connection in your VPC cannot use the endpoint to communicate with resources in the endpoint service\u201d<\/em>.<\/p>\n<p>Basically this means for every VPC you want to communicate with directly from your MPLS, you need another VIF, and hence another connection from your service provider. If you want to access S3 services and other AWS public endpoints directly, you will also need an additional connection dedicated to that. This assumes your requirements are not enough to justify buying a 1Gbps \/ 10Gbps pipe for your sole use, and are using a partner to deliver it. If you can buy 1Gbps or above then you can subdivide your pipe into multiple VIFs for little \/ no extra cost.<\/p>\n<p>Here are four example \/ potential solutions for different use cases, but they are definitely <em>NOT<\/em> all recommended or supported.<\/p>\n<ul>\n<li>Assuming you are using a <em>Private<\/em> VIF, then <em>by default<\/em>, the content in S3 is actually accessed over the internet (e.g. using HTTPS if you bucket is configured as such):<br \/>\nThis may come as a surprise to people, as you would expect to buy a connection and access any AWS service.<a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws3.png\" rel=\"attachment wp-att-1656\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1656\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws3.png\" alt=\"AWS Direct Connect Private VIF\" width=\"451\" height=\"217\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws3.png 794w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws3-150x72.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws3-300x144.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><\/li>\n<\/ul>\n<ul>\n<li>If you have a Direct Connect from your MPLS into Amazon as a <em>Public <\/em>connection \/ VIF you can then route to the content over your Direct Connect, however this means you are bypassing your VPC and going straight into Amazon.<br \/>\nThis is a bit like having a private internet connection, so accessing VPCs etc securely would still require you run an IPsec VPN over the top of your \u201cpublic\u201d connection. This will work fine and will mean you can maximise the utilisation of the bandwidth on your direct connect, reduce your Direct Connect costs by sharing one between all VPCs. This is OK, but frankly not brilliant as you are ultimately still depending on VPNs to secure your data. If you want very secure, private access to your VPCs, you should really just spend the money! \ud83d\ude42<a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws4.png\" rel=\"attachment wp-att-1657\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1657\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws4.png\" alt=\"AWS Direct Connect Public VIF\" width=\"451\" height=\"217\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws4.png 794w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws4-150x72.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws4-300x144.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><\/li>\n<li>If you have a Direct Connect from your MPLS into Amazon as a <em>Private<\/em> connection \/ VIF, you <em>could<\/em> proxy the connectivity to S3 via an EC2 instance. The content is requested by your instance using the standard S3 API and forwarded back to your clients. This means your EC2 instance is now a bottleneck to your S3 storage, and if you want to avoid it becoming a SPoF, you need at least a couple of them.<br \/>\nIt is worth specifically noting that although <em>technically possible<\/em>, this method would be strictly <strong><em>against all support and recommendations from AWS<\/em><\/strong>! S3 Endpoints and VPC peers are for accessing content <em>from your VPCs<\/em>, <a href=\"http:\/\/docs.aws.amazon.com\/AmazonVPC\/latest\/PeeringGuide\/invalid-peering-configurations.html#edge-to-edge-vgw\" target=\"_blank\">they are <em>NOT<\/em> meant to be transitive<\/a>.<a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws5.png\" rel=\"attachment wp-att-1658\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1658\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws5.png\" alt=\"AWS Direct Connect Private VIF\" width=\"451\" height=\"217\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws5.png 794w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws5-150x72.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws5-300x144.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><\/li>\n<\/ul>\n<ul>\n<li>Lastly, Amazon\u2019s primary recommended method is to run multiple VIFs, mixing both public and private. This biggest downside here is that each VIF will likely have a specific amount of bandwidth associated with it and you will have to procure multiple connections from your provider (unless you are big enough to need to buy a minimum of 1 Gbps!).<a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws6.png\" rel=\"attachment wp-att-1659\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1659\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws6.png\" alt=\"AWS Direct Connect Public and Private VIFs\" width=\"451\" height=\"217\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws6.png 794w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws6-150x72.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/aws6-300x144.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><\/li>\n<\/ul>\n<p>As this scales to many accounts, many VPCs and many VIFs, things also start to get a bit complex when it comes to routing (especially if you want many or all of the VPCs in question to be able to route to eachother), and I will cover that in the next post.<\/p>\n<p>Until then&#8230;<\/p>\n<p class=\"p1\"><a href=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/networking1.jpg\" rel=\"attachment wp-att-1786\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1786\" src=\"http:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/networking1-288x300.jpg\" alt=\"AWS Direct Connect VIF networking\" width=\"225\" height=\"234\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/networking1-288x300.jpg 288w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/networking1-144x150.jpg 144w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/networking1.jpg 460w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a>Find\u00a0more posts in this series here:<br \/>\n<a href=\"http:\/\/www.tekhead.org\/tag\/awsgotchas\/\" target=\"_blank\">http:\/\/www.tekhead.org\/tag\/awsgotchas\/<\/a><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"M9SjGlX3Uq\"><p><a href=\"https:\/\/tekhead.it\/blog\/2016\/08\/amazon-aws-tips-and-gotchas-part-5-managing-multiple-vpcs\/\">Amazon AWS Tips and Gotchas \u2013 Part 5 \u2013 Managing Multiple VPCs<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Amazon AWS Tips and Gotchas \u2013 Part 5 \u2013 Managing Multiple VPCs&#8221; &#8212; Tekhead.it\" src=\"https:\/\/tekhead.it\/blog\/2016\/08\/amazon-aws-tips-and-gotchas-part-5-managing-multiple-vpcs\/embed\/#?secret=V6Al6A8LzO#?secret=M9SjGlX3Uq\" data-secret=\"M9SjGlX3Uq\" width=\"590\" height=\"332\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing in this series of blog posts taking a bit of a \u201cwarts and all\u201d view of a few Amazon AWS features, below are a handful more tips [..]<\/p>\n","protected":false},"author":1,"featured_media":1549,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Direct Connect","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"AWS is awesome, but this series describes common issues you may come across and provides tips, workarounds & fixes. Part 4 covers AWS Direct Connect & VIFs.","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New Blog Post: #Amazon #AWS Tips and Gotchas \u2013 Part 4 - Direct Connect & Public \/ Private VIFs #cloud","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[688,725],"tags":[270,709,699,706,707,785,223,718,57,703,719,190,720,548,710,713,66,56,717,721],"class_list":["post-1627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-cloud","tag-amazon","tag-architecture","tag-aws","tag-awsgotchas","tag-awstips","tag-bgp","tag-cloud","tag-direct-connect","tag-education","tag-igw","tag-mpls","tag-networking","tag-routing","tag-security","tag-solution-architect","tag-tags","tag-tips","tag-training","tag-vpc","tag-vpc-peering"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/amazon-web-services-logo.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2l3lU-qf","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/comments?post=1627"}],"version-history":[{"count":1,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1627\/revisions"}],"predecessor-version":[{"id":1905,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1627\/revisions\/1905"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media\/1549"}],"wp:attachment":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media?parent=1627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/categories?post=1627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/tags?post=1627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}