Lindsey  Koepp

Lindsey Koepp

1603689120

Provisioning EC2 Instances with external EBS Volume attached using AWS CLI!

In the Dynamic & Rapid World Today, Automation has created its own image, & to survive in this world, it is very important to know the automation part.

The very first step towards automation is using the CLI of most of the programs because it gives one a real scripting feel. One more benefit of using CLI instead of WebUI is it consumes less internet bandwidth & resources. In addition to that, it saves a lot of time, if commands are known to you.

Therefore, to learn CLI in this world is a must & this blog is written to teach you some of the basics of the AWS CLI Package, which is the official CLI for AWS.

Prerequisite for this task!

  • Familiar with AWS basic services.

At the end of this blog, you will be able to create a key-pair for AWS EC2 instances, create a security group that will be attached to EC2 Instances, Launch an EC2 Instance, create one extra EBS Volume, & attach that to the EC2 Instance created.

Let’s start building the setup using AWS CLI:

First of all, to create a key-pair, execute the command given below.

aws ec2 create-key-pair --key-name <name of the key> > <name of the Key File>.pem

For example: “aws ec2 create-key-pair --key-name CLIKey > CLIKey.pem”

The above-shown command will create one KeyPair with the name mentioned in the command, & save the Key into the file that is mentioned in the command. This KeyPair will be used in the future to access the EC2 Instance.

Image for post

Image By Author!

#script #aws #cloud-computing #automation #cli

What is GEEK

Buddha Community

Provisioning EC2 Instances with external EBS Volume attached using AWS CLI!
Ida  Nader

Ida Nader

1602959640

Launching EC2 Instance using CLI and attaching EBS volume

Per-requisites :

AWS-cli setup

  1. Create an account on AWS.
  2. Go to **Identity & Access Management **(IAM), create a user and generate an access key to configure AWS on your machine. You need to give AdministratorAccess Permissions to this IAM user.
  3. Open the command line and configure AWS
aws configure

4. Provide access key and **secret **you just generated, along with that provide the region you are going to deploy your cluster in. AWS recommends users to choose regions geographically close to them to reduce latency and costs.

For those who are using AWS Educate Starter Account . Go to AWS Educate -> sign in -> AWS Account -> AWS Educate Starter Account -> Account Details

Image for post

gedit ~/.aws/credentials

Delete the content of credentials file and paste the below content on credentials file

Image for post

#ebs-volume #cloud-computing #ec2-instance #aws #cli

Luis  Rodrigues

Luis Rodrigues

1604405340

Configuring AWS EC2 Instance Using CLI

AWS is a public cloud service provider that provides on-demand cloud computing platforms and APIs to individuals, companies, and governments on a metered pay-as-you-go basis.

AWS has a huge range of services which the user can use according to their need. AWS services can be used or accessed using

a) AWS Console: The AWS Management Console brings the unmatched breadth and depth of AWS right to your computer or mobile phone with a secure, easy-to-access, web-based portal.

b) AWS CLI: The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

c) AWS SDK’s: It is a collection of software tools to create applications and libraries that use Amazon Web Services (AWS) resources. There are separate software development kits (SDKs) for browser-based or server-side application development.

In this blog, I will be explaining how we can configure an EC2 instance(one of the computing services of AWS) using AWS CLI. Let’s get started…

#aws-service #aws-cli #ebs-volume #aws-cloud #ec2-instance

Rory  West

Rory West

1621745280

Create EC2 instance from AWS Console

What is EC2 Instance?

Secure and resizable compute capacity in the cloud.

Amazon Elastic Compute Cloud ( Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.

In this article let us see how to create On-demand EC2 instance from Console.

#create-ec2-instance #aws-ec2-instance #ec2-instance #amazon-web-services #aws

Lindsey  Koepp

Lindsey Koepp

1603689120

Provisioning EC2 Instances with external EBS Volume attached using AWS CLI!

In the Dynamic & Rapid World Today, Automation has created its own image, & to survive in this world, it is very important to know the automation part.

The very first step towards automation is using the CLI of most of the programs because it gives one a real scripting feel. One more benefit of using CLI instead of WebUI is it consumes less internet bandwidth & resources. In addition to that, it saves a lot of time, if commands are known to you.

Therefore, to learn CLI in this world is a must & this blog is written to teach you some of the basics of the AWS CLI Package, which is the official CLI for AWS.

Prerequisite for this task!

  • Familiar with AWS basic services.

At the end of this blog, you will be able to create a key-pair for AWS EC2 instances, create a security group that will be attached to EC2 Instances, Launch an EC2 Instance, create one extra EBS Volume, & attach that to the EC2 Instance created.

Let’s start building the setup using AWS CLI:

First of all, to create a key-pair, execute the command given below.

aws ec2 create-key-pair --key-name <name of the key> > <name of the Key File>.pem

For example: “aws ec2 create-key-pair --key-name CLIKey > CLIKey.pem”

The above-shown command will create one KeyPair with the name mentioned in the command, & save the Key into the file that is mentioned in the command. This KeyPair will be used in the future to access the EC2 Instance.

Image for post

Image By Author!

#script #aws #cloud-computing #automation #cli

Lindsey  Koepp

Lindsey Koepp

1602682325

Launching an EC2 Instance Using AWS CLI

I am going to assume you already have some insight into the services AWS offers and most importantly, the EC2 instance. If you don’t, here’s a quick recap/summary:

AWS offers EC2 as a server, more like what you would run in your physical data center.It’ll have access to storage, memory, and a network interface,

and its primary drive will come with a fresh and clean operating system running. Follow this link to learn more about EC2 instances.

Now that we know what EC2 is( did you open the link? No seriously, open it . ill wait).

AWS allows us to launch EC2 instances in regions. You can checkout your region by clicking the right top corner of the console. Follow this link to learn a bit more about AWS regions. AWS offers two ways of launching instances:

  • using the AWS console
  • using the AWS CLI(which is why we are here right?)

okay enough talk, let’s get right into it.

To launch an instance, we need to follow the following steps which will be treated in detail:

  • install AWS CLI.
  • configure AWS CLI.
  • generate key pair.
  • create a security group for instance.
  • create/launch an instance.

Install AWS CLI

Installing the AWS CLI should be a very simple process. The latest version at the time of this writing is 2.0.54. You can check your CLIversion by running this in your terminal:

zeus-of-python@eli:~$ aws --version

This gives the following output:

aws-cli/2.0.54 Python/3.7.3 Linux/4.15.0-118-generic exe/x86_64.ubuntu.18

On Linux, you can install the latest version of the CLI by running the following command.

zeus-of-python@eli:~$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

unzip the package and install.

zeus-of-python@eli:~$ unzip awscliv2.zip
zeus-of-python@eli:~$ sudo ./aws/install

verify installation.

zeus-of-python@eli:~$ aws --version

For Windows and Mac, follow this link to install the CLI.

#aws-free-tier #aws-ec2 #aws-cli