โข VPCs & Subnets
โข Route Tables
โข Internet Gateway
โข NAT Gateways & Instances
โข Security Groups
โข Network Access Control Lists
โข VPC Peering
{ 1/14 }
Maybe you didn't know, but Amazon ๐ฉirtual ๐ฃrivate ๐กetwork is the networking layer for EC2.
This virtual network imitates your local data center, but with all the benefits of the cloud's scalable infrastructure.
Knowing about VPC & networking is crucial.
{ 2/14 }
๐ฉ๐ฃ๐๐ & ๐ฆ๐๐ฏ๐ป๐ฒ๐๐
A VPC is a logically isolated network where you can launch resources like Lambda functions or EC2 instances into.
You can also:
โข specify IP ranges
โข add subnets
โข associate security groups
โข configure route tables
{ 3/14 }
For subnets, we separate ๐ฝ๐๐ฏ๐น๐ถ๐ฐ & ๐ฝ๐ฟ๐ถ๐๐ฎ๐๐ฒ subnets. Public subnets are for resources that need access to the internet - private subnets are for resources that only need internal access.
๐ก Some resources can only live in private subnets (e.g. ElastiCache)
{ 4/14 }
Resources in each subnet can be protected with ๐บ๐๐น๐๐ถ๐ฝ๐น๐ฒ ๐น๐ฎ๐๐ฒ๐ฟ๐ ๐ผ๐ณ ๐๐ฒ๐ฐ๐๐ฟ๐ถ๐๐.
๐ก Your AWS account (created after the end of 2013) comes with a ๐ฑ๐ฒ๐ณ๐ฎ๐๐น๐ VPC!
{ 5/14 }
๐ฅ๐ผ๐๐๐ฒ ๐ง๐ฎ๐ฏ๐น๐ฒ๐
Traffic inside your VPC needs direction. That's what Route Tables are for.
Those are sets of rules which you can associate with a subnet. Each Route Table needs a ๐ฑ๐ฒ๐๐๐ถ๐ป๐ฎ๐๐ถ๐ผ๐ป and ๐๐ฎ๐ฟ๐ด๐ฒ๐ which defines how traffic is routed.
{ 6/14 }
The ๐ฑ๐ฒ๐๐๐ถ๐ป๐ฎ๐๐ถ๐ผ๐ป is a set of IP addresses to where you want to direct your traffic, defined as a Classless Inter-Domain Routing (CIDR) block.
The ๐๐ฎ๐ฟ๐ด๐ฒ๐ is either a gateway, network interface, or connection that your subnet should send the traffic to.
{ 7/14 }
If you didn't assign your own route table to a subnet, is implicitly assigned to the ๐บ๐ฎ๐ถ๐ป ๐ฟ๐ผ๐๐๐ฒ ๐๐ฎ๐ฏ๐น๐ฒ.
There are a lot more key concepts to know for route tables that are well-documented at AWS.
โข it comes with an internet gateway
โข the default subnet is ๐ฝ๐๐ฏ๐น๐ถ๐ฐ - resources there use the internet gateway for accessing the internet
โข your default subnets resources have a private & public IPv4 address
{ 9/14 }
An internet gateway is not the only way of enabling access to the world
You can also use a ๐กetwork ๐ddress ๐งranslations (๐ก๐๐ง) device. It maps multiple of your private IPv4 addresses to a single public IPv4.
๐ก It also prevents unsolicited inbound connections.
{ 10/14 }
There are two different types of NAT devices at AWS:
โข NAT ๐๐ฎ๐๐ฒ๐๐ฎ๐* - an AWS managed gateway
โข NAT ๐๐ป๐๐๐ฎ๐ป๐ฐ๐ฒ - your own NAT device, running on an EC2 instance
* You're paying for each running ๐ต๐ผ๐๐ฟ & ๐ฒ๐ฎ๐ฐ๐ต ๐๐ ๐ผ๐ณ ๐ฑ๐ฎ๐๐ฎ that is processed!
ACLs define ๐ฎ๐น๐น๐ผ๐ and/or ๐ฑ๐ฒ๐ป๐ rules. Evaluation starts with the lowest rule number - the first match is used.
๐ก ACLs are stateless => return traffic must be ๐ฒ๐ ๐ฝ๐น๐ถ๐ฐ๐ถ๐๐น๐ allowed by rules.
{ 13/14 }
๐ฉ๐ฃ๐ ๐ฃ๐ฒ๐ฒ๐ฟ๐ถ๐ป๐ด
Peering connections allow you to route traffic between two VPCs as if they were in the same VPC. It also allows you to not only connect to VPCs in other regions but also in other AWS accounts.
๐ก CIDR blocks for your VPCs can't overlap!
{ 14/14 }
VPC & networking are huge topics and this was just an introduction to some important parts ๐
Learn more by exploring the docs and more important by getting hands-on practice! ๐จโ๐ป
Retweet & like the initial post if you enjoyed reading this & follow me for more cloud content ๐ค
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
There's a lot that comes out of the box to gain insights into how well your serverless app is performing
A quick overview to get you started โ
1๏ธโฃ Amazon CloudWatch
CloudWatch automatically monitors your functions on your behalf. It reports a lot of useful metrics:
โข number of invocations
โข execution durations
โข occurred errors
โข function throttles
Everything is exposed on a function level!
2๏ธโฃ Amazon CloudTrail
CloudTrail offers you governance, compliance & auditing features for several services, including Lambda.
It enables you to log all (encryption supported!) actions taken regarding your infrastructure, regardless if it's via the console UI or AWS SDK!
โข Introduction
โข Importance of Messaging Systems
โข Fundamentals
โข Queue Types
โข Visibility Timeouts
โข Retention Periods
โข Limitations
{ 1/22 }
๐๐ป๐๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป
Believe it or not: SQS was the ๐ณ๐ถ๐ฟ๐๐ publicly launched service by AWS!
Quoting Jeff Bar:
"We launched the Simple Queue Service in ๐น๐ฎ๐๐ฒ ๐ฎ๐ฌ๐ฌ๐ฐ, Amazon S3 in early 2006, and Amazon EC2 later that summer."
Thanks for all your interest in my AWS 1x1 threads! ๐ ๐
The good news: ๐๐ต๐ฒ๐ฟ๐ฒ'๐ ๐ฎ ๐น๐ผ๐ ๐บ๐ผ๐ฟ๐ฒ ๐ถ๐ป ๐๐ต๐ฒ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ!
... also for Azure ๐
Didn't see the previous ones yet?
๐๐ถ๐ป๐ธ๐ ๐๐ผ ๐ฎ๐น๐น ๐บ๐ ๐ฟ๐ฒ๐ฐ๐ฒ๐ป๐ ๐ฝ๐ผ๐๐๐ ๐ฎ๐ฟ๐ฒ ๐ฏ๐ฒ๐น๐ผ๐ โ
โข Fan-in & Fan-out
โข Simple Web Service
โข Publish/Subscribe
โข Strangler
โข Aggregator
{ 1/7 }
๐๐ฎ๐ป-๐ถ๐ป & ๐๐ฎ๐ป-๐ผ๐๐
Common problem: large tasks that are exceeding Lambda's execution time limit
With Fan-out, you're splitting those large tasks into small ones and delegating those to Lambda workers.
Afterward, results are aggregated (= Fan-in).
๐๐ฒ๐'๐ ๐ฏ๐ฒ ๐ต๐ผ๐ป๐ฒ๐๐: generally, debugging is not a fun task ๐คข
Especially for serverless, event-driven & distributed systems.
From Lambda's logging basics to ๐๐ฎ๐๐ถ๐ป๐ด ๐๐ถ๐บ๐ฒ & ๐ป๐ฒ๐ฟ๐๐ฒ๐ โ
Lambda's a serverless technology provided by AWS.
But that ๐ฑ๐ผ๐ฒ๐๐ป'๐ ๐บ๐ฒ๐ฎ๐ป that there are no servers.
In the background, there are countless micro-containers running on top of the traditional servers.
Where do all the logs of those containers go to?
By default, they will end up in CloudWatch.
Every Lambda will receive its own ๐น๐ผ๐ด ๐ด๐ฟ๐ผ๐๐ฝ.
Like a repository for logs.
Not only that, every micro-container will create a new so-called ๐น๐ผ๐ด ๐๐๐ฟ๐ฒ๐ฎ๐บ.
Think of it as a text file where logs are written to.