AWS CLI Launching Instance and attaching Block Storage to the Instance
Creating a AWS key pair in CLI This is the command to create a key pair for AWS instance. Here aws specifies command, ec2 specifies the service, create-key-pair is the command, --key-name is the sub command, aws_instance_key is the parameter. After the key has been created the key will be displayed in the form of JSON. Creating security group in CLI This is the command to create a security group for ec2 service. create_security_group is the command, --description, --group-name are the sub commands. "This security group is created by me" is the description given to the security group. This will return the security group id created by aws in the JSON form. Adding permissions to the created security group The command authorize-security-group-ingress is used to add rules to the security group. --protocol takes the type of protocol, --port takes the port number, --cidr takes the IP addresses which can access the instance. Launching an instance using the key pair and security ...