CA Notepad
CA Notepad
They regulate:
access to ports
ip rages ipv4 and ipv6
control of inbound network( from other to the instance)
control of outbound network ( from instance to the other)
>>>>AWS
ec2
security group
scroll right you will see default security group >>>>it allows all inbound rule
blocked
>>Inbound rules
add rule
type---search for rdp
source type --anywhere ipv4
scroll down
>>>Instances
click on launch instances
name---Linux
amazon Linux
scroll down
instance type--free tier te2 micro
click on create key pair---Linuxkey pair
scroll down
private key file format ----.ppk(PuTTy)
>>advanced details
paste code
launch instance
>>>.go for instances --- scroll right --security check unabled the http and https
if errors came check
>>search puttygen
load
click on allfiles---go downloads--Linux keypairs---saveas a private key---yes---
name--linuxputty--save.
>>search putty
putty
access the instance
saved sessions----linuxserver--save
>>.cmds---whoami
ping google.com
pwd
ctrlc
>>>>>{search puttygen
click load--all files--downloaded keypair i.e.,Linux key pair-- open---save as a
private key---click---yes--enter name save.now password created.
>>>ports to know
22=SSH(secure shell)
21=FTP-----upload files into a file share
22=SFTP(secure file transfer protocol)-----upload files using ssh
80=HTTP--access unsecured
443=HTTPS--acess secured websites
3389=RDP(remote desktop protocol)
>>>ssh table--
>>>>elastic ip----
**attach static Ip addr to ec2 Linux instance---
launch one ec2 Linux instance---copy ip addr--paste it in new tab---see the
addr----now to stop the instance------select instance-----instance state---stop
instance----again restart---instance state ---start and refresh---now the ip addrr
changed---for this we have to attach elastic ip address.
now check the ip addrr of instance ---stop and start the instance.----now it will
be a static ip addrrss.----------before terminate the instance we need to
disassociate the instance----actions---disassociate the instance.----go to instance
and terminate the instance.----after in ec2--actions---release the ip addrr---
delete
>>>>creat ENI
before that launch 2 Linux instances---network and secu. we have network
interfaces----click it--name as---myENI---subnet is 1b--(ec2--instance--select any
instance---availability zone we see)---ipv4 is auto----scroll-----attach a selurity
grp-----security grp---linux---scroll---create network interface--attach this eni
to a specific instance----select eni---actions----attach--vpc---instance is 2
instances add by check the ids----attach.
to check this go to instance select and below--networking---able to see the 2 eni.
****cmd---uptime
***cmd---uptime
>>>EBS
launch instance---config--
launch---select---go for storage tab--see volume size---?????---photo in wa
search diskmanagement
snapshots*
select volume and attach the volume---device name select 1st one---attach the
volume---
in harddisk partition.
Initialise the harddisk---right click --intialise. partions 2 types---mbr and gpt.
MBR--dive into 4 partitions--
gpt -128-unlimited partition.
select gpt ---ok--open file explorer--windows c
unallocate---right click---convert the disk into dynamic disk---disk 1---ok---to
create d drive---right click unallocate---simple volume---nxt--nxt--finsh.
see in disk 0---a basic disk.
new volume d drive---new folder name as ABC--now take snapshot of this volume---
minimise tab---in volumes --scroll--see snapshot---click---1st recycle reduntion
rule---click recycle bin---create reductions ule---name demo rule---
ebs site---reduction period--1day---scroll---create reduction role.now go to ebs
volumes-click on volume---create snapshots--in volume iddddddddd---select your
volume---scroll---create snapshot
go to snapshots---create a snapshot---volume-id---description--demo snap---
create.to use snapshot click on that go to actions---select 1c region---encrypt---
default kms key--create volume.
cmds---
1.list command--ls /mnt/efs/fs1
2.to get admin access---sudo su
3.create file---echo "hello world1"> /mnt/efs/fs1/hellow.txt
4.cat /mnt/efs/fs1/hellow.txt
>>>>Dynamic scaling
click on auto scaling group---click on auto scaling---Recurrence--every day and put
time zone-----create predictive scaling ---enable---create dynamic scaling---pu
tdesired as a 1---see in action history---go to asg---create dynamic scaling---
click on predictive scale policy----name----cpuutilization--50%target
utilization----create-----taget value as a 4----cretae----go to edit---set max.
desired capacity to 4---update----go to instanes--connect any 1 instance(now gong
to give stress)
cmds____1.sudo yum install -y stress
2.stress --cpu 4--timeout 60
>>>>>>S3 class
>>versioning
go to bucket --select the bucket---properties---bucket versioning ----edit---
enable---save changes----go to html code----edit---click on save---go to objects---
upload---add files---upload----go to the webpage---refresh.
click on buckets--show versions--enable--version id----