Aws cli
-
create Iam user
-
install awscli click here for offical installtion guide
- choco
- winget
- homebrew
Install choco in windows run powershell admin and run below cmd
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install awscli -y --force
Create IAM user
select user and click on access keys
configure cridentals in local
aws ec2 describe-vpcs --filters "Name=tag-key,Values=qt-company"
aws ec2 describe-vpcs \
--filters "Name=tag-key,Values=Name" \
--query "Vpcs[*].[VpcId, Tags[?Key=='Name'].Value | [0]]" \
--output table
aws ec2 create-subnet \
--vpc-id vpc-0d45e01e2612d9fbd \
--cidr-block 10.0.30.0/24 \
--tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=my-ipv4-only-subnet}]'
aws ec2 create-subnet \
--vpc-id vpc-0d45e01e2612d9fbd \
--cidr-block 10.0.31.0/24 \
--tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=pub-1}]'
aws ec2 create-subnet \
--vpc-id vpc-0d45e01e2612d9fbd \
--cidr-block 10.0.32.0/24 \
--tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=pub-2}]'
aws ec2 create-subnet \
--vpc-id vpc-0d45e01e2612d9fbd \
--cidr-block 10.0.33.0/24 \
--tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=pub-2}]' \
--availability-zone us-east-2a
Task:
- create 6 subnets names like pub-1, pub-2, pub3, pvt-1, pvt-2, pvt3 add diiferent zones like us-east-2a, us-east-2b, us-east-2c.
