Author Archives: SandeepSingh DBA

About SandeepSingh DBA

Hi, I am working in IT industry with having more than 10 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Connect with Linux EC2 instance using Putty in AWS

Connect with Linux EC2 instance using Putty in AWS

Following are the steps to connect with Linux EC2 instance using Putty:

1. For connect with Linux through putty, We need to convert private key of Amazon Web Service from format Private key format(.pem) to putty format(.ppk).
Use Putty Key Generator for convert it.Open Putty Key Generator

Puttygenerator1.PNG

2. Select the RSA option from last line and Load the private key generated from AWS window.
Load Private Key –> Select all files option –> select your private key

LoadSavePrivatekey.PNG

3. Selecr Save Private key option to Save it.

SavePrivateKey.PNG

4. Select the path and save that file to use it for login in Putty window.

5. Open the Putty Window and select SSH for connectivity with AWS EC2 instance.

Puttywindow.PNG

6. In the Host Name field, enter user_name@public_dns_name.
Note:
1. Different platform has different username.
2. You can check connectivity setting from AWS console by connect button in instances tab.

Following are the list of username with different platform
For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user.
For a Centos AMI, the user name is centos.
For a Debian AMI, the user name is admin or root.
For a Fedora AMI, the user name is ec2-user or fedora.
For a RHEL AMI, the user name is ec2-user or root.
For a SUSE AMI, the user name is ec2-user or root.
For an Ubuntu AMI, the user name is ubuntu.

7. In my case, it’s RHEL then username is ec2-user@hostname as follows:

HostnamePutty.PNG

8. Use Private key generated in above steps to login the EC2 instance.
Go to left side panel and expand Connection –> SSH —> AUTH
In AUTH load the private key with browser button.

Uploadprivatekey.PNG

9. Press OPEN button to make connection with instance.

LinuxConnection.PNG

10. Connection seems to be successfully established.

Advertisements

Connect with Window EC2 instance in AWS

Connect with Window EC2 Instance in Amazon Web Services

Blog explain about how you will connect with window instance with your local desktop

Following are the steps to connect with window EC@ instance:

1. Login with Amazon web services.

2. Currently in my Amazon Web Service portal 2 instance is running. One is for windows Platform and one for Linux.
Note: While creating instances you created Keys for connection. Please keep it save other wise you are not able to connect with Server.

3. On Instance tab,I will have two machine one window and second is Linux.

WindowMachine1.PNG

4. Selected Window machine to show you connection.
Note: RDP Software is needed for making connection. You can download as shown below. If you are using Window Platform then you need to download it. Windows Machine has inbuilt functionality just type search “Remote Desktop”.

Connecttoinstance.PNG

5. You click on get password button and use the KEY generated at creation time of EC2 instance in AWS.

GET PASSWORD –> KEY PAIR PATH CHOOSE Your key –> DECRYPT PASSWORD
Save the password for connectivity with RDP.

 Decrypt Passord

6. Save configuration and password.

SavePassword

7. Now use this configuration and Password with RDP.
Note: I am using windows Server. So i already have RDP Software.

connectwithRDP

8. Enter Username and password as below for connection.

UsernamePassword

9. Now you are successfully connected with your windows Server.

Connectionsucced

 

Cloud Storage in Amazon Web Service

Cloud Storage in AWS

Cloud storage is service model in which data is maintained , managed ,backed up, make available.It is fully managed service it handle by AWS. AWS managed in background like upgrade hardware , maintenance , change of hard disk etc.. We did not know what’s going in background.

Payment method in AWS for storage
-Pay what you use
-Monthly rate

Option of Cloud Storage:

Block Storage – EBS (Elastic Block Store)
Block storage cab be accessed by only one machine instance at a time. It is like hard disk. You can use for database , application etc . It is tier Zero or one type Storage. You can also take snapshot of EBS Volume like backup.

Object Storage – S3 (Simple Storage Service ) or Glacier (within S3)
S3: Object storage can be accessed directly by multiple machines. It is used by WEB API. It is web based storage store images, videos etc. S3 is tier two level.
Glacier is storage very slow because it is cheap. It used for low term storage purpose for database backup, log files, archive backup. It is tier 3.

AWS Connection Storage Service
Service used to move data to AWS Cloud or integrate you infra with AWS cloud.
Storage Gateway: way to integrate on-premises IT environment with AWS Storage. It integrates two sites suppose you want to integrate your office infra with cloud infra AWS Storage.
Snowball: A service that enables large volume data transfer, you can provided with physical devices for sending the data to AWS cloud.

Common terms:
SOLID STATE DISK (SSD): faster hard disk and give you better IOPS
HHD (hybrid hard disk):
IOPS: Unit of measuring representing input/ouput per second.
DISK I/O: it display what percentage of time a disk in use by a read or write command.
TiB(Tebibyte) : 1 Tib = 1.10 TB = 1024 Gibibytes , 1 Terabyte = 1000 Gigabytes
GiB(Gibibyte) : 1 Gib = 1.07 GB = 1024 Mebibytes , 1 Gigabyte = 1000 Megabyte
Mib(Mebibyte) : 1 MiB = 1.05 MB = 1024 Kibibytes , 1 Megabyte = 1000 Kilobyte

Disassociate and release Elastic IP in AWS Cloud

Disassociate and Release Elastic IP address in AWS

Elastic IP address is public IP address needed for configure the server to one static IP address.Elastic IP address is charged by Amazon if you not associated it with any instance. Means you are not using Elastic IP address.

1. Check the Elastic IP address Present in EC2 Dashboard.

Resource elastic ip.PNG

2. Go to Network & Security –> Elastic IPs then right click on Elastic IP and select disassociate from the instance in which it assigned.

disassociate address

3. Check the instance of disassociate Elastic IP then disassociate address from it.

disassocate Elastic IP 2.PNG

4. Release the Elastic IP address after disassociate done from the EC2 instance.
For Release again right click on the IP address and release the IP address from your account if no longer needed.

Release address

5. After release verify the dashboard again to check whether the Elastic IP address is released from your account.

released resouce snapshot.PNG

Note: It show the result 0 in Elastic IP address column. Means your account is not using Elastic IP address.

Create and associate the Elastic IP in AWS cloud

Create and associate the Elastic IP with instance in AWS cloud

Elastic IP address are Public IP address. It remains static with the AWS Account. You can default have 5 max Elastic IP address with your account.You can assign the Elastic IP address with any of your EC2 Instance.

Note: Elastic IP remain with EC2 instance on system start or stop.

Following are the Steps to create and Associate with EC2 Instance

1. Check the Instance detail for setting the Elastic IP address.

IPAddress.PNG

2. You see that in above snapshot that Elastic IP address is empty for this instance.
Note: Empty Elastic IP address value means no Elastic IP is associated with EC2 instance.

3. Check you have any Elastic IP address in your account by check EC2 DASHBOARD
If it show 0 value then no Elastic IP address is present.

CheckResourcesinfo.PNG

4. For Creating the Elastic IP address.
Go to the left side drag & drop window and Go to the Section Network & Security
Network & Security –> Elastic IPS –> Allocate New Address

CreateElasticIP1.PNG

5. Click on Allocate New Address

AllocateNewAddress.PNG

6. New Public IP address is allocated.

Newaddressallocated.PNG

7. Now Associate that Elastic IP address with Instance.

AssociateIPaddresswithinstance.PNG

8. Associate the Private address and instance name with Elastic IP.

AssocateInstance.PNG

9. Associate address is completed successfully.

succeed

10. Check the Instance is assigned with Elastic IP address
Note: Public and Elastic IP address is same.

CheckinstancewithElasticIP

Create EC2 Window Machine on AWS Free Tier Cloud

Create an Ec2 Window instance on AWS Free Tier Cloud

Following are the Steps for Creating EC2 instance

1. Open the following link in your Web browser.

https://aws.amazon.com/free/

2. Login with your credential created in following blogAWS Free Tier Account with sign in button at right corner

Signin.PNG

3. Next Page will ask your username & password.

Askforusernameandpassword

4. Select SERVICES from left side and in Compute tab select EC2 service for creating a window server instance.

Servicestab

5. On Page you find all the resources information running from your account and having Launch button for creating new instance as shown below.

LaunchInstance

Launch instance button you will have 7 steps process to launch an new Instance
A) Choose an Amazon Machine Image
B) Choose Instance type
C) Configure Instance
D) Add Storage
E} Add Tags
F) Configure Security Group
G) Review

6. In First Step, choose the specify platform like Unix, Linux , Windows platform for your Instance
Note: Choose free tier option present on left side

ChooseAMI.PNG

7. Choose Instance type in this we have option of choosing the hardware configuration of Instance as we needed. It has specific types as:
General Purpose : Balance of all resources like memory, CPU, Network
Compute Optimized: Higher number of CPUs
GPU Optimized : Used for Graphics with higher GPU,CPU,Memory or Network
Memory Optimized: Used higher memory
Storage Optimized: With direct storage as needed.

Note: We are choosing t2.Micro as free instance

ConfigureInstanceType.PNG

8. Configure Instance has option of choosing Network, IP address, Number of Instance etc. We keep it default now.

ConfigureInstance.PNG

9. Forth Step is add Storage, Default Storage for window is 30 GB which is in Free tier.

addStorage.PNG

10. Fifth Step add tag to your instance for know it quickly. Example if you are using instance as WebServer then provide Key as Name value and Value as WebServer. So that you easily identified from multiple server which is your web server. It is like a naming convention for Server.

addtag.PNG

11. Next Step you need to configure the Security Group. In this you can add new security group to your Server and choose the existing already created security group for connection purpose.
Key-Value define:
Type you can select the way of connectivity like TCP, HTTP, FTP etc.
Port Specify the port number on which you make connection.
Source have 3 option :
Custom – Means provide your range of IP or network range.
Anywhere – Means you can connect from anywhere in world.
MY IP – Mean use your current IP address of System and connect only with that.

ConfigureSecurityGroup.PNG

12. Review Instance Launch and launch the instance.

ReviewInstanceLaunch.PNG

13. After launch button, it show the following screen for Key Pair, Keypair are the public and private key which is used for connectivity with the Server. If you lost you key then you are not able to connect with your instance. So create new key provide some KEY PAIR NAME in text box and download and save it.

Keypair.PNG

14. After key Pair download, then you got the message you instance is launching.

InstanceLaunch.PNG

15. Click on instance launching then you will go to following screen.

Instances.PNG

Understand Public, Elastic and Private IP Address in AWS cloud

IP Address in Amazon Web Service

IP address associated with EC2 Instances. Having three IP address:
Public IP address
Private IP address
Elastic IP address

Public IP Address:
It is automatically assigned when instance is started. It is assigned to EC2 instance for connectivity. If you stop or terminate instance then public IP address associated with instance is released. On Restart the Instance you get assigned a new public IP address. Public IP address can be change through life cycle of EC2 instance. You cannot use it for website or domain name registration purpose because Public IP address can be changed. To overcome this Elastic IP address is used.
Note: When you start the server or instance then may be every time new public IP address is assigned.

Private IP Address:
It is used for internal Communication between internal Server. It is not changed when you restart the Instance. It is like internal communication between Instances present at data center.

Elastic IP Address:
Elastic IP address are Static or Public IP address. By Default you have limit in AWS for 5 EIPs Per region. It is also a public address, It is issued on the basis of AWS account.It is permanently assigned to your account. You can associate and release with your instances as you wish. You can also move it from one server to other it’s good thing in Elastic IP address. you can safely fail over with help of Elastic IP address.
Note:
1. If you do not use then there is cost, if you use Elastic IP then no cost.
2. When you assigned the Elastic IP address then Public IP address gone and it is same as Elastic IP address, now we have same ip address as permanently.

ScreenShot for EC2 Instance display Private, Public and Elastic IP Address:

IPAddress

Associating an Elastic IP address:

Network –> Elastic IP –> Add New IP address –> Associate with Instance —> Check Instance its public or elastic IP address is same.

Create the Elastic IP address on following link: ELASTIC IP ADDRESS