Posted in AWS, Linux, Windows

AMAZON EC2

Amazon elastic cloud computing is used to create cloud virtual instances and many other operations related to the servers like backup, security, maintaining and monitoring the servers. This can be configured both in console and also aws-cli.

AWS – CONSOLE

  • Sign in to the console using log on credentials and access ec2 under services.
  • ec2 > Instances > Launch instance > select the desired ami image and follow on screen commands to launch an instance.
  • ec2 > Instances > Actions > Instance state > Terminate // To terminate the instances.
  • ec2 > Instances > Launch Instances > look after the predefined or self created ami images.

AWS – CLI

  • aws configure > sign in using access key ID and secret access key ID.
  • aws ec2 run-instances --image-id ********* --count 1 --instance-type t2.micro --key-name **** --security-group-id **** // To launch an instance.
  • aws ec2 describe-instances --instance-id **** // To check the status and details of the instance.
  • aws ec2 terminate-instances --instance-ids **** // To terminate the instance and results as shown.
  • aws ec2 describe-images --owners self amazon --filters "Name=platform,Values=Windows // To search for a numerous amount of windows platformed ami images.

Upcoming..

More comparisons between aws-cli and aws console environment.

Posted in AWS, LAMP Stack, Linux, Windows

CREATING MY AIMs IN AWS

A fantasy or even might be a necessity in some cases to have our own created AMIs. The use of different resources in EC2 in AWS allows an individual to reach their desired targets. An individual can create a clown image of a server in two different ways.

  • An instance of Ubuntu 18.04 is created for a reference in the following practical.
  • An Apache server and also a database with some data were installed and created for the cross verification purpose.

Method One :

  • Select the instance that needed to be clowned > Actions > Image > Create image. // As shown below.
  • The clowned image can be seen in the My AIMs, while launching an instance.
  • Launch the number of instances using the created AIM and connect to any of the instance created.
  • Compare to the original instance // If needed.

Method Two :

  • EC2 > Volumes (Elastic Block Store) > Select the volume > Actions > Create Snapshot as shown below.
  • Created snapshots can be seen in the EC2 > snapshots (Elastic Block Store).
  • Select the desired snapshot > Actions > Create image.
  • The clowned image can be seen in the My AIMs, while launching an instance or in EC2 > AMIs (Images).
  • Launch the number of instances using the created AIM and connect to any of the instance created.
  • Compare to the original instance // If needed.

Posted in AWS, Linux, Windows

MANAGING IAM (IDENTITY ACCESS MANAGEMENT) USERS

Create the user accordingly in IAM (Console) If required multiple. (In my case i use a IAM user named Harish). As the concept of IAM is unique among all other assets of AWS, the operations also differs with the user interface accordingly to the AWS Console and AWS-CLI.

Sign-in page (IAM Users only) :

AWS CONSOLE

  • Direct to the sign-in page using IAM users sign-in link from IAM Dashboard and customize if needed.

AWS-CLI

  • Initialize the configuration of the AWS and follow the onscreen commands for the default settings and follow the commands.
  • aws iam create-account-alias --account-alias cloudees // Customizing sign in link.
  • aws iam list-account-aliases // For detailed information.

Sign-in to the IAM User account with the help of the created alias account.


Identification of IAM users by AWS :

AWS CONSOLE

  • Every IAM User will be given their individual and unique name (usually) and can of-course differentiated based on their username.
  • In any case, a possibility of rehashing names is additionally a probability however it may be of less possibility, a concept of ARN (Amazon Resource Name) is used by AWS.
  • The ARN name of every IAM user can be seen in Identity and Access Management (IAM) > Users > Click on the username // where it shows

AWS-CLI

  • aws iam get-user --user-name Harish // To get complete details of the IAM User. To obtain the result as shown
  • A additional user id is also given for the user by the AWS which helps in differentiating the IAM user by AWS.

To view actions made by the IAM user :

AWS CONSOLE

  • Services> Identity and Access Management (IAM) > Users > Click on the username > Access Advisor
  • Detailed and beautiful graphical representation can be seen.

AWS-CLI

  • aws iam generate-service-last-accessed-details -- arn Arn details obtained above // The report need to be generated initially.
  • A job Id is returned as the output.
  • aws iam get-service-last-accessed-details --job-id obtained job id from above // To get complete details as followed

Adding Policies for IAM Users :

AWS CONSOLE

  • Services> Identity and Access Management (IAM) > Users > Click on the username > Add Permissions // For adding new policies.
  • The desired policies are selected form the listed bunch of predetermined policies.

AWS-CLI

  • aws iam attach-user-policy --policy-arn arn:aws:iam: :aws:policy/amazonS3Fullaccess --user-name Harish // Policy ARN for each policy differs.

Continuation of this differences in operations in many other aspects will be posted soon..

Posted in AWS, Linux, Windows

CREATING MULTIPLE USERS (IAM) IN AWS

Are you about to handle a lot of servers or users in various departments by providing each their login accreditation’s , then try to use the resource (IAM) Identity Access Management in AWS. When one sign in to the root account of AWS, select the option of IAM under Services where one can find out their IAM users sign-in link: // in the dashboard of IAM, which help the IAM users to redirect for the sign in page.

  • Services > IAM ( Security, Identity, & Compliance ) > Users > Add user
  • Provide the Username (as simple as shown below) > Allow the user to access through (AWS-CLI (if necessary)) AWS Console > Highlighted part is up to individuals.
  • Follow the onscreen commands to attach the existing policies directly > Filter the desired policies and attach to the user > Add Tags // precised separation of the users accordingly as shown > Create User.
  • Download the .csv file for the purpose of AWS-CLI.
  • Direct to the login page using IAM users sign-in link (IAM Dashboard).
  • Sign in using the default credentials provided by the root account as shown.
  • The use of the resources of IAM User in AWS will be according to the permissions provided by the root user.

Good news : The number of IAM users will be just a number as our age with no limitation.

The generated bill is only dependent on the resources used by the IAM user but not the count of IAM users.

Posted in AWS, Linux, Windows

AWS-CLI (AWS-COMMAND LINE INTERFACE)

Accessing AWS through Windows Powershell

https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi // Download the MSI installer for windows (64-bit) and run the downloaded MSI installer by following the onscreen instructions. Open powershell as administrator and execute the following commands. Before continuing with the commands download the Access key ID and The Secret Access Key from the security credentials of the respected aws account as shown

  • aws configure // To get started with the aws -cli
  • Provide the Access key ID and the respective Secret access key to get access to the aws (Respective account).
  • Follow the onscreen commands by typing the default region name and the default output format.
Default region names in aws-cli

Accessing AWS through Linux using AWS-CLI

Open any Ubuntu Linux operated system and follow the same steps, initializing with the configuration of aws using sudo aws configure.

Looking for the basic commands of aws-cli

https://docs.aws.amazon.com/cli/latest/userguide/aws-cli.pdf
Posted in AWS, LAMP Stack, Linux

MYSQL DATABASE

Database : A database is an organized collection of data.

Installing MySQL-server in Ubuntu

  • sudo apt-get install mysql-server // Installing the mysql
  • sudo mysql_secure_installation // securing the mysql server
A permission followed by the choice of strength of the password, type the password and continue with the default settings.

Creating a database in MySQL

  • sudo mysql -u root -p
  • enter the password // Connecting to MySQL
  • create database Akhil0087 // Creating a database in mysql
  • use Akhil0087 // Entering into the database
  • create table Topics(
  • Topic VARCHAR(255) NOT NULL,
  • created_on DATE,
  • Author VARCHAR(255) NOT NULL
  • ) ENGINE=INNODB; // Creating a table in the database
  • describe Topics; // To get the following output.
  • insert into Topics (Topic, created_on, Author) values ('AWS', '2019-11-21', 'Akhil'); // Providing the values for each described field.

Interested in further more operation related to database

Posted in AWS, Linux

SETTING UP A FIREWALL IN UBUNTU 18.04

For a Firewall with ufw to be settled up in Ubuntu is really an important aspect in the point of security. In spite of the fact that there may be various approaches to do as such, I pursue the accompanying steps.

  • sudo apt-get install ufw // Installing ufw
  • sudo ufw default deny incoming
  • sudo ufw default allow outgoing // Setting up the default policies
  • sudo ufw enable // Enabling the Firewall
  • sudo allow 80
  • sudo allow ssh // Allowing few ports and can also be deleted/ deny the ports.
  • sudo ufw disable
Have you also got in love with setting up firewall in ubuntu, then have a look into this

Posted in AWS, LAMP Stack, Linux

INSTALLING AN APACHE SERVER ON UBUNTU IN AWS

The IP Address (public) of the created instance is used to get access remotely either using putty or windows remote access control. In the following case putty is used to get access on a Ubuntu 18.04 (Created EC2 instance) remotely. The downloaded key-pair has been converted from .ppm to .ppk using puttyGen and loaded as shown in the figure.

  • sudo apt-get install apache2 // Installing Apache2
  • sudo systemctl status apache2 // Checking the status of Apache which display active (running)
  • http://server_IP_address // Testing of Apache server, server IP address should be entered in any browser which should result in the following output.

If someone could not be able to get the output please allude:

https://phoenixnap.com/kb/ubuntu-start-stop-restart-apache

Posted in AWS, Linux

CREATING A VIRTUAL SERVER IN AWS

To begin utilizing Amazon EC2 you will need to dispatch a virtual server, known as an Amazon EC2 Instance.

In the above pictures, an Ubuntu 18.04 instance has been launched with the default settings as shown. A key-pair (Virginia) which has been already created is used in security proposals. [Suggested a new key-pair for every new instance created.]