VPC
VPC
Dedicated tenancy ensures all EC2 instances that are launched in a VPC run on hardware that's
dedicated to a single customer.
Carrier Gateway :
Carrier gateways are only available for VPCs that contain subnets in a Wavelength Zone.
The carrier gateway provides connectivity between your Wavelength Zone and the
telecommunication carrier, and devices on the telecommunication carrier network.
AWS Wavelength is an AWS Infrastructure offering optimized for mobile edge computing
applications. Wavelength Zones are AWS infrastructure deployments that embed AWS compute and
storage services within communications service providers’ (CSP) datacenters at the edge of the 5G
network, so application traffic from 5G devices can reach application servers running in Wavelength
Zones without leaving the telecommunications network. This avoids the latency that would result
from application traffic having to traverse multiple hops across the Internet to reach their destination,
enabling customers to take full advantage of the latency and bandwidth benefits offered by modern
5G networks.
AWS Wavelength Zones are available in eight cities across the U.S. with Verizon and in Tokyo, Japan
with KDDI.
By default, all instances in a nondefault VPC receive an unresolvable host name that AWS assigns (for
example, ip-10-0-0-202). You can assign your own domain name to your instances, and use up to four
of your own DNS servers. To do that, you must create a custom set of DHCP options to use with the
VPC.
VPC Enpoints:
A VPC endpoints enables you to access your vpc to supported AWS services from Private instances
also in your VPC do not require public IP address to communicate with the resources in the services.
Scenario: We have a One VPC , Route Table, IGW, Private Subnet, Public Subnet, and One EC2 in
Public Subnet and One EC2 in Private Subnet we can able to call S3 bucket from Public Subnet EC2 via
IAM Role but if we want to access S3 bucket from Private Subnet EC2 then we have to configure VPC
Endpoint.
Create a role in which EC2 service can able to call the S3 Bucket.
Attach this role to both the instances
OR
#aws s3 ls - - region
#aws s3 mb s3://prafulsi
#aws s3 rb s3://prafulsi
#aws s3 rm s3://prafulsi/queries.txt
When to use an AWS S3 VPC endpoint - YouTube
VPC Peering
A VPC peering connection is a networking connection between two VPCs that enables you to route
traffic between them using private IPv4 addresses or IPv6 addresses in between Private Subnets.
After creating VPC Peering we need to add route in route table of VPC-A of VPC-B and vise-versa.
Difference Between NACL and SG
Stateful : If we allow http port in Inbound rule then its allow in outbound automatically.
Stateless : if we want to allow http port then we need to allow this port in both Inbound as well as outbound
rule.
The highest number that you can use for a rule is 32766. We recommend that you start by creating
rules in increments (for example, increments of 10 or 100) so that you can insert new rules where you
need to later on. A network ACL has separate inbound and outbound rules, and each rule can either
allow or deny traffic.
Use Case
We have a multiple Public Instance Name as Public-EC2_1, Public-EC2_2, Public-EC2_3 and having
multiple Private EC2 instances like Private-ec2-1, Private-ec2-2, Private-ec2-3 what we need to do
here we have to apply policy in which only Private-ec2-1 can be access from only Public-EC2_1 not
others.
Configure Private-ec2-1 Security group in such a way that in which it can be access from Public-
EC2_1 only
go to the Private-ec2-1 edit inbound rule -------add rule------select ssh protocol and in source field
select SG of Private-ec2-1 and save the SG.
scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz ec2-user@mec2-50-17-
16-67.compute-1.amazonaws.com:~/.