AWS Networking and Delivery
This page is about the network around AWS resources: the VPC and its subnets, route tables, gateways, security groups, and network ACLs. Then it covers three more services: Elastic Load Balancing, Route 53, and CloudFront. The practice run checks IP ranges with Python and prints AWS CLI templates, and it needs no AWS account. It comes after AWS Compute and Storage and before AWS Identity and Security.
30 min read30 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 30 sources30টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Why this packet reaches the instanceএই প্যাকেট কেন ইনস্ট্যান্সে পৌঁছায়
Trace a packet from the internet to an instance, then close one gate and see where it stops.ইন্টারনেট থেকে একটা ইনস্ট্যান্স পর্যন্ত প্যাকেটের পথ অনুসরণ করুন, তারপর একটা গেট বন্ধ করে দেখুন সে কোথায় থামে।
You’ll learnআপনি শিখবেন
- An internet gateway alone is not enoughশুধু ইন্টারনেট গেটওয়ে যথেষ্ট নয়
- The 5 reserved addresses of a subnetসাবনেটের 5টা রিজার্ভ অ্যাড্রেস
- A route to the gateway makes a subnet publicগেটওয়ের রুট সাবনেটকে পাবলিক করে
- Network ACL is stateless, security group is statefulnetwork ACL stateless, আর security group stateful
- Each gate is a separate switchপ্রতিটা গেট আলাদা একটা সুইচ
What it is
Amazon VPC. With Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources in a logically isolated virtual network that you've defined Source 1সোর্স 1. A VPC is a virtual network dedicated to your AWS account Source 2সোর্স 2. A subnet is a range of IP addresses in your VPC Source 2সোর্স 2. A subnet must reside in a single Availability Zone Source 1সোর্স 1. You launch AWS resources, such as EC2 instances, into your subnets Source 2সোর্স 2.
Route tables and gateways. A route table serves as the traffic controller for your VPC Source 6সোর্স 6. Each route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed Source 6সোর্স 6. When you create a VPC, AWS also creates the main route table for the VPC Source 6সোর্স 6. Each route specifies a destination, which is a CIDR block or prefix list, and a target Source 6সোর্স 6. Examples of a target are an internet gateway, a NAT gateway, a VPC peering connection, and a VPN connection Source 6সোর্স 6. Traffic is routed to targets based on its destination IP address Source 6সোর্স 6. A gateway connects your VPC to another network. For example, an internet gateway connects your VPC to the internet Source 1সোর্স 1.
Security groups and network ACLs. A security group controls the traffic that is allowed to reach and leave the resources that it is associated with Source 9সোর্স 9. A network access control list (ACL) allows or denies specific inbound or outbound traffic at the subnet level Source 10সোর্স 10.
Elastic Load Balancing. Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones Source 15সোর্স 15. It monitors the health of its registered targets, and routes traffic only to the healthy targets Source 15সোর্স 15.
Amazon Route 53. Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service Source 19সোর্স 19. You can use Route 53 to perform three main functions in any combination: domain registration, DNS routing, and health checking Source 19সোর্স 19.
Amazon CloudFront. Amazon CloudFront is a web service that speeds up distribution of your static and dynamic web content to your users Source 21সোর্স 21. CloudFront delivers your content through a worldwide network of data centers called edge locations Source 21সোর্স 21.
সহজ English
Amazon VPC. With Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources in a logically isolated virtual network that you've defined Source 1সোর্স 1. A VPC is a virtual network dedicated to your AWS account Source 2সোর্স 2. A subnet is a range of IP addresses in your VPC Source 2সোর্স 2. A subnet must reside in a single Availability Zone Source 1সোর্স 1. You launch AWS resources, such as EC2 instances, into your subnets Source 2সোর্স 2.
Route tables and gateways. A route table serves as the traffic controller for your VPC Source 6সোর্স 6. Each route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed Source 6সোর্স 6. When you create a VPC, AWS also creates the main route table for the VPC Source 6সোর্স 6. Each route specifies a destination, which is a CIDR block or prefix list, and a target Source 6সোর্স 6. Examples of a target are an internet gateway, a NAT gateway, a VPC peering connection, and a VPN connection Source 6সোর্স 6. Traffic is routed to targets based on its destination IP address Source 6সোর্স 6. A gateway connects your VPC to another network. For example, an internet gateway connects your VPC to the internet Source 1সোর্স 1.
Security groups and network ACLs. A security group controls the traffic that is allowed to reach and leave the resources that it is associated with Source 9সোর্স 9. A network access control list (ACL) allows or denies specific inbound or outbound traffic at the subnet level Source 10সোর্স 10.
Elastic Load Balancing. Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones Source 15সোর্স 15. It monitors the health of its registered targets, and routes traffic only to the healthy targets Source 15সোর্স 15.
Amazon Route 53. Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service Source 19সোর্স 19. You can use Route 53 to perform three main functions in any combination: domain registration, DNS routing, and health checking Source 19সোর্স 19.
Amazon CloudFront. Amazon CloudFront is a web service that speeds up distribution of your static and dynamic web content to your users Source 21সোর্স 21. CloudFront delivers your content through a worldwide network of data centers called edge locations Source 21সোর্স 21.
বাংলা ব্যাখ্যা
Amazon VPC। Amazon Virtual Private Cloud (Amazon VPC) দিয়ে আপনি AWS resource চালু করতে পারেন একটা logically isolated virtual network-এ, যা আপনি নিজে ঠিক করেছেন Source 1সোর্স 1। VPC হলো আপনার AWS account-এর জন্য নির্দিষ্ট একটা virtual network Source 2সোর্স 2। subnet হলো আপনার VPC-র মধ্যে IP address-এর একটা পরিসর Source 2সোর্স 2। একটা subnet অবশ্যই একটা Availability Zone-এ থাকতে হবে Source 1সোর্স 1। আপনি AWS resource, যেমন EC2 instance, আপনার subnet-এ চালু করেন Source 2সোর্স 2।
Route table আর gateway। একটা route table আপনার VPC-র traffic নিয়ন্ত্রকের কাজ করে Source 6সোর্স 6। প্রতিটা route table-এ কিছু নিয়ম থাকে, যাদের route বলা হয়, আর সেগুলো ঠিক করে আপনার subnet বা gateway থেকে আসা network traffic কোথায় যাবে Source 6সোর্স 6। আপনি একটা VPC বানালে AWS সেই VPC-র জন্য main route table-ও বানায় Source 6সোর্স 6। প্রতিটা route একটা destination ঠিক করে, যা একটা CIDR block বা prefix list, আর একটা target Source 6সোর্স 6। target-এর উদাহরণ হলো একটা internet gateway, একটা NAT gateway, একটা VPC peering connection আর একটা VPN connection Source 6সোর্স 6। traffic তার destination IP address-এর ভিত্তিতে target-এ route হয় Source 6সোর্স 6। gateway আপনার VPC-কে অন্য একটা network-এর সঙ্গে যুক্ত করে। যেমন internet gateway আপনার VPC-কে internet-এর সঙ্গে যুক্ত করে Source 1সোর্স 1।
Security group আর network ACL। একটা security group নিয়ন্ত্রণ করে, যে resource-এর সঙ্গে সেটা যুক্ত তাতে কোন traffic ঢুকতে ও বেরোতে পারবে Source 9সোর্স 9। একটা network access control list (ACL) subnet পর্যায়ে নির্দিষ্ট inbound বা outbound traffic অনুমতি দেয় বা আটকায় Source 10সোর্স 10।
Elastic Load Balancing। Elastic Load Balancing আপনার আসা traffic স্বয়ংক্রিয়ভাবে একাধিক target-এ ভাগ করে দেয়, যেমন EC2 instance, container আর IP address, এক বা একাধিক Availability Zone জুড়ে Source 15সোর্স 15। এটা তার registered target-গুলোর স্বাস্থ্য পর্যবেক্ষণ করে, আর traffic শুধু সুস্থ target-এ পাঠায় Source 15সোর্স 15।
Amazon Route 53। Amazon Route 53 একটা highly available আর scalable Domain Name System (DNS) web service Source 19সোর্স 19। আপনি Route 53 দিয়ে তিনটা প্রধান কাজ করতে পারেন, যেকোনো সমন্বয়ে: domain registration, DNS routing আর health checking Source 19সোর্স 19।
Amazon CloudFront। Amazon CloudFront একটা web service, যা আপনার static আর dynamic web content আপনার user-দের কাছে পৌঁছানো দ্রুত করে Source 21সোর্স 21। CloudFront আপনার content পৌঁছায় edge location নামের data center-এর একটা বিশ্বজোড়া network দিয়ে Source 21সোর্স 21।
How it works
IP ranges. The IP addresses of a VPC are written in Classless Inter-Domain Routing (CIDR) notation Source 4সোর্স 4. When you create a VPC, you must specify an IPv4 CIDR block for it Source 4সোর্স 4. The allowed block size is between a /16 netmask (65,536 IP addresses) and a /28 netmask (16 IP addresses) Source 4সোর্স 4. The CIDR block of a subnet can be the same as the CIDR block for the VPC, or a subset of it Source 5সোর্স 5. If you create more than one subnet in a VPC, the CIDR blocks of the subnets cannot overlap Source 5সোর্স 5. Make sure that the ranges of your VPCs don't overlap with the ranges of your own network Source 3সোর্স 3. For connectivity between multiple VPCs, you must ensure that they have no overlapping IP addresses Source 3সোর্স 3.
The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5. In a subnet with CIDR block 10.0.0.0/24, AWS lists these five reserved addresses Source 5সোর্স 5:
- 10.0.0.0 is the network address, and 10.0.0.1 is reserved by AWS for the VPC router Source 5সোর্স 5.
- 10.0.0.2 is reserved by AWS, and 10.0.0.3 is reserved by AWS for future use Source 5সোর্স 5.
- 10.0.0.255 is the network broadcast address, and AWS reserves it because broadcast is not supported in a VPC Source 5সোর্স 5.
If you create a subnet using a command line tool or the EC2 API, the CIDR block is automatically modified to its canonical form. If you specify 100.68.0.18/18, AWS creates 100.68.0.0/18 Source 5সোর্স 5.
Internet access. Your AWS account includes a default VPC in each AWS Region Source 1সোর্স 1. A default VPC includes an internet gateway, and each default subnet is a public subnet Source 2সোর্স 2. A subnet that is associated with a route table that has a route to an internet gateway is a public subnet. Without that route, it is a private subnet Source 7সোর্স 7. In a public subnet's route table, the route for the internet gateway can be 0.0.0.0/0 for IPv4 or ::/0 for IPv6 Source 7সোর্স 7.
Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3. You must also update the subnet route table with a route to the internet gateway Source 3সোর্স 3. The instances must also have public IP addresses Source 3সোর্স 3. They need an associated security group that allows traffic from the internet over specific ports and protocols Source 3সোর্স 3. By default, an instance in a nondefault subnet has a private IPv4 address but no public IPv4 address Source 2সোর্স 2. You can assign a public address at launch, or modify the subnet's public IP address attribute Source 2সোর্স 2.
A NAT gateway lets instances in a private subnet connect to services outside your VPC Source 8সোর্স 8. External services can't initiate a connection with those instances Source 8সোর্স 8. You create a public NAT gateway in a public subnet, and you must associate an Elastic IP address with it at creation Source 8সোর্স 8. If you don't explicitly associate a subnet with a route table, the subnet is implicitly associated with the main route table Source 2সোর্স 2.
Security groups. The only traffic that reaches the instance is the traffic allowed by the security group rules Source 9সোর্স 9. If the security group does not contain a rule that allows SSH traffic, you could not connect to your instance using SSH Source 9সোর্স 9. Security groups are stateful Source 9সোর্স 9. If you send a request from an instance, the response traffic for that request is allowed to reach the instance Source 9সোর্স 9. This holds regardless of the inbound security group rules Source 9সোর্স 9. Security groups do not filter traffic to and from Amazon DNS, Amazon DHCP, and EC2 instance metadata, among others Source 9সোর্স 9. When you add inbound rules for ports 22 (SSH) or 3389 (RDP), authorize only specific IP address ranges Source 9সোর্স 9. If you specify 0.0.0.0/0 (IPv4) and ::/ (IPv6), this enables anyone to access your instances from any IP address using the specified protocol Source 9সোর্স 9. Rule changes are propagated to instances as quickly as possible, but a small delay might occur Source 14সোর্স 14.
Network ACLs. Each subnet in your VPC must be associated with a network ACL Source 10সোর্স 10. If you don't explicitly associate a subnet with a network ACL, the subnet is automatically associated with the default network ACL Source 10সোর্স 10. A subnet can be associated with only one network ACL at a time Source 10সোর্স 10. Each rule can either allow or deny traffic Source 10সোর্স 10. Each rule has a number from 1 to 32766 Source 10সোর্স 10. AWS evaluates the rules in order, starting with the lowest numbered rule Source 10সোর্স 10. If the traffic matches a rule, the rule is applied, and no additional rules are evaluated Source 10সোর্স 10. Network ACLs are stateless Source 10সোর্স 10. If you create a rule to allow specific inbound traffic to a subnet, responses to that traffic are not automatically allowed Source 10সোর্স 10. AWS evaluates the rules when traffic enters and leaves the subnet, not as it is routed within a subnet Source 10সোর্স 10. Network ACLs can't block traffic to the Instance Metadata Service (IMDS) Source 10সোর্স 10.
AWS says to use security groups as the primary mechanism for controlling network access to your VPCs Source 11সোর্স 11. When necessary, use network ACLs to provide stateless, coarse-grain network control Source 11সোর্স 11.
Application Load Balancer parts. A load balancer serves as the single point of contact for clients Source 16সোর্স 16. A listener checks for connection requests from clients, using the protocol and port that you configure Source 16সোর্স 16. The rules that you define for a listener determine how the load balancer routes requests to its registered targets Source 16সোর্স 16. You must define a default rule for each listener Source 16সোর্স 16. Each target group routes requests to one or more registered targets, such as EC2 instances Source 16সোর্স 16. An Application Load Balancer functions at the application layer, the seventh layer of the OSI model Source 16সোর্স 16. It evaluates the listener rules in priority order to determine which rule to apply Source 16সোর্স 16. The default routing algorithm is round robin. Alternatively, you can specify the least outstanding requests routing algorithm Source 16সোর্স 16. Rules can forward requests based on the URL in the request Source 16সোর্স 16. Rules can also forward requests based on the host field in the HTTP header Source 16সোর্স 16.
Health checks. An Application Load Balancer periodically sends requests to its registered targets to test their status. These tests are called health checks Source 18সোর্স 18. After your target is registered, it must pass one health check to be considered healthy Source 18সোর্স 18. If the health checks exceed UnhealthyThresholdCount consecutive failures, the load balancer takes the target out of service Source 18সোর্স 18. When they exceed HealthyThresholdCount consecutive successes, it puts the target back in service Source 18সোর্স 18. The default of UnhealthyThresholdCount is 2, and the default of HealthyThresholdCount is 5 Source 18সোর্স 18. For HTTP/1.1 or HTTP/2, the default health check path is / Source 18সোর্স 18. If a target group contains only unhealthy registered targets, the load balancer routes requests to all those targets, regardless of their health status Source 18সোর্স 18. If all targets fail health checks at the same time in all enabled Availability Zones, the load balancer fails open Source 18সোর্স 18. Health checks do not support WebSockets Source 18সোর্স 18. When you deregister a target, HealthyHostCount decreases but UnhealthyHostCount does not increase Source 18সোর্স 18. The security groups for target instances must allow traffic from the load balancer on the health check port Source 17সোর্স 17. A load balancer is ready for client requests when each enabled Availability Zone has at least one healthy registered target Source 17সোর্স 17.
Route 53 routing and health checks. A user enters your domain name or subdomain name in a web browser. Then Route 53 connects the browser with your website or web application Source 19সোর্স 19. Route 53 sends automated requests over the internet to a resource, such as a web server Source 19সোর্স 19. This verifies that it's reachable, available, and functional Source 19সোর্স 19. You can also route internet traffic away from unhealthy resources Source 19সোর্স 19. When you create a record, you choose a routing policy, which determines how Route 53 responds to queries Source 20সোর্স 20. The routing policies are:
- Simple: for a single resource that performs a given function for your domain Source 20সোর্স 20.
- Failover: when you want to configure active-passive failover Source 20সোর্স 20.
- Geolocation: when you want to route traffic based on the location of your users Source 20সোর্স 20.
- Geoproximity: when you want to route traffic based on the location of your resources Source 20সোর্স 20.
- Latency: when you have resources in multiple AWS Regions and want to route traffic to the Region that provides the best latency Source 20সোর্স 20.
- IP-based: when you want to route traffic based on the location of your users, and have the IP addresses that the traffic originates from Source 20সোর্স 20.
- Multivalue answer: when you want Route 53 to respond to DNS queries with up to eight healthy records selected at random Source 20সোর্স 20.
- Weighted: to route traffic to multiple resources in proportions that you specify Source 20সোর্স 20.
CloudFront caching. DNS routes the request to the CloudFront POP (edge location) that can best serve the request Source 22সোর্স 22. This is typically the nearest POP in terms of latency Source 22সোর্স 22. CloudFront checks its cache for the requested object. If the object is in the cache, CloudFront returns it to the user Source 22সোর্স 22. If the object is not in the cache, CloudFront forwards the request to your origin server Source 22সোর্স 22. CloudFront also adds the object to the cache for the next time someone requests it Source 22সোর্স 22.
You can control how long your files stay in a CloudFront cache before CloudFront forwards another request to your origin Source 23সোর্স 23. After a file expires, CloudFront forwards the request to the origin to verify that the cache contains the latest version of the file Source 23সোর্স 23. If the cache already has the latest version, the origin returns a status code 304 Not Modified Source 23সোর্স 23. If it does not, the origin returns a status code 200 OK and the latest version of the file Source 23সোর্স 23. If you opt out of using a cache policy, the default TTL (Time to Live) is 24 hours Source 23সোর্স 23. You can change the cache duration for an individual file by configuring your origin Source 23সোর্স 23. The origin adds a Cache-Control header with the max-age or s-maxage directive, or an Expires header Source 23সোর্স 23. CloudFront might evict a file that isn't frequently requested, before its expiration date Source 23সোর্স 23. You can also control how long errors, for example 404 Not Found, stay in a CloudFront cache Source 23সোর্স 23.
To remove a file from the edge caches before it expires, you can invalidate the file Source 24সোর্স 24. You can also use file versioning to serve a different version with a different name Source 24সোর্স 24. If you want to update your files frequently, AWS recommends that you primarily use file versioning Source 24সোর্স 24. If you invalidate a file, the user might continue to see the old version until it expires from those caches Source 24সোর্স 24.
সহজ English
IP ranges. The IP addresses of a VPC are written in Classless Inter-Domain Routing (CIDR) notation Source 4সোর্স 4. When you create a VPC, you must specify an IPv4 CIDR block for it Source 4সোর্স 4. The allowed block size is between a /16 netmask (65,536 IP addresses) and a /28 netmask (16 IP addresses) Source 4সোর্স 4. The CIDR block of a subnet can be the same as the CIDR block for the VPC, or a subset of it Source 5সোর্স 5. If you create more than one subnet in a VPC, the CIDR blocks of the subnets cannot overlap Source 5সোর্স 5. Make sure that the ranges of your VPCs don't overlap with the ranges of your own network Source 3সোর্স 3. For connectivity between multiple VPCs, you must ensure that they have no overlapping IP addresses Source 3সোর্স 3.
The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5. In a subnet with CIDR block 10.0.0.0/24, AWS lists these five reserved addresses Source 5সোর্স 5:
- 10.0.0.0 is the network address, and 10.0.0.1 is reserved by AWS for the VPC router Source 5সোর্স 5.
- 10.0.0.2 is reserved by AWS, and 10.0.0.3 is reserved by AWS for future use Source 5সোর্স 5.
- 10.0.0.255 is the network broadcast address, and AWS reserves it because broadcast is not supported in a VPC Source 5সোর্স 5.
If you create a subnet using a command line tool or the EC2 API, the CIDR block is automatically modified to its canonical form. If you specify 100.68.0.18/18, AWS creates 100.68.0.0/18 Source 5সোর্স 5.
Internet access. Your AWS account includes a default VPC in each AWS Region Source 1সোর্স 1. A default VPC includes an internet gateway, and each default subnet is a public subnet Source 2সোর্স 2. A subnet that is associated with a route table that has a route to an internet gateway is a public subnet. Without that route, it is a private subnet Source 7সোর্স 7. In a public subnet's route table, the route for the internet gateway can be 0.0.0.0/0 for IPv4 or ::/0 for IPv6 Source 7সোর্স 7.
Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3. You must also update the subnet route table with a route to the internet gateway Source 3সোর্স 3. The instances must also have public IP addresses Source 3সোর্স 3. They need an associated security group that allows traffic from the internet over specific ports and protocols Source 3সোর্স 3. By default, an instance in a nondefault subnet has a private IPv4 address but no public IPv4 address Source 2সোর্স 2. You can assign a public address at launch, or modify the subnet's public IP address attribute Source 2সোর্স 2.
A NAT gateway lets instances in a private subnet connect to services outside your VPC Source 8সোর্স 8. External services can't initiate a connection with those instances Source 8সোর্স 8. You create a public NAT gateway in a public subnet, and you must associate an Elastic IP address with it at creation Source 8সোর্স 8. If you don't explicitly associate a subnet with a route table, the subnet is implicitly associated with the main route table Source 2সোর্স 2.
Security groups. The only traffic that reaches the instance is the traffic allowed by the security group rules Source 9সোর্স 9. If the security group does not contain a rule that allows SSH traffic, you could not connect to your instance using SSH Source 9সোর্স 9. Security groups are stateful Source 9সোর্স 9. If you send a request from an instance, the response traffic for that request is allowed to reach the instance Source 9সোর্স 9. This holds regardless of the inbound security group rules Source 9সোর্স 9. Security groups do not filter traffic to and from Amazon DNS, Amazon DHCP, and EC2 instance metadata, among others Source 9সোর্স 9. When you add inbound rules for ports 22 (SSH) or 3389 (RDP), authorize only specific IP address ranges Source 9সোর্স 9. If you specify 0.0.0.0/0 (IPv4) and ::/ (IPv6), this enables anyone to access your instances from any IP address using the specified protocol Source 9সোর্স 9. Rule changes are propagated to instances as quickly as possible, but a small delay might occur Source 14সোর্স 14.
Network ACLs. Each subnet in your VPC must be associated with a network ACL Source 10সোর্স 10. If you don't explicitly associate a subnet with a network ACL, the subnet is automatically associated with the default network ACL Source 10সোর্স 10. A subnet can be associated with only one network ACL at a time Source 10সোর্স 10. Each rule can either allow or deny traffic Source 10সোর্স 10. Each rule has a number from 1 to 32766 Source 10সোর্স 10. AWS evaluates the rules in order, starting with the lowest numbered rule Source 10সোর্স 10. If the traffic matches a rule, the rule is applied, and no additional rules are evaluated Source 10সোর্স 10. Network ACLs are stateless Source 10সোর্স 10. If you create a rule to allow specific inbound traffic to a subnet, responses to that traffic are not automatically allowed Source 10সোর্স 10. AWS evaluates the rules when traffic enters and leaves the subnet, not as it is routed within a subnet Source 10সোর্স 10. Network ACLs can't block traffic to the Instance Metadata Service (IMDS) Source 10সোর্স 10.
AWS says to use security groups as the primary mechanism for controlling network access to your VPCs Source 11সোর্স 11. When necessary, use network ACLs to provide stateless, coarse-grain network control Source 11সোর্স 11.
Application Load Balancer parts. A load balancer serves as the single point of contact for clients Source 16সোর্স 16. A listener checks for connection requests from clients, using the protocol and port that you configure Source 16সোর্স 16. The rules that you define for a listener determine how the load balancer routes requests to its registered targets Source 16সোর্স 16. You must define a default rule for each listener Source 16সোর্স 16. Each target group routes requests to one or more registered targets, such as EC2 instances Source 16সোর্স 16. An Application Load Balancer functions at the application layer, the seventh layer of the OSI model Source 16সোর্স 16. It evaluates the listener rules in priority order to determine which rule to apply Source 16সোর্স 16. The default routing algorithm is round robin. Alternatively, you can specify the least outstanding requests routing algorithm Source 16সোর্স 16. Rules can forward requests based on the URL in the request Source 16সোর্স 16. Rules can also forward requests based on the host field in the HTTP header Source 16সোর্স 16.
Health checks. An Application Load Balancer periodically sends requests to its registered targets to test their status. These tests are called health checks Source 18সোর্স 18. After your target is registered, it must pass one health check to be considered healthy Source 18সোর্স 18. If the health checks exceed UnhealthyThresholdCount consecutive failures, the load balancer takes the target out of service Source 18সোর্স 18. When they exceed HealthyThresholdCount consecutive successes, it puts the target back in service Source 18সোর্স 18. The default of UnhealthyThresholdCount is 2, and the default of HealthyThresholdCount is 5 Source 18সোর্স 18. For HTTP/1.1 or HTTP/2, the default health check path is / Source 18সোর্স 18. If a target group contains only unhealthy registered targets, the load balancer routes requests to all those targets, regardless of their health status Source 18সোর্স 18. If all targets fail health checks at the same time in all enabled Availability Zones, the load balancer fails open Source 18সোর্স 18. Health checks do not support WebSockets Source 18সোর্স 18. When you deregister a target, HealthyHostCount decreases but UnhealthyHostCount does not increase Source 18সোর্স 18. The security groups for target instances must allow traffic from the load balancer on the health check port Source 17সোর্স 17. A load balancer is ready for client requests when each enabled Availability Zone has at least one healthy registered target Source 17সোর্স 17.
Route 53 routing and health checks. A user enters your domain name or subdomain name in a web browser. Then Route 53 connects the browser with your website or web application Source 19সোর্স 19. Route 53 sends automated requests over the internet to a resource, such as a web server Source 19সোর্স 19. This verifies that it's reachable, available, and functional Source 19সোর্স 19. You can also route internet traffic away from unhealthy resources Source 19সোর্স 19. When you create a record, you choose a routing policy, which determines how Route 53 responds to queries Source 20সোর্স 20. The routing policies are:
- Simple: for a single resource that performs a given function for your domain Source 20সোর্স 20.
- Failover: when you want to configure active-passive failover Source 20সোর্স 20.
- Geolocation: when you want to route traffic based on the location of your users Source 20সোর্স 20.
- Geoproximity: when you want to route traffic based on the location of your resources Source 20সোর্স 20.
- Latency: when you have resources in multiple AWS Regions and want to route traffic to the Region that provides the best latency Source 20সোর্স 20.
- IP-based: when you want to route traffic based on the location of your users, and have the IP addresses that the traffic originates from Source 20সোর্স 20.
- Multivalue answer: when you want Route 53 to respond to DNS queries with up to eight healthy records selected at random Source 20সোর্স 20.
- Weighted: to route traffic to multiple resources in proportions that you specify Source 20সোর্স 20.
CloudFront caching. DNS routes the request to the CloudFront POP (edge location) that can best serve the request Source 22সোর্স 22. This is typically the nearest POP in terms of latency Source 22সোর্স 22. CloudFront checks its cache for the requested object. If the object is in the cache, CloudFront returns it to the user Source 22সোর্স 22. If the object is not in the cache, CloudFront forwards the request to your origin server Source 22সোর্স 22. CloudFront also adds the object to the cache for the next time someone requests it Source 22সোর্স 22.
You can control how long your files stay in a CloudFront cache before CloudFront forwards another request to your origin Source 23সোর্স 23. After a file expires, CloudFront forwards the request to the origin to verify that the cache contains the latest version of the file Source 23সোর্স 23. If the cache already has the latest version, the origin returns a status code 304 Not Modified Source 23সোর্স 23. If it does not, the origin returns a status code 200 OK and the latest version of the file Source 23সোর্স 23. If you opt out of using a cache policy, the default TTL (Time to Live) is 24 hours Source 23সোর্স 23. You can change the cache duration for an individual file by configuring your origin Source 23সোর্স 23. The origin adds a Cache-Control header with the max-age or s-maxage directive, or an Expires header Source 23সোর্স 23. CloudFront might evict a file that isn't frequently requested, before its expiration date Source 23সোর্স 23. You can also control how long errors, for example 404 Not Found, stay in a CloudFront cache Source 23সোর্স 23.
To remove a file from the edge caches before it expires, you can invalidate the file Source 24সোর্স 24. You can also use file versioning to serve a different version with a different name Source 24সোর্স 24. If you want to update your files frequently, AWS recommends that you primarily use file versioning Source 24সোর্স 24. If you invalidate a file, the user might continue to see the old version until it expires from those caches Source 24সোর্স 24.
বাংলা ব্যাখ্যা
IP range। একটা VPC-র IP address লেখা হয় Classless Inter-Domain Routing (CIDR) notation-এ Source 4সোর্স 4। VPC তৈরি করার সময় আপনাকে তার জন্য একটা IPv4 CIDR block নির্দিষ্ট করতে হয় Source 4সোর্স 4। অনুমোদিত block-এর আকার একটা /16 netmask (৬৫,৫৩৬টা IP address) আর একটা /28 netmask (১৬টা IP address)-এর মধ্যে Source 4সোর্স 4। একটা subnet-এর CIDR block VPC-র CIDR block-এর সমান হতে পারে, বা তার একটা উপসেট Source 5সোর্স 5। একটা VPC-তে একাধিক subnet বানালে subnet-গুলোর CIDR block overlap করতে পারবে না Source 5সোর্স 5। আপনার VPC-গুলোর range যেন আপনার নিজের network-এর range-এর সঙ্গে overlap না করে তা নিশ্চিত করুন Source 3সোর্স 3। একাধিক VPC-র মধ্যে সংযোগ চাইলে আপনাকে নিশ্চিত করতে হবে যে তাদের কোনো IP address overlap করে না Source 3সোর্স 3।
প্রতিটা subnet CIDR block-এর প্রথম চারটা IP address আর শেষ IP address আপনার ব্যবহারের জন্য পাওয়া যায় না Source 5সোর্স 5। 10.0.0.0/24 CIDR block-এর একটা subnet-এ AWS এই পাঁচটা reserved address তালিকা করে Source 5সোর্স 5:
- 10.0.0.0 হলো network address, আর 10.0.0.1 AWS VPC router-এর জন্য reserve করেছে Source 5সোর্স 5।
- 10.0.0.2 AWS reserve করেছে, আর 10.0.0.3 AWS ভবিষ্যতের ব্যবহারের জন্য reserve করেছে Source 5সোর্স 5।
- 10.0.0.255 হলো network broadcast address, আর AWS এটা reserve করে কারণ VPC-তে broadcast সমর্থিত নয় Source 5সোর্স 5।
আপনি একটা command line tool বা EC2 API দিয়ে subnet বানালে CIDR block স্বয়ংক্রিয়ভাবে তার canonical রূপে বদলে যায়। আপনি 100.68.0.18/18 দিলে AWS 100.68.0.0/18 বানায় Source 5সোর্স 5।
Internet access। আপনার AWS account-এ প্রতিটা AWS Region-এ একটা default VPC থাকে Source 1সোর্স 1। একটা default VPC-তে একটা internet gateway থাকে, আর প্রতিটা default subnet একটা public subnet Source 2সোর্স 2। যে subnet এমন একটা route table-এর সঙ্গে যুক্ত, যাতে একটা internet gateway-এর route আছে, সেটা public subnet। সেই route না থাকলে সেটা private subnet Source 7সোর্স 7। একটা public subnet-এর route table-এ internet gateway-এর route হতে পারে IPv4-এর জন্য 0.0.0.0/0 বা IPv6-এর জন্য ::/0 Source 7সোর্স 7।
একটা VPC-তে internet gateway attach করলেই আপনার instance স্বয়ংক্রিয়ভাবে internet থেকে পৌঁছানোর যোগ্য হয়ে যায় না Source 3সোর্স 3। আপনাকে subnet-এর route table-এও internet gateway-এর একটা route যোগ করতে হবে Source 3সোর্স 3। instance-গুলোর public IP address-ও থাকতে হবে Source 3সোর্স 3। এমন একটা security group-ও যুক্ত থাকতে হবে, যা নির্দিষ্ট port ও protocol-এ internet থেকে traffic অনুমতি দেয় Source 3সোর্স 3। by default একটা nondefault subnet-এ চালু করা instance-এর একটা private IPv4 address থাকে কিন্তু public IPv4 address থাকে না Source 2সোর্স 2। আপনি launch-এর সময় একটা public address দিতে পারেন, বা subnet-এর public IP address attribute বদলাতে পারেন Source 2সোর্স 2।
একটা NAT gateway একটা private subnet-এর instance-কে আপনার VPC-র বাইরের service-এ সংযোগ দিতে দেয় Source 8সোর্স 8। বাইরের service ওই instance-গুলোতে সংযোগ শুরু করতে পারে না Source 8সোর্স 8। আপনি একটা public NAT gateway বানান একটা public subnet-এ, আর তৈরির সময় তার সঙ্গে একটা Elastic IP address যুক্ত করতে হয় Source 8সোর্স 8। আপনি একটা subnet-কে স্পষ্টভাবে কোনো route table-এর সঙ্গে যুক্ত না করলে subnet-টা অন্তর্নিহিতভাবে main route table-এর সঙ্গে যুক্ত হয় Source 2সোর্স 2।
Security group। instance-এ শুধু সেই traffic পৌঁছায়, যা security group-এর নিয়ম অনুমতি দেয় Source 9সোর্স 9। security group-এ SSH traffic অনুমতি দেওয়া কোনো নিয়ম না থাকলে আপনি SSH দিয়ে আপনার instance-এ সংযোগ দিতে পারবেন না Source 9সোর্স 9। security group stateful Source 9সোর্স 9। আপনি একটা instance থেকে request পাঠালে সেই request-এর response traffic instance-এ পৌঁছানোর অনুমতি পায় Source 9সোর্স 9। inbound security group নিয়ম যা-ই হোক, এটা ঠিক থাকে Source 9সোর্স 9। security group অন্যান্যের মধ্যে Amazon DNS, Amazon DHCP আর EC2 instance metadata-র traffic ছাঁকে না Source 9সোর্স 9। port 22 (SSH) বা 3389 (RDP)-এর জন্য inbound নিয়ম যোগ করার সময় শুধু নির্দিষ্ট IP address range অনুমতি দিন Source 9সোর্স 9। আপনি 0.0.0.0/0 (IPv4) আর ::/ (IPv6) দিলে যে কেউ যেকোনো IP address থেকে নির্দিষ্ট protocol দিয়ে আপনার instance-এ ঢুকতে পারে Source 9সোর্স 9। নিয়মের বদল instance-গুলোতে যত দ্রুত সম্ভব পৌঁছে যায়, তবে অল্প দেরি হতে পারে Source 14সোর্স 14।
Network ACL। আপনার VPC-র প্রতিটা subnet-কে একটা network ACL-এর সঙ্গে যুক্ত থাকতে হয় Source 10সোর্স 10। আপনি একটা subnet-কে স্পষ্টভাবে কোনো network ACL-এর সঙ্গে যুক্ত না করলে subnet-টা স্বয়ংক্রিয়ভাবে default network ACL-এর সঙ্গে যুক্ত হয় Source 10সোর্স 10। একটা subnet একসঙ্গে মাত্র একটা network ACL-এর সঙ্গে যুক্ত থাকতে পারে Source 10সোর্স 10। প্রতিটা নিয়ম হয় traffic অনুমতি দিতে পারে, নয়তো আটকাতে পারে Source 10সোর্স 10। প্রতিটা নিয়মের একটা নম্বর আছে, ১ থেকে ৩২৭৬৬-এর মধ্যে Source 10সোর্স 10। AWS নিয়মগুলো ক্রম অনুযায়ী যাচাই করে, সবচেয়ে কম নম্বরের নিয়ম থেকে শুরু করে Source 10সোর্স 10। traffic একটা নিয়মের সঙ্গে মিললে সেই নিয়ম প্রয়োগ হয়, আর আর কোনো নিয়ম যাচাই হয় না Source 10সোর্স 10। network ACL stateless Source 10সোর্স 10। আপনি একটা subnet-এ নির্দিষ্ট inbound traffic অনুমতি দেওয়ার নিয়ম বানালে সেই traffic-এর response স্বয়ংক্রিয়ভাবে অনুমতি পায় না Source 10সোর্স 10। AWS নিয়মগুলো যাচাই করে যখন traffic subnet-এ ঢোকে ও বেরোয়, subnet-এর ভেতরে route হওয়ার সময় নয় Source 10সোর্স 10। network ACL Instance Metadata Service (IMDS)-এর traffic আটকাতে পারে না Source 10সোর্স 10।
AWS বলে, আপনার VPC-র network access নিয়ন্ত্রণের প্রধান উপায় হিসেবে security group ব্যবহার করুন Source 11সোর্স 11। দরকার হলে stateless, মোটা দানার network নিয়ন্ত্রণের জন্য network ACL ব্যবহার করুন Source 11সোর্স 11।
Application Load Balancer-এর অংশ। একটা load balancer client-দের জন্য যোগাযোগের একমাত্র বিন্দু হিসেবে কাজ করে Source 16সোর্স 16। একটা listener client-এর connection request খোঁজে, আপনার configure করা protocol আর port ব্যবহার করে Source 16সোর্স 16। একটা listener-এর জন্য আপনি যে নিয়ম ঠিক করেন, সেগুলো ঠিক করে load balancer তার registered target-গুলোতে request কীভাবে route করবে Source 16সোর্স 16। প্রতিটা listener-এর জন্য আপনাকে একটা default নিয়ম ঠিক করতে হবে Source 16সোর্স 16। প্রতিটা target group এক বা একাধিক registered target-এ request route করে, যেমন EC2 instance Source 16সোর্স 16। একটা Application Load Balancer কাজ করে application layer-এ, OSI model-এর সপ্তম layer-এ Source 16সোর্স 16। এটা কোন নিয়ম প্রয়োগ হবে তা ঠিক করতে listener-এর নিয়ম priority অনুযায়ী যাচাই করে Source 16সোর্স 16। default routing algorithm হলো round robin। বিকল্প হিসেবে আপনি least outstanding requests routing algorithm ঠিক করতে পারেন Source 16সোর্স 16। আপনি এমন নিয়ম configure করতে পারেন, যা request-এর URL-এর ভিত্তিতে request forward করে Source 16সোর্স 16। এমন নিয়মও configure করা যায়, যা HTTP header-এর host field-এর ভিত্তিতে request forward করে Source 16সোর্স 16।
Health check। একটা Application Load Balancer তার registered target-গুলোর অবস্থা পরীক্ষা করতে সময়ে সময়ে তাদের কাছে request পাঠায়। এই পরীক্ষাগুলোকে health check বলা হয় Source 18সোর্স 18। একটা target registered হওয়ার পর সুস্থ গণ্য হতে তাকে একটা health check পাস করতে হয় Source 18সোর্স 18। health check পরপর UnhealthyThresholdCount-এর বেশি বার ব্যর্থ হলে load balancer target-টাকে service থেকে সরিয়ে নেয় Source 18সোর্স 18। পরপর HealthyThresholdCount-এর বেশি বার সফল হলে সে target-টাকে আবার service-এ ফিরিয়ে আনে Source 18সোর্স 18। UnhealthyThresholdCount-এর default ২, আর HealthyThresholdCount-এর default ৫ Source 18সোর্স 18। HTTP/1.1 বা HTTP/2-এর জন্য default health check path হলো / Source 18সোর্স 18। একটা target group-এ শুধু অসুস্থ registered target থাকলে load balancer সেই সব target-এ request route করে, তাদের health status যা-ই হোক Source 18সোর্স 18। সব enabled Availability Zone-এ একই সময়ে সব target health check-এ ব্যর্থ হলে load balancer fail open করে Source 18সোর্স 18। health check WebSocket সমর্থন করে না Source 18সোর্স 18। আপনি একটা target deregister করলে HealthyHostCount কমে কিন্তু UnhealthyHostCount বাড়ে না Source 18সোর্স 18। target instance-এর security group-কে health check port-এ load balancer থেকে আসা traffic অনুমতি দিতে হবে Source 17সোর্স 17। load balancer client request সামলানোর জন্য তৈরি, যখন তার প্রতিটা enabled Availability Zone-এ অন্তত একটা সুস্থ registered target থাকে Source 17সোর্স 17।
Route 53 routing আর health check। একজন user web browser-এ আপনার domain name বা subdomain name দেন। তখন Route 53 browser-টাকে আপনার website বা web application-এর সঙ্গে যুক্ত করে Source 19সোর্স 19। Route 53 internet দিয়ে একটা resource-এ, যেমন একটা web server-এ, স্বয়ংক্রিয় request পাঠায় Source 19সোর্স 19। এতে যাচাই হয় যে সেটা পৌঁছানো যায়, চালু আছে আর কাজ করছে Source 19সোর্স 19। আপনি internet traffic অসুস্থ resource থেকে সরিয়েও নিতে পারেন Source 19সোর্স 19। একটা record বানানোর সময় আপনি একটা routing policy বেছে নেন, যা ঠিক করে Route 53 query-র উত্তর কীভাবে দেবে Source 20সোর্স 20। routing policy-গুলো হলো:
- Simple: আপনার domain-এর জন্য একটা নির্দিষ্ট কাজ করা একটা resource-এর জন্য Source 20সোর্স 20।
- Failover: যখন আপনি active-passive failover configure করতে চান Source 20সোর্স 20।
- Geolocation: যখন আপনি user-দের অবস্থানের ভিত্তিতে traffic route করতে চান Source 20সোর্স 20।
- Geoproximity: যখন আপনি আপনার resource-এর অবস্থানের ভিত্তিতে traffic route করতে চান Source 20সোর্স 20।
- Latency: যখন আপনার একাধিক AWS Region-এ resource আছে আর আপনি সেই Region-এ traffic route করতে চান, যা সবচেয়ে ভালো latency দেয় Source 20সোর্স 20।
- IP-based: যখন আপনি user-দের অবস্থানের ভিত্তিতে traffic route করতে চান, আর traffic যে IP address থেকে আসে তা আপনার কাছে আছে Source 20সোর্স 20।
- Multivalue answer: যখন আপনি চান Route 53 DNS query-র উত্তর দিক সর্বোচ্চ আটটা সুস্থ record দিয়ে, যা এলোমেলোভাবে বাছা Source 20সোর্স 20।
- Weighted: একাধিক resource-এ আপনার নির্দিষ্ট করা অনুপাতে traffic route করতে Source 20সোর্স 20।
CloudFront caching। DNS request-টাকে সেই CloudFront POP (edge location)-এ route করে, যে request-টা সবচেয়ে ভালো সামলাতে পারে Source 22সোর্স 22। এটা সাধারণত latency-র হিসাবে সবচেয়ে কাছের POP Source 22সোর্স 22। CloudFront চাওয়া object-এর জন্য তার cache দেখে। object cache-এ থাকলে CloudFront তা user-কে ফেরত দেয় Source 22সোর্স 22। object cache-এ না থাকলে CloudFront request-টা আপনার origin server-এ forward করে Source 22সোর্স 22। CloudFront পরের বার কেউ চাইলে যাতে পায়, তাই object-টা cache-এও যোগ করে Source 22সোর্স 22।
আপনার file CloudFront cache-এ কতক্ষণ থাকবে, তা আপনি নিয়ন্ত্রণ করতে পারেন, আপনার origin-এ CloudFront আবার request পাঠানোর আগে Source 23সোর্স 23। একটা file-এর মেয়াদ শেষ হলে CloudFront origin-এ request forward করে যাচাই করে যে cache-এ file-টার সর্বশেষ version আছে কি না Source 23সোর্স 23। cache-এ সর্বশেষ version থাকলে origin 304 Not Modified status code ফেরত দেয় Source 23সোর্স 23। না থাকলে origin 200 OK status code আর file-টার সর্বশেষ version ফেরত দেয় Source 23সোর্স 23। আপনি cache policy ব্যবহার না করলে default TTL (Time to Live) ২৪ ঘণ্টা Source 23সোর্স 23। আপনি origin configure করে একটা আলাদা file-এর cache-এর মেয়াদ বদলাতে পারেন Source 23সোর্স 23। origin file-এ max-age বা s-maxage directive-সহ একটা Cache-Control header, বা একটা Expires header যোগ করে Source 23সোর্স 23। যে file প্রায়ই চাওয়া হয় না, CloudFront তা মেয়াদ শেষের আগেই evict করে দিতে পারে Source 23সোর্স 23। error, যেমন 404 Not Found, CloudFront cache-এ কতক্ষণ থাকবে তাও আপনি নিয়ন্ত্রণ করতে পারেন Source 23সোর্স 23।
একটা file-এর মেয়াদ শেষের আগে edge cache থেকে তা সরাতে আপনি file-টা invalidate করতে পারেন Source 24সোর্স 24। আলাদা নামের একটা আলাদা version দিতে file versioning-ও ব্যবহার করতে পারেন Source 24সোর্স 24। আপনি আপনার file ঘন ঘন হালনাগাদ করতে চাইলে AWS সুপারিশ করে, মূলত file versioning ব্যবহার করুন Source 24সোর্স 24। আপনি একটা file invalidate করলে user পুরোনো version-ই দেখতে থাকতে পারে, যতক্ষণ না সেই cache থেকে তার মেয়াদ শেষ হয় Source 24সোর্স 24।
Try it
The tutorial ran steps 1 to 3 on 2026-11-18 at 12:30 (+06) on Linux 7.0.0-43-generic, with Python 3.14.4, aws-cli/2.41.0, and bash 5.3.9. Steps 1 to 3 needed no AWS account and no credentials in the tutorial's run. Steps 2 and 3 use the AWS CLI that step 1 of AWS Compute and Storage installs. In the tutorial's run, no AWS_ variable was set before step 2, and no ~/.aws folder existed before or after. The output is from the tutorial's run. Steps 4 to 6 are a read-along of AWS's own pages. The tutorial did not run them, because they need an account and can cost money.
1. Check IP ranges with Python. The ipaddress module returns a network object for a text like 10.0.0.0/16 Source 27সোর্স 27. The attribute num_addresses is the total number of addresses in the network Source 27সোর্স 27. The method subnets() returns the subnets that join to make the network Source 27সোর্স 27. The method subnet_of() tells whether a network is a subnet of another one Source 27সোর্স 27. The method overlaps() is true if a network is partly or wholly contained in the other one Source 27সোর্স 27. Network objects can act as containers of addresses, so in tests an address Source 27সোর্স 27. Save this file as net.py. It is the tutorial's own code, 26 lines:
import ipaddress
vpc = ipaddress.ip_network("10.0.0.0/16")
print("VPC", vpc, "has", vpc.num_addresses, "addresses")
subnets = list(vpc.subnets(new_prefix=24))
print("first three /24 subnets:", [str(s) for s in subnets[:3]], "of", len(subnets))
subnet = ipaddress.ip_network("10.0.0.0/24")
print("subnet", subnet, "has", subnet.num_addresses, "addresses")
print("first four and last address:", [str(subnet[i]) for i in (0, 1, 2, 3, -1)])
half = ipaddress.ip_network("10.0.0.128/25")
other = ipaddress.ip_network("10.0.1.0/24")
print(half, "is inside", subnet, ":", half.subnet_of(subnet))
print(subnet, "overlaps", half, ":", subnet.overlaps(half))
print(subnet, "overlaps", other, ":", subnet.overlaps(other))
rule = ipaddress.ip_network("10.0.0.0/25")
for text in ("10.0.0.37", "10.0.0.200"):
print(text, "is in", rule, ":", ipaddress.ip_address(text) in rule)
try:
ipaddress.ip_network("10.0.0.5/24")
except ValueError as error:
print("ValueError:", error)Run it:
python3 net.pyOutput of the tutorial's run:
VPC 10.0.0.0/16 has 65536 addresses
first three /24 subnets: ['10.0.0.0/24', '10.0.1.0/24', '10.0.2.0/24'] of 256
subnet 10.0.0.0/24 has 256 addresses
first four and last address: ['10.0.0.0', '10.0.0.1', '10.0.0.2', '10.0.0.3', '10.0.0.255']
10.0.0.128/25 is inside 10.0.0.0/24 : True
10.0.0.0/24 overlaps 10.0.0.128/25 : True
10.0.0.0/24 overlaps 10.0.1.0/24 : False
10.0.0.37 is in 10.0.0.0/25 : True
10.0.0.200 is in 10.0.0.0/25 : False
ValueError: 10.0.0.5/24 has host bits setAWS gives 65,536 IP addresses for a /16 netmask Source 4সোর্স 4. The CIDR block of a subnet can be a subset of the CIDR block for the VPC Source 5সোর্স 5. The fourth output line lists the first four addresses and the last address of 10.0.0.0/24. They are the five addresses that AWS lists as reserved in that subnet Source 5সোর্স 5. AWS says that the CIDR blocks of the subnets of a VPC cannot overlap Source 5সোর্স 5. In the run, 10.0.0.0/24 overlaps 10.0.0.128/25 and does not overlap 10.0.1.0/24. The last two tests ask whether a client address is inside the range 10.0.0.0/25. The tutorial treats that range as the source range of an inbound rule. The code does not call AWS and does not model a real security group. The last line of the output comes from the address 10.0.0.5/24. It has host bits set, and ip_network raises a ValueError in that case Source 27সোর্স 27. AWS handles such a value in another way. If you create a subnet with a command line tool or the EC2 API, the CIDR block is automatically modified to its canonical form Source 5সোর্স 5.
2. Print the template of a security group call. The command below first sets the same three environment variables as step 2 of AWS Compute and Storage. Choosing them is the tutorial's own choice. AWS_CONFIG_FILE and AWS_SHARED_CREDENTIALS_FILE name the files for configuration profiles and access keys, and AWS_EC2_METADATA_DISABLED disables the use of the EC2 instance metadata service (IMDS) Source 29সোর্স 29. The --generate-cli-skeleton option generates and displays a parameter template that you can customize and use as input on a command Source 28সোর্স 28. Using aws ec2 create-security-group is the tutorial's own choice. The AWS CLI User Guide shows the option on aws ec2 run-instances Source 28সোর্স 28.
export AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/null AWS_EC2_METADATA_DISABLED=true
aws ec2 create-security-group --generate-cli-skeletonOutput of the tutorial's run:
{
"Description": "",
"GroupName": "",
"VpcId": "",
"TagSpecifications": [
{
"ResourceType": "capacity-reservation",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
],
"DryRun": true
}The template shows GroupName, Description, and VpcId. The tutorial reads the other values as placeholders to replace. For example, "ResourceType": "capacity-reservation" is not a recommendation for a security group.
3. Find the parameters of a rule. The tutorial chose authorize-security-group-ingress for this step. It prints the top-level names of the template. The filter pattern is the tutorial's own, and the four spaces keep nested names out.
aws ec2 authorize-security-group-ingress --generate-cli-skeleton | grep -E '^ "'Output of the tutorial's run:
"CidrIp": "",
"FromPort": 0,
"GroupId": "",
"GroupName": "",
"IpPermissions": [
"IpProtocol": "",
"SourceSecurityGroupName": "",
"SourceSecurityGroupOwnerId": "",
"ToPort": 0,
"TagSpecifications": [
"DryRun": trueAWS says that an inbound rule needs exactly one source, which is an IPv4 or IPv6 address range, a prefix list, or a security group Source 14সোর্স 14. It also says that you must specify a protocol for each rule, and for TCP or UDP a port or port range Source 14সোর্স 14. The tutorial matches these by name: CidrIp for a range, IpProtocol for the protocol, and FromPort and ToPort for the ports. It did not check the matching against the API reference. The EC2 API has a DryRun parameter. It checks whether you have the required permissions for the action, without actually making the request Source 14সোর্স 14. It needs an account, so the tutorial did not run it.
4. Read along: plan and create a VPC. These are AWS's own pages. The tutorial did not run them. Cost warning. There's no additional charge for using a VPC. There are, however, charges for some VPC components, such as NAT gateways, IP Address Manager, traffic mirroring, Reachability Analyzer, and Network Access Analyzer Source 1সোর্স 1. If you are not using the EC2 service in the AWS Free Tier, public IPv4 addresses are charged Source 1সোর্স 1.
- Determine your IP address ranges. Make sure that the ranges of your VPCs don't overlap with the ranges of your own network Source 3সোর্স 3.
- Select your Availability Zones. For a production environment, AWS recommends at least two Availability Zones Source 3সোর্স 3. For a development or test environment, you might save money by deploying your resources in only one Availability Zone Source 3সোর্স 3.
- Plan your internet connectivity. To let instances in a private subnet reach the internet without unsolicited inbound connections, add a public NAT gateway in each active Availability Zone, and update the route table Source 3সোর্স 3.
- In the console, choose Create VPC on the VPC dashboard, and for Resources to create, choose VPC and more Source 26সোর্স 26. A VPC must have an IPv4 address range Source 26সোর্স 26.
- The NAT gateway option is optional. The page says that there is a cost associated with NAT gateways Source 26সোর্স 26.
5. Read along: create an Application Load Balancer. This is AWS's own page. The tutorial did not run it. Cost warning. You are charged for each hour or partial hour that an Application Load Balancer is running. Each partial hour is billed as a full hour Source 30সোর্স 30. The page names these prerequisites:
- Decide which Availability Zones and IP address types your application will support Source 17সোর্স 17.
- Make sure that the security groups for the target instances allow traffic on the listener port from client IP addresses, if targets are specified by instance ID Source 17সোর্স 17.
- Make sure that they also allow traffic from the load balancer on the health check port Source 17সোর্স 17.
When you create an Application Load Balancer, you create the load balancer, at least one listener, and at least one target group Source 17সোর্স 17. To test it, verify that your EC2 instances pass the initial health check, and then check that the load balancer is sending traffic to your EC2 instance Source 17সোর্স 17. The page links to the steps that delete the load balancer Source 17সোর্স 17.
6. Read along: a CloudFront standard distribution. This is AWS's own tutorial. The tutorial did not run it. Cost warning. If you created your distribution and S3 bucket only as a learning exercise, delete them so that you no longer accrue charges Source 25সোর্স 25. Delete the distribution first Source 25সোর্স 25.
- The procedures set up a standard distribution Source 25সোর্স 25. For the tutorial, you create an S3 bucket with the sample hello world files that you use to create a basic webpage Source 25সোর্স 25.
- The distribution uses origin access control (OAC) to send authenticated requests to your S3 origin Source 25সোর্স 25.
- Choose Create distribution. CloudFront updates the S3 bucket policy for you Source 25সোর্স 25.
- When your distribution is done deploying, the Last modified field changes from Deploying to a date and time Source 25সোর্স 25.
- The distribution keeps your objects in CloudFront edge locations for the default duration of 24 hours. The minimum duration is 0 seconds Source 25সোর্স 25.
সহজ English
The tutorial ran steps 1 to 3 on 2026-11-18 at 12:30 (+06) on Linux 7.0.0-43-generic, with Python 3.14.4, aws-cli/2.41.0, and bash 5.3.9. Steps 1 to 3 needed no AWS account and no credentials in the tutorial's run. Steps 2 and 3 use the AWS CLI that step 1 of AWS Compute and Storage installs. In the tutorial's run, no AWS_ variable was set before step 2, and no ~/.aws folder existed before or after. The output is from the tutorial's run. Steps 4 to 6 are a read-along of AWS's own pages. The tutorial did not run them, because they need an account and can cost money.
1. Check IP ranges with Python. The ipaddress module returns a network object for a text like 10.0.0.0/16 Source 27সোর্স 27. The attribute num_addresses is the total number of addresses in the network Source 27সোর্স 27. The method subnets() returns the subnets that join to make the network Source 27সোর্স 27. The method subnet_of() tells whether a network is a subnet of another one Source 27সোর্স 27. The method overlaps() is true if a network is partly or wholly contained in the other one Source 27সোর্স 27. Network objects can act as containers of addresses, so in tests an address Source 27সোর্স 27. Save this file as net.py. It is the tutorial's own code, 26 lines:
import ipaddress
vpc = ipaddress.ip_network("10.0.0.0/16")
print("VPC", vpc, "has", vpc.num_addresses, "addresses")
subnets = list(vpc.subnets(new_prefix=24))
print("first three /24 subnets:", [str(s) for s in subnets[:3]], "of", len(subnets))
subnet = ipaddress.ip_network("10.0.0.0/24")
print("subnet", subnet, "has", subnet.num_addresses, "addresses")
print("first four and last address:", [str(subnet[i]) for i in (0, 1, 2, 3, -1)])
half = ipaddress.ip_network("10.0.0.128/25")
other = ipaddress.ip_network("10.0.1.0/24")
print(half, "is inside", subnet, ":", half.subnet_of(subnet))
print(subnet, "overlaps", half, ":", subnet.overlaps(half))
print(subnet, "overlaps", other, ":", subnet.overlaps(other))
rule = ipaddress.ip_network("10.0.0.0/25")
for text in ("10.0.0.37", "10.0.0.200"):
print(text, "is in", rule, ":", ipaddress.ip_address(text) in rule)
try:
ipaddress.ip_network("10.0.0.5/24")
except ValueError as error:
print("ValueError:", error)Run it:
python3 net.pyOutput of the tutorial's run:
VPC 10.0.0.0/16 has 65536 addresses
first three /24 subnets: ['10.0.0.0/24', '10.0.1.0/24', '10.0.2.0/24'] of 256
subnet 10.0.0.0/24 has 256 addresses
first four and last address: ['10.0.0.0', '10.0.0.1', '10.0.0.2', '10.0.0.3', '10.0.0.255']
10.0.0.128/25 is inside 10.0.0.0/24 : True
10.0.0.0/24 overlaps 10.0.0.128/25 : True
10.0.0.0/24 overlaps 10.0.1.0/24 : False
10.0.0.37 is in 10.0.0.0/25 : True
10.0.0.200 is in 10.0.0.0/25 : False
ValueError: 10.0.0.5/24 has host bits setAWS gives 65,536 IP addresses for a /16 netmask Source 4সোর্স 4. The CIDR block of a subnet can be a subset of the CIDR block for the VPC Source 5সোর্স 5. The fourth output line lists the first four addresses and the last address of 10.0.0.0/24. They are the five addresses that AWS lists as reserved in that subnet Source 5সোর্স 5. AWS says that the CIDR blocks of the subnets of a VPC cannot overlap Source 5সোর্স 5. In the run, 10.0.0.0/24 overlaps 10.0.0.128/25 and does not overlap 10.0.1.0/24. The last two tests ask whether a client address is inside the range 10.0.0.0/25. The tutorial treats that range as the source range of an inbound rule. The code does not call AWS and does not model a real security group. The last line of the output comes from the address 10.0.0.5/24. It has host bits set, and ip_network raises a ValueError in that case Source 27সোর্স 27. AWS handles such a value in another way. If you create a subnet with a command line tool or the EC2 API, the CIDR block is automatically modified to its canonical form Source 5সোর্স 5.
2. Print the template of a security group call. The command below first sets the same three environment variables as step 2 of AWS Compute and Storage. Choosing them is the tutorial's own choice. AWS_CONFIG_FILE and AWS_SHARED_CREDENTIALS_FILE name the files for configuration profiles and access keys, and AWS_EC2_METADATA_DISABLED disables the use of the EC2 instance metadata service (IMDS) Source 29সোর্স 29. The --generate-cli-skeleton option generates and displays a parameter template that you can customize and use as input on a command Source 28সোর্স 28. Using aws ec2 create-security-group is the tutorial's own choice. The AWS CLI User Guide shows the option on aws ec2 run-instances Source 28সোর্স 28.
export AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/null AWS_EC2_METADATA_DISABLED=true
aws ec2 create-security-group --generate-cli-skeletonOutput of the tutorial's run:
{
"Description": "",
"GroupName": "",
"VpcId": "",
"TagSpecifications": [
{
"ResourceType": "capacity-reservation",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
],
"DryRun": true
}The template shows GroupName, Description, and VpcId. The tutorial reads the other values as placeholders to replace. For example, "ResourceType": "capacity-reservation" is not a recommendation for a security group.
3. Find the parameters of a rule. The tutorial chose authorize-security-group-ingress for this step. It prints the top-level names of the template. The filter pattern is the tutorial's own, and the four spaces keep nested names out.
aws ec2 authorize-security-group-ingress --generate-cli-skeleton | grep -E '^ "'Output of the tutorial's run:
"CidrIp": "",
"FromPort": 0,
"GroupId": "",
"GroupName": "",
"IpPermissions": [
"IpProtocol": "",
"SourceSecurityGroupName": "",
"SourceSecurityGroupOwnerId": "",
"ToPort": 0,
"TagSpecifications": [
"DryRun": trueAWS says that an inbound rule needs exactly one source, which is an IPv4 or IPv6 address range, a prefix list, or a security group Source 14সোর্স 14. It also says that you must specify a protocol for each rule, and for TCP or UDP a port or port range Source 14সোর্স 14. The tutorial matches these by name: CidrIp for a range, IpProtocol for the protocol, and FromPort and ToPort for the ports. It did not check the matching against the API reference. The EC2 API has a DryRun parameter. It checks whether you have the required permissions for the action, without actually making the request Source 14সোর্স 14. It needs an account, so the tutorial did not run it.
4. Read along: plan and create a VPC. These are AWS's own pages. The tutorial did not run them. Cost warning. There's no additional charge for using a VPC. There are, however, charges for some VPC components, such as NAT gateways, IP Address Manager, traffic mirroring, Reachability Analyzer, and Network Access Analyzer Source 1সোর্স 1. If you are not using the EC2 service in the AWS Free Tier, public IPv4 addresses are charged Source 1সোর্স 1.
- Determine your IP address ranges. Make sure that the ranges of your VPCs don't overlap with the ranges of your own network Source 3সোর্স 3.
- Select your Availability Zones. For a production environment, AWS recommends at least two Availability Zones Source 3সোর্স 3. For a development or test environment, you might save money by deploying your resources in only one Availability Zone Source 3সোর্স 3.
- Plan your internet connectivity. To let instances in a private subnet reach the internet without unsolicited inbound connections, add a public NAT gateway in each active Availability Zone, and update the route table Source 3সোর্স 3.
- In the console, choose Create VPC on the VPC dashboard, and for Resources to create, choose VPC and more Source 26সোর্স 26. A VPC must have an IPv4 address range Source 26সোর্স 26.
- The NAT gateway option is optional. The page says that there is a cost associated with NAT gateways Source 26সোর্স 26.
5. Read along: create an Application Load Balancer. This is AWS's own page. The tutorial did not run it. Cost warning. You are charged for each hour or partial hour that an Application Load Balancer is running. Each partial hour is billed as a full hour Source 30সোর্স 30. The page names these prerequisites:
- Decide which Availability Zones and IP address types your application will support Source 17সোর্স 17.
- Make sure that the security groups for the target instances allow traffic on the listener port from client IP addresses, if targets are specified by instance ID Source 17সোর্স 17.
- Make sure that they also allow traffic from the load balancer on the health check port Source 17সোর্স 17.
When you create an Application Load Balancer, you create the load balancer, at least one listener, and at least one target group Source 17সোর্স 17. To test it, verify that your EC2 instances pass the initial health check, and then check that the load balancer is sending traffic to your EC2 instance Source 17সোর্স 17. The page links to the steps that delete the load balancer Source 17সোর্স 17.
6. Read along: a CloudFront standard distribution. This is AWS's own tutorial. The tutorial did not run it. Cost warning. If you created your distribution and S3 bucket only as a learning exercise, delete them so that you no longer accrue charges Source 25সোর্স 25. Delete the distribution first Source 25সোর্স 25.
- The procedures set up a standard distribution Source 25সোর্স 25. For the tutorial, you create an S3 bucket with the sample hello world files that you use to create a basic webpage Source 25সোর্স 25.
- The distribution uses origin access control (OAC) to send authenticated requests to your S3 origin Source 25সোর্স 25.
- Choose Create distribution. CloudFront updates the S3 bucket policy for you Source 25সোর্স 25.
- When your distribution is done deploying, the Last modified field changes from Deploying to a date and time Source 25সোর্স 25.
- The distribution keeps your objects in CloudFront edge locations for the default duration of 24 hours. The minimum duration is 0 seconds Source 25সোর্স 25.
বাংলা ব্যাখ্যা
টিউটোরিয়াল ১ থেকে ৩ নম্বর ধাপ চালিয়েছে 2026-11-18 তারিখে 12:30-এ (+06), Linux 7.0.0-43-generic-এ, Python 3.14.4, aws-cli/2.41.0 আর bash 5.3.9 দিয়ে। টিউটোরিয়ালের run-এ এগুলোর জন্য কোনো AWS account বা credential লাগেনি। ২ আর ৩ নম্বর ধাপ সেই AWS CLI ব্যবহার করে, যা AWS Compute and Storage-এর ১ নম্বর ধাপে install হয়। টিউটোরিয়ালের run-এ ২ নম্বর ধাপের আগে কোনো AWS_ variable সেট ছিল না, আর ~/.aws folder run-এর আগে বা পরে ছিল না। output টিউটোরিয়ালের run থেকে নেওয়া। ৪ থেকে ৬ নম্বর ধাপ AWS-এর নিজের page পাশাপাশি পড়ে যাওয়া। টিউটোরিয়াল সেগুলো চালায়নি, কারণ সেগুলোর জন্য account লাগে আর খরচ হতে পারে।
১. Python দিয়ে IP range যাচাই করুন। ipaddress module 10.0.0.0/16-এর মতো একটা লেখার জন্য একটা network object ফেরত দেয় Source 27সোর্স 27। num_addresses attribute হলো network-এ address-এর মোট সংখ্যা Source 27সোর্স 27। subnets() method সেই subnet-গুলো ফেরত দেয়, যেগুলো জুড়ে network-টা তৈরি Source 27সোর্স 27। subnet_of() method বলে একটা network অন্যটার subnet কি না Source 27সোর্স 27। overlaps() method সত্য হয়, যদি একটা network অন্যটার আংশিক বা পুরোপুরি ভেতরে থাকে Source 27সোর্স 27। network object address-এর container হিসেবে কাজ করতে পারে, তাই in একটা address পরীক্ষা করে Source 27সোর্স 27। এই file-টা net.py নামে save করুন। এটা টিউটোরিয়ালের নিজের code, ২৬ লাইনের:
import ipaddress
vpc = ipaddress.ip_network("10.0.0.0/16")
print("VPC", vpc, "has", vpc.num_addresses, "addresses")
subnets = list(vpc.subnets(new_prefix=24))
print("first three /24 subnets:", [str(s) for s in subnets[:3]], "of", len(subnets))
subnet = ipaddress.ip_network("10.0.0.0/24")
print("subnet", subnet, "has", subnet.num_addresses, "addresses")
print("first four and last address:", [str(subnet[i]) for i in (0, 1, 2, 3, -1)])
half = ipaddress.ip_network("10.0.0.128/25")
other = ipaddress.ip_network("10.0.1.0/24")
print(half, "is inside", subnet, ":", half.subnet_of(subnet))
print(subnet, "overlaps", half, ":", subnet.overlaps(half))
print(subnet, "overlaps", other, ":", subnet.overlaps(other))
rule = ipaddress.ip_network("10.0.0.0/25")
for text in ("10.0.0.37", "10.0.0.200"):
print(text, "is in", rule, ":", ipaddress.ip_address(text) in rule)
try:
ipaddress.ip_network("10.0.0.5/24")
except ValueError as error:
print("ValueError:", error)চালান:
python3 net.pyটিউটোরিয়ালের run-এর output:
VPC 10.0.0.0/16 has 65536 addresses
first three /24 subnets: ['10.0.0.0/24', '10.0.1.0/24', '10.0.2.0/24'] of 256
subnet 10.0.0.0/24 has 256 addresses
first four and last address: ['10.0.0.0', '10.0.0.1', '10.0.0.2', '10.0.0.3', '10.0.0.255']
10.0.0.128/25 is inside 10.0.0.0/24 : True
10.0.0.0/24 overlaps 10.0.0.128/25 : True
10.0.0.0/24 overlaps 10.0.1.0/24 : False
10.0.0.37 is in 10.0.0.0/25 : True
10.0.0.200 is in 10.0.0.0/25 : False
ValueError: 10.0.0.5/24 has host bits setAWS একটা /16 netmask-এর জন্য ৬৫,৫৩৬টা IP address দেয় Source 4সোর্স 4। একটা subnet-এর CIDR block VPC-র CIDR block-এর একটা উপসেট হতে পারে Source 5সোর্স 5। output-এর চতুর্থ লাইন 10.0.0.0/24-এর প্রথম চারটা address আর শেষ address তালিকা করে। এই subnet-এ AWS যে পাঁচটা address reserved বলে, এগুলো সেগুলোই Source 5সোর্স 5। AWS বলে, একটা VPC-র subnet-গুলোর CIDR block overlap করতে পারবে না Source 5সোর্স 5। run-এ 10.0.0.0/24 10.0.0.128/25-এর সঙ্গে overlap করে আর 10.0.1.0/24-এর সঙ্গে overlap করে না। শেষ দুটো পরীক্ষা জিজ্ঞেস করে, একটা client address 10.0.0.0/25 range-এর ভেতরে কি না। টিউটোরিয়াল ওই range-টাকে একটা inbound rule-এর source range ধরে নেয়। code AWS-কে ডাকে না, আর কোনো আসল security group-এর মডেল বানায় না। output-এর শেষ লাইন এসেছে 10.0.0.5/24 address থেকে। এতে host bit সেট করা, আর সেই ক্ষেত্রে ip_network একটা ValueError তোলে Source 27সোর্স 27। AWS এমন মান অন্যভাবে সামলায়। আপনি একটা command line tool বা EC2 API দিয়ে subnet বানালে CIDR block স্বয়ংক্রিয়ভাবে তার canonical রূপে বদলে যায় Source 5সোর্স 5।
২. একটা security group call-এর template ছাপুন। নিচের command প্রথমে AWS Compute and Storage-এর ২ নম্বর ধাপের মতোই তিনটা environment variable সেট করে। এগুলো বেছে নেওয়া টিউটোরিয়ালের নিজের পছন্দ। AWS_CONFIG_FILE আর AWS_SHARED_CREDENTIALS_FILE configuration profile আর access key রাখার file-এর নাম দেয়, আর AWS_EC2_METADATA_DISABLED EC2 instance metadata service (IMDS)-এর ব্যবহার বন্ধ করে Source 29সোর্স 29। --generate-cli-skeleton option একটা parameter template তৈরি করে দেখায়, যা আপনি নিজের মতো করে বদলে একটা command-এর input হিসেবে ব্যবহার করতে পারেন Source 28সোর্স 28। aws ec2 create-security-group ব্যবহার করা টিউটোরিয়ালের নিজের পছন্দ। AWS CLI User Guide option-টা দেখায় aws ec2 run-instances-এর ওপর Source 28সোর্স 28।
export AWS_CONFIG_FILE=/dev/null AWS_SHARED_CREDENTIALS_FILE=/dev/null AWS_EC2_METADATA_DISABLED=true
aws ec2 create-security-group --generate-cli-skeletonটিউটোরিয়ালের run-এর output:
{
"Description": "",
"GroupName": "",
"VpcId": "",
"TagSpecifications": [
{
"ResourceType": "capacity-reservation",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
],
"DryRun": true
}template-এ GroupName, Description আর VpcId আছে। টিউটোরিয়াল বাকি মানগুলোকে বদলে নেওয়ার জন্য placeholder হিসেবে পড়ে। যেমন "ResourceType": "capacity-reservation" একটা security group-এর জন্য কোনো সুপারিশ নয়।
৩. একটা rule-এর parameter খুঁজুন। এই ধাপের জন্য টিউটোরিয়াল authorize-security-group-ingress বেছে নিয়েছে। এটা template-এর top-level নামগুলো ছাপে। ছাঁকনির pattern টিউটোরিয়ালের নিজের, আর এতে থাকা চারটা space ভেতরের (nested) নাম বাদ রাখে।
aws ec2 authorize-security-group-ingress --generate-cli-skeleton | grep -E '^ "'টিউটোরিয়ালের run-এর output:
"CidrIp": "",
"FromPort": 0,
"GroupId": "",
"GroupName": "",
"IpPermissions": [
"IpProtocol": "",
"SourceSecurityGroupName": "",
"SourceSecurityGroupOwnerId": "",
"ToPort": 0,
"TagSpecifications": [
"DryRun": trueAWS বলে, একটা inbound rule-এর ঠিক একটা source লাগে, যা একটা IPv4 বা IPv6 address range, একটা prefix list, বা একটা security group Source 14সোর্স 14। সে আরও বলে, প্রতিটা rule-এর জন্য একটা protocol নির্দিষ্ট করতে হবে, আর TCP বা UDP-র জন্য একটা port বা port range Source 14সোর্স 14। টিউটোরিয়াল এগুলো নামের মিল দেখে মিলিয়েছে: range-এর জন্য CidrIp, protocol-এর জন্য IpProtocol, আর port-এর জন্য FromPort ও ToPort। এই মিলটা সে API reference-এর সঙ্গে যাচাই করেনি। EC2 API-র একটা DryRun parameter আছে। এটা যাচাই করে action-টার জন্য আপনার প্রয়োজনীয় permission আছে কি না, request আসলে না করেই Source 14সোর্স 14। এর জন্য account লাগে, তাই টিউটোরিয়াল এটা চালায়নি।
৪. পাশাপাশি পড়ুন: একটা VPC-র পরিকল্পনা ও তৈরি। এগুলো AWS-এর নিজের page। টিউটোরিয়াল এগুলো চালায়নি। খরচের সতর্কতা। একটা VPC ব্যবহারের জন্য কোনো বাড়তি খরচ নেই। তবে কিছু VPC উপাদানের জন্য খরচ আছে, যেমন NAT gateway, IP Address Manager, traffic mirroring, Reachability Analyzer আর Network Access Analyzer Source 1সোর্স 1। আপনি AWS Free Tier-এ EC2 service ব্যবহার না করলে public IPv4 address-এর জন্য খরচ হয় Source 1সোর্স 1।
- আপনার IP address range ঠিক করুন। নিশ্চিত করুন, আপনার VPC-গুলোর range আপনার নিজের network-এর range-এর সঙ্গে overlap করে না Source 3সোর্স 3।
- আপনার Availability Zone বেছে নিন। production environment-এর জন্য AWS অন্তত দুটো Availability Zone-এর সুপারিশ করে Source 3সোর্স 3। development বা test environment-এর জন্য আপনি শুধু একটা Availability Zone-এ resource চালিয়ে টাকা বাঁচাতে পারেন Source 3সোর্স 3।
- আপনার internet connectivity-র পরিকল্পনা করুন। একটা private subnet-এর instance যেন internet-এ পৌঁছায় কিন্তু অযাচিত inbound সংযোগ না আসে, সে জন্য প্রতিটা সক্রিয় Availability Zone-এ একটা public NAT gateway যোগ করুন, আর route table হালনাগাদ করুন Source 3সোর্স 3।
- console-এ VPC dashboard-এ Create VPC বেছে নিন, আর Resources to create-এর জন্য VPC and more বেছে নিন Source 26সোর্স 26। একটা VPC-র একটা IPv4 address range থাকতেই হবে Source 26সোর্স 26।
- NAT gateway option ঐচ্ছিক। page বলে, NAT gateway-এর সঙ্গে একটা খরচ যুক্ত আছে Source 26সোর্স 26।
৫. পাশাপাশি পড়ুন: একটা Application Load Balancer তৈরি। এটা AWS-এর নিজের page। টিউটোরিয়াল এটা চালায়নি। খরচের সতর্কতা। একটা Application Load Balancer যতক্ষণ চলে, প্রতিটা ঘণ্টা বা আংশিক ঘণ্টার জন্য আপনার খরচ হয়। প্রতিটা আংশিক ঘণ্টা পুরো এক ঘণ্টা হিসেবে বিল হয় Source 30সোর্স 30। page এই পূর্বশর্তগুলো বলে:
- আপনার application কোন Availability Zone আর IP address type সমর্থন করবে তা ঠিক করুন Source 17সোর্স 17।
- target instance-এর security group যেন listener port-এ client IP address থেকে traffic অনুমতি দেয়, নিশ্চিত করুন, যদি target instance ID দিয়ে নির্দিষ্ট করা হয় Source 17সোর্স 17।
- নিশ্চিত করুন, সেগুলো health check port-এ load balancer থেকে আসা traffic-ও অনুমতি দেয় Source 17সোর্স 17।
একটা Application Load Balancer তৈরির সময় আপনি load balancer, অন্তত একটা listener আর অন্তত একটা target group তৈরি করেন Source 17সোর্স 17। এটা পরীক্ষা করতে যাচাই করুন যে আপনার EC2 instance প্রাথমিক health check পাস করে, তারপর দেখুন load balancer আপনার EC2 instance-এ traffic পাঠাচ্ছে কি না Source 17সোর্স 17। page load balancer মুছে ফেলার ধাপগুলোর link দেয় Source 17সোর্স 17।
৬. পাশাপাশি পড়ুন: একটা CloudFront standard distribution। এটা AWS-এর নিজের টিউটোরিয়াল। টিউটোরিয়াল এটা চালায়নি। খরচের সতর্কতা। আপনি distribution আর S3 bucket শুধু শেখার অনুশীলনের জন্য বানালে সেগুলো মুছে ফেলুন, যাতে আর খরচ না জমে Source 25সোর্স 25। আগে distribution মুছুন Source 25সোর্স 25।
- ধাপগুলো একটা standard distribution দাঁড় করায় Source 25সোর্স 25। টিউটোরিয়ালের জন্য আপনি একটা S3 bucket বানান, নমুনা hello world file-সহ, যা দিয়ে একটা সাধারণ webpage বানাবেন Source 25সোর্স 25।
- distribution আপনার S3 origin-এ authenticated request পাঠাতে origin access control (OAC) ব্যবহার করে Source 25সোর্স 25।
- Create distribution বেছে নিন। CloudFront আপনার জন্য S3 bucket policy হালনাগাদ করে Source 25সোর্স 25।
- আপনার distribution-এর deploy শেষ হলে Last modified field Deploying থেকে একটা তারিখ ও সময়ে বদলে যায় Source 25সোর্স 25।
- distribution আপনার object-গুলো CloudFront edge location-এ default ২৪ ঘণ্টা রাখে। সর্বনিম্ন মেয়াদ ০ সেকেন্ড Source 25সোর্স 25।
How a tester uses it
- A connectivity checklist. Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3. AWS lists the other parts: a route to the internet gateway, public IP addresses, and a security group that allows the traffic Source 3সোর্স 3.
- Why a connection fails. If the security group has no rule for SSH, you could not connect using SSH Source 9সোর্স 9. A network ACL is stateless, so responses to allowed inbound traffic are not automatically allowed Source 10সোর্স 10. Network ACL rules are evaluated from the lowest number, and the first match is applied Source 10সোর্স 10.
- Flow logs as evidence. Flow logs capture information about the IP traffic going to and from network interfaces in your VPC Source 12সোর্স 12. Flow logs can help with diagnosing overly restrictive security group rules Source 12সোর্স 12. Flow log data is collected outside of the path of your network traffic, so it does not affect network throughput or latency Source 12সোর্স 12.
- Reachability Analyzer. It is a configuration analysis tool for connectivity testing between a source resource and a destination resource in your VPCs Source 13সোর্স 13. When the destination is not reachable, it identifies the blocking component Source 13সোর্স 13. You can use it to verify that your network configuration matches your intended connectivity Source 13সোর্স 13. You can also automate the verification of your connectivity intent as your network configuration changes Source 13সোর্স 13. AWS lists Reachability Analyzer among the VPC components that have charges Source 1সোর্স 1.
- Rule changes take a moment. A small delay might occur before a security group rule change reaches the instances Source 14সোর্স 14.
- Private subnets. Use private subnets for your instances if they should not be accessed directly from the internet Source 11সোর্স 11. Use a bastion host or NAT gateway for internet access from instances in private subnets Source 11সোর্স 11.
- IP ranges in test data. The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5. For connectivity between multiple VPCs, the VPCs must have no overlapping IP addresses Source 3সোর্স 3.
- Load balancer behavior. A new target must pass one health check to be considered healthy Source 18সোর্স 18. The load balancer puts a target back in service when the health checks exceed
HealthyThresholdCountconsecutive successes Source 18সোর্স 18. If every target in a target group is unhealthy, the load balancer routes requests to all of them Source 18সোর্স 18. Listener rules are evaluated in priority order Source 16সোর্স 16. Health checks do not support WebSockets Source 18সোর্স 18. - DNS routing tests. A weighted policy routes traffic to multiple resources in proportions that you specify Source 20সোর্স 20. A multivalue answer policy responds with up to eight healthy records selected at random Source 20সোর্স 20. Route 53 can route internet traffic away from unhealthy resources Source 19সোর্স 19.
- Cache tests. If an object is not in the cache, CloudFront forwards the request to the origin, and it adds the object to the cache for the next time Source 22সোর্স 22. After a file expires, CloudFront forwards the request to the origin to verify that the cache contains the latest version Source 23সোর্স 23. The origin returns 304 Not Modified or 200 OK Source 23সোর্স 23. Errors, for example 404 Not Found, also stay in the cache for a time Source 23সোর্স 23.
- Cache invalidation or file versioning. If you invalidate a file, the user might continue to see the old version until it expires from those caches Source 24সোর্স 24. Versioning is less expensive, because you don't have to pay for invalidating files Source 24সোর্স 24.
সহজ English
- A connectivity checklist. Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3. AWS lists the other parts: a route to the internet gateway, public IP addresses, and a security group that allows the traffic Source 3সোর্স 3.
- Why a connection fails. If the security group has no rule for SSH, you could not connect using SSH Source 9সোর্স 9. A network ACL is stateless, so responses to allowed inbound traffic are not automatically allowed Source 10সোর্স 10. Network ACL rules are evaluated from the lowest number, and the first match is applied Source 10সোর্স 10.
- Flow logs as evidence. Flow logs capture information about the IP traffic going to and from network interfaces in your VPC Source 12সোর্স 12. Flow logs can help with diagnosing overly restrictive security group rules Source 12সোর্স 12. Flow log data is collected outside of the path of your network traffic, so it does not affect network throughput or latency Source 12সোর্স 12.
- Reachability Analyzer. It is a configuration analysis tool for connectivity testing between a source resource and a destination resource in your VPCs Source 13সোর্স 13. When the destination is not reachable, it identifies the blocking component Source 13সোর্স 13. You can use it to verify that your network configuration matches your intended connectivity Source 13সোর্স 13. You can also automate the verification of your connectivity intent as your network configuration changes Source 13সোর্স 13. AWS lists Reachability Analyzer among the VPC components that have charges Source 1সোর্স 1.
- Rule changes take a moment. A small delay might occur before a security group rule change reaches the instances Source 14সোর্স 14.
- Private subnets. Use private subnets for your instances if they should not be accessed directly from the internet Source 11সোর্স 11. Use a bastion host or NAT gateway for internet access from instances in private subnets Source 11সোর্স 11.
- IP ranges in test data. The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5. For connectivity between multiple VPCs, the VPCs must have no overlapping IP addresses Source 3সোর্স 3.
- Load balancer behavior. A new target must pass one health check to be considered healthy Source 18সোর্স 18. The load balancer puts a target back in service when the health checks exceed
HealthyThresholdCountconsecutive successes Source 18সোর্স 18. If every target in a target group is unhealthy, the load balancer routes requests to all of them Source 18সোর্স 18. Listener rules are evaluated in priority order Source 16সোর্স 16. Health checks do not support WebSockets Source 18সোর্স 18. - DNS routing tests. A weighted policy routes traffic to multiple resources in proportions that you specify Source 20সোর্স 20. A multivalue answer policy responds with up to eight healthy records selected at random Source 20সোর্স 20. Route 53 can route internet traffic away from unhealthy resources Source 19সোর্স 19.
- Cache tests. If an object is not in the cache, CloudFront forwards the request to the origin, and it adds the object to the cache for the next time Source 22সোর্স 22. After a file expires, CloudFront forwards the request to the origin to verify that the cache contains the latest version Source 23সোর্স 23. The origin returns 304 Not Modified or 200 OK Source 23সোর্স 23. Errors, for example 404 Not Found, also stay in the cache for a time Source 23সোর্স 23.
- Cache invalidation or file versioning. If you invalidate a file, the user might continue to see the old version until it expires from those caches Source 24সোর্স 24. Versioning is less expensive, because you don't have to pay for invalidating files Source 24সোর্স 24.
বাংলা ব্যাখ্যা
- connectivity-র একটা checklist। একটা VPC-তে internet gateway attach করলেই আপনার instance স্বয়ংক্রিয়ভাবে internet থেকে পৌঁছানোর যোগ্য হয়ে যায় না Source 3সোর্স 3। AWS বাকি অংশগুলো তালিকা করে: internet gateway-এর একটা route, public IP address, আর এমন একটা security group, যা traffic অনুমতি দেয় Source 3সোর্স 3।
- কেন একটা সংযোগ ব্যর্থ হয়। security group-এ SSH-এর কোনো নিয়ম না থাকলে আপনি SSH দিয়ে সংযোগ দিতে পারবেন না Source 9সোর্স 9। network ACL stateless, তাই অনুমতি পাওয়া inbound traffic-এর response স্বয়ংক্রিয়ভাবে অনুমতি পায় না Source 10সোর্স 10। network ACL-এর নিয়ম সবচেয়ে কম নম্বর থেকে যাচাই হয়, আর প্রথম মিল প্রয়োগ হয় Source 10সোর্স 10।
- প্রমাণ হিসেবে flow log। flow log আপনার VPC-র network interface-এ আসা-যাওয়া IP traffic-এর তথ্য ধরে রাখে Source 12সোর্স 12। flow log অতি-কড়া security group নিয়মের কারণ খুঁজতে সাহায্য করতে পারে Source 12সোর্স 12। flow log-এর data সংগ্রহ হয় আপনার network traffic-এর পথের বাইরে, তাই এটা network throughput বা latency-র ওপর প্রভাব ফেলে না Source 12সোর্স 12।
- Reachability Analyzer। এটা একটা configuration analysis tool, আপনার VPC-গুলোর একটা source resource আর একটা destination resource-এর মধ্যে connectivity test করতে Source 13সোর্স 13। destination পৌঁছানো না গেলে এটা বাধা সৃষ্টিকারী উপাদান শনাক্ত করে Source 13সোর্স 13। আপনি এটা দিয়ে যাচাই করতে পারেন, আপনার network configuration আপনার চাওয়া connectivity-র সঙ্গে মেলে কি না Source 13সোর্স 13। আপনার network configuration বদলানোর সঙ্গে সঙ্গে connectivity-র উদ্দেশ্য যাচাইও স্বয়ংক্রিয় করতে পারেন Source 13সোর্স 13। AWS যেসব VPC উপাদানের জন্য খরচের কথা বলে, তার তালিকায় Reachability Analyzer-ও আছে Source 1সোর্স 1।
- নিয়মের বদল সময় নেয়। একটা security group নিয়মের বদল instance-গুলোতে পৌঁছাতে অল্প দেরি হতে পারে Source 14সোর্স 14।
- private subnet। আপনার instance সরাসরি internet থেকে পৌঁছানোর যোগ্য না হওয়া উচিত হলে সেগুলোর জন্য private subnet ব্যবহার করুন Source 11সোর্স 11। private subnet-এর instance-এর internet access-এর জন্য একটা bastion host বা NAT gateway ব্যবহার করুন Source 11সোর্স 11।
- test data-র IP range। প্রতিটা subnet CIDR block-এর প্রথম চারটা IP address আর শেষ IP address আপনার ব্যবহারের জন্য পাওয়া যায় না Source 5সোর্স 5। একাধিক VPC-র মধ্যে সংযোগের জন্য VPC-গুলোর কোনো IP address overlap করা চলবে না Source 3সোর্স 3।
- load balancer-এর আচরণ। একটা নতুন target সুস্থ গণ্য হতে একটা health check পাস করতে হয় Source 18সোর্স 18। health check পরপর
HealthyThresholdCount-এর বেশি বার সফল হলে load balancer target-টাকে আবার service-এ ফিরিয়ে আনে Source 18সোর্স 18। একটা target group-এর সব target অসুস্থ হলে load balancer সবগুলোতেই request route করে Source 18সোর্স 18। listener-এর নিয়ম priority অনুযায়ী যাচাই হয় Source 16সোর্স 16। health check WebSocket সমর্থন করে না Source 18সোর্স 18। - DNS routing test। একটা weighted policy একাধিক resource-এ আপনার নির্দিষ্ট করা অনুপাতে traffic route করে Source 20সোর্স 20। একটা multivalue answer policy সর্বোচ্চ আটটা সুস্থ record দিয়ে উত্তর দেয়, যা এলোমেলোভাবে বাছা Source 20সোর্স 20। Route 53 internet traffic অসুস্থ resource থেকে সরিয়ে নিতে পারে Source 19সোর্স 19।
- cache test। একটা object cache-এ না থাকলে CloudFront request-টা origin-এ forward করে, আর পরের বারের জন্য object-টা cache-এ যোগ করে Source 22সোর্স 22। একটা file-এর মেয়াদ শেষ হলে CloudFront origin-এ request forward করে যাচাই করে যে cache-এ সর্বশেষ version আছে কি না Source 23সোর্স 23। origin 304 Not Modified বা 200 OK ফেরত দেয় Source 23সোর্স 23। error, যেমন 404 Not Found, কিছু সময় cache-এ থাকে Source 23সোর্স 23।
- cache invalidation না file versioning। আপনি একটা file invalidate করলে user পুরোনো version-ই দেখতে থাকতে পারে, যতক্ষণ না সেই cache থেকে তার মেয়াদ শেষ হয় Source 24সোর্স 24। versioning কম খরচের, কারণ file invalidate করার জন্য আপনাকে দাম দিতে হয় না Source 24সোর্স 24।
Common mistakes
- Thinking an internet gateway is enough. Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3.
- A nondefault subnet without a public address. By default, an instance in a nondefault subnet has a private IPv4 address but no public IPv4 address Source 2সোর্স 2. Such instances can communicate with each other, but can't access the internet Source 2সোর্স 2.
- Opening SSH or RDP to everyone. If you specify 0.0.0.0/0 (IPv4) and ::/ (IPv6), anyone can access your instances from any IP address using the specified protocol Source 9সোর্স 9.
- Expecting a network ACL to work like a security group. Network ACLs are stateless Source 10সোর্স 10. Security groups are stateful Source 9সোর্স 9.
- Expecting a security group to filter everything. Security groups do not filter traffic to and from Amazon DNS, Amazon DHCP, and EC2 instance metadata, among others Source 9সোর্স 9. Network ACLs can't block traffic to the Instance Metadata Service (IMDS) Source 10সোর্স 10.
- Overlapping address ranges. The CIDR blocks of the subnets of a VPC cannot overlap Source 5সোর্স 5. VPCs that need connectivity must have no overlapping IP addresses Source 3সোর্স 3.
- Using a host address as a CIDR block. Python's
ip_networkraises a ValueError if the network has host bits set Source 27সোর্স 27. AWS modifies the CIDR block of a subnet to its canonical form instead Source 5সোর্স 5. - Counting every subnet address as usable. The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5.
- Expecting inbound connections through a NAT gateway. External services can't initiate a connection with the instances behind a NAT gateway Source 8সোর্স 8.
- Forgetting what costs money. There is a cost associated with NAT gateways Source 26সোর্স 26. You are charged for each hour or partial hour that an Application Load Balancer is running Source 30সোর্স 30.
- Reading "all targets unhealthy" as "no traffic". If all targets fail health checks at the same time in all enabled Availability Zones, the load balancer fails open Source 18সোর্স 18.
- Blocking the health check. The security groups for target instances must allow traffic from the load balancer on the health check port Source 17সোর্স 17.
- Expecting one fixed DNS answer. A multivalue answer policy responds with up to eight healthy records selected at random Source 20সোর্স 20. A weighted policy routes traffic in proportions that you specify Source 20সোর্স 20.
- Testing a changed file before the cache expires. Typically, CloudFront serves a file from an edge location until the cache duration that you specified passes Source 23সোর্স 23.
- Invalidating when versioning would do. If you want to update your files frequently, AWS recommends that you primarily use file versioning Source 24সোর্স 24.
- Deleting in the wrong order. AWS says to delete the distribution first Source 25সোর্স 25.
সহজ English
- Thinking an internet gateway is enough. Attaching an internet gateway to a VPC does not automatically make your instances accessible from the internet Source 3সোর্স 3.
- A nondefault subnet without a public address. By default, an instance in a nondefault subnet has a private IPv4 address but no public IPv4 address Source 2সোর্স 2. Such instances can communicate with each other, but can't access the internet Source 2সোর্স 2.
- Opening SSH or RDP to everyone. If you specify 0.0.0.0/0 (IPv4) and ::/ (IPv6), anyone can access your instances from any IP address using the specified protocol Source 9সোর্স 9.
- Expecting a network ACL to work like a security group. Network ACLs are stateless Source 10সোর্স 10. Security groups are stateful Source 9সোর্স 9.
- Expecting a security group to filter everything. Security groups do not filter traffic to and from Amazon DNS, Amazon DHCP, and EC2 instance metadata, among others Source 9সোর্স 9. Network ACLs can't block traffic to the Instance Metadata Service (IMDS) Source 10সোর্স 10.
- Overlapping address ranges. The CIDR blocks of the subnets of a VPC cannot overlap Source 5সোর্স 5. VPCs that need connectivity must have no overlapping IP addresses Source 3সোর্স 3.
- Using a host address as a CIDR block. Python's
ip_networkraises a ValueError if the network has host bits set Source 27সোর্স 27. AWS modifies the CIDR block of a subnet to its canonical form instead Source 5সোর্স 5. - Counting every subnet address as usable. The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use Source 5সোর্স 5.
- Expecting inbound connections through a NAT gateway. External services can't initiate a connection with the instances behind a NAT gateway Source 8সোর্স 8.
- Forgetting what costs money. There is a cost associated with NAT gateways Source 26সোর্স 26. You are charged for each hour or partial hour that an Application Load Balancer is running Source 30সোর্স 30.
- Reading "all targets unhealthy" as "no traffic". If all targets fail health checks at the same time in all enabled Availability Zones, the load balancer fails open Source 18সোর্স 18.
- Blocking the health check. The security groups for target instances must allow traffic from the load balancer on the health check port Source 17সোর্স 17.
- Expecting one fixed DNS answer. A multivalue answer policy responds with up to eight healthy records selected at random Source 20সোর্স 20. A weighted policy routes traffic in proportions that you specify Source 20সোর্স 20.
- Testing a changed file before the cache expires. Typically, CloudFront serves a file from an edge location until the cache duration that you specified passes Source 23সোর্স 23.
- Invalidating when versioning would do. If you want to update your files frequently, AWS recommends that you primarily use file versioning Source 24সোর্স 24.
- Deleting in the wrong order. AWS says to delete the distribution first Source 25সোর্স 25.
বাংলা ব্যাখ্যা
- ভাবা যে একটা internet gateway-ই যথেষ্ট। একটা VPC-তে internet gateway attach করলেই আপনার instance স্বয়ংক্রিয়ভাবে internet থেকে পৌঁছানোর যোগ্য হয়ে যায় না Source 3সোর্স 3।
- public address ছাড়া একটা nondefault subnet। by default একটা nondefault subnet-এর instance-এর একটা private IPv4 address থাকে কিন্তু public IPv4 address থাকে না Source 2সোর্স 2। এমন instance একে অপরের সঙ্গে যোগাযোগ করতে পারে, কিন্তু internet-এ ঢুকতে পারে না Source 2সোর্স 2।
- SSH বা RDP সবার জন্য খুলে দেওয়া। আপনি 0.0.0.0/0 (IPv4) আর ::/ (IPv6) দিলে যে কেউ যেকোনো IP address থেকে নির্দিষ্ট protocol দিয়ে আপনার instance-এ ঢুকতে পারে Source 9সোর্স 9।
- ভাবা যে network ACL একটা security group-এর মতো কাজ করবে। network ACL stateless Source 10সোর্স 10। security group stateful Source 9সোর্স 9।
- ভাবা যে security group সবকিছু ছাঁকবে। security group অন্যান্যের মধ্যে Amazon DNS, Amazon DHCP আর EC2 instance metadata-র traffic ছাঁকে না Source 9সোর্স 9। network ACL Instance Metadata Service (IMDS)-এর traffic আটকাতে পারে না Source 10সোর্স 10।
- overlap করা address range। একটা VPC-র subnet-গুলোর CIDR block overlap করতে পারে না Source 5সোর্স 5। যে VPC-গুলোর মধ্যে সংযোগ দরকার, তাদের কোনো IP address overlap করা চলবে না Source 3সোর্স 3।
- একটা host address-কে CIDR block হিসেবে দেওয়া। network-এ host bit সেট করা থাকলে Python-এর
ip_networkএকটা ValueError তোলে Source 27সোর্স 27। AWS তার বদলে subnet-এর CIDR block-কে canonical রূপে বদলে দেয় Source 5সোর্স 5। - একটা subnet-এর প্রতিটা address ব্যবহারযোগ্য ধরা। প্রতিটা subnet CIDR block-এর প্রথম চারটা IP address আর শেষ IP address আপনার ব্যবহারের জন্য পাওয়া যায় না Source 5সোর্স 5।
- একটা NAT gateway দিয়ে inbound সংযোগ আশা করা। NAT gateway-এর পেছনের instance-গুলোতে বাইরের service সংযোগ শুরু করতে পারে না Source 8সোর্স 8।
- কিসে খরচ হয় ভুলে যাওয়া। NAT gateway-এর সঙ্গে একটা খরচ যুক্ত আছে Source 26সোর্স 26। একটা Application Load Balancer যতক্ষণ চলে, প্রতিটা ঘণ্টা বা আংশিক ঘণ্টার জন্য আপনার খরচ হয় Source 30সোর্স 30।
- "সব target অসুস্থ" মানে "কোনো traffic নেই" ধরে নেওয়া। সব enabled Availability Zone-এ একই সময়ে সব target health check-এ ব্যর্থ হলে load balancer fail open করে Source 18সোর্স 18।
- health check আটকে দেওয়া। target instance-এর security group-কে health check port-এ load balancer থেকে আসা traffic অনুমতি দিতে হবে Source 17সোর্স 17।
- একটাই স্থির DNS উত্তর আশা করা। একটা multivalue answer policy সর্বোচ্চ আটটা সুস্থ record দিয়ে উত্তর দেয়, যা এলোমেলোভাবে বাছা Source 20সোর্স 20। একটা weighted policy আপনার নির্দিষ্ট করা অনুপাতে traffic route করে Source 20সোর্স 20।
- cache-এর মেয়াদ শেষের আগে বদলানো file test করা। সাধারণত CloudFront একটা file একটা edge location থেকে পরিবেশন করে, আপনার নির্দিষ্ট করা cache-এর মেয়াদ না পেরোনো পর্যন্ত Source 23সোর্স 23।
- versioning দিয়ে কাজ চললে invalidate করা। আপনি আপনার file ঘন ঘন হালনাগাদ করতে চাইলে AWS সুপারিশ করে, মূলত file versioning ব্যবহার করুন Source 24সোর্স 24।
- ভুল ক্রমে মুছে ফেলা। AWS বলে, আগে distribution মুছুন Source 25সোর্স 25।
What a tester can check
Tutorial advice
This list is the tutorial's own advice for a tester who works with AWS networking and delivery.
- Draw the path of a failing request hop by hop before you change a rule: client, DNS, cache, load balancer, security group, network ACL, route table, and target.
- Change one thing at a time, and wait for it to take effect before you test again.
- When a test cannot connect, check the route table, the public address, the security group, and the network ACL.
- Keep the CIDR ranges of your test VPCs in one file, and check that they do not overlap before you create anything.
- Test a security group rule with an address inside its range and an address just outside it.
- For a load balancer, test a healthy target, an unhealthy target, and the case where every target is unhealthy.
- For a weighted or multivalue DNS answer, repeat the query many times and look at the spread, not at one answer.
- For a cache, ask for the same object twice and compare the responses. Then change the file at the origin and ask again.
- Use a new file name instead of an invalidation when a test changes a file often.
- Delete NAT gateways, load balancers, and distributions on the day that you create them for a test.
- Do not use
0.0.0.0/0for SSH or RDP in a shared environment, even for a short test. - Print a CLI template before a real call, and read its parameter names.
সহজ English
Tutorial advice
This list is the tutorial's own advice for a tester who works with AWS networking and delivery.
- Draw the path of a failing request hop by hop before you change a rule: client, DNS, cache, load balancer, security group, network ACL, route table, and target.
- Change one thing at a time, and wait for it to take effect before you test again.
- When a test cannot connect, check the route table, the public address, the security group, and the network ACL.
- Keep the CIDR ranges of your test VPCs in one file, and check that they do not overlap before you create anything.
- Test a security group rule with an address inside its range and an address just outside it.
- For a load balancer, test a healthy target, an unhealthy target, and the case where every target is unhealthy.
- For a weighted or multivalue DNS answer, repeat the query many times and look at the spread, not at one answer.
- For a cache, ask for the same object twice and compare the responses. Then change the file at the origin and ask again.
- Use a new file name instead of an invalidation when a test changes a file often.
- Delete NAT gateways, load balancers, and distributions on the day that you create them for a test.
- Do not use
0.0.0.0/0for SSH or RDP in a shared environment, even for a short test. - Print a CLI template before a real call, and read its parameter names.
বাংলা ব্যাখ্যা
Tutorial advice
এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, এমন একজন tester-এর জন্য যিনি AWS networking আর delivery নিয়ে কাজ করেন।
- একটা নিয়ম বদলানোর আগে একটা ব্যর্থ request-এর পথ ধাপে ধাপে আঁকুন: client, DNS, cache, load balancer, security group, network ACL, route table আর target।
- একবারে একটা জিনিস বদলান, আর আবার test করার আগে সেটা কার্যকর হওয়া পর্যন্ত অপেক্ষা করুন।
- একটা test সংযোগ দিতে না পারলে route table, public address, security group আর network ACL দেখুন।
- আপনার test VPC-গুলোর CIDR range একটা file-এ রাখুন, আর কিছু বানানোর আগে যাচাই করুন সেগুলো overlap করে না।
- একটা security group rule test করুন তার range-এর ভেতরের একটা address আর ঠিক বাইরের একটা address দিয়ে।
- একটা load balancer-এর জন্য test করুন একটা সুস্থ target, একটা অসুস্থ target, আর সব target অসুস্থ হওয়ার ঘটনা।
- একটা weighted বা multivalue DNS উত্তরের জন্য query অনেকবার চালান আর একটা উত্তর নয়, ছড়িয়ে থাকাটা দেখুন।
- একটা cache-এর জন্য একই object দুবার চান আর response মেলান। তারপর origin-এ file বদলে আবার চান।
- একটা test প্রায়ই file বদলালে invalidation-এর বদলে নতুন file-এর নাম ব্যবহার করুন।
- একটা test-এর জন্য বানানো NAT gateway, load balancer আর distribution বানানোর দিনেই মুছে ফেলুন।
- একটা shared environment-এ অল্প সময়ের test-এও SSH বা RDP-র জন্য
0.0.0.0/0ব্যবহার করবেন না। - একটা আসল call-এর আগে একটা CLI template ছাপুন, আর তার parameter-এর নাম পড়ুন।
Key words
| Term | Meaning |
|---|---|
| VPC | A virtual network dedicated to your AWS account |
| Subnet | A range of IP addresses in your VPC; it must reside in a single Availability Zone |
| CIDR block | The IP addresses of a VPC, written in Classless Inter-Domain Routing (CIDR) notation; the allowed block size of a VPC is between a /16 and a /28 netmask |
| Route table | A set of rules, called routes, that determine where network traffic from your subnet or gateway is directed |
| Internet gateway | A gateway that connects your VPC to the internet |
| Public subnet | A subnet that is associated with a route table that has a route to an internet gateway |
| NAT gateway | Lets instances in a private subnet connect to services outside your VPC, but external services can't initiate a connection with those instances |
| Security group | Controls the traffic that is allowed to reach and leave the resources that it is associated with; it is stateful |
| Network ACL | Allows or denies specific inbound or outbound traffic at the subnet level; it is stateless |
| Flow logs | Capture information about the IP traffic going to and from network interfaces in your VPC |
| Reachability Analyzer | A configuration analysis tool for connectivity testing between a source resource and a destination resource in your VPCs |
| Listener | Checks for connection requests from clients, using the protocol and port that you configure |
| Target group | Routes requests to one or more registered targets, such as EC2 instances |
| Health check | A request that a load balancer sends periodically to a registered target, to test its status |
| Fail open | When every target is unhealthy, the load balancer routes requests to all of them |
| Route 53 | A highly available and scalable Domain Name System (DNS) web service |
| Routing policy | You choose it when you create a record; it determines how Route 53 responds to queries |
| CloudFront | A web service that speeds up distribution of static and dynamic web content through edge locations |
| TTL | Time to Live; if you opt out of a cache policy, the default TTL is 24 hours |
| Invalidation | Removing a file from CloudFront edge caches before it expires |