Friday, January 27, 2017

AWS AMI Virtualization Types: HVM vs PV (Paravirtual VS Hardware VM)



Amazon Machine Images (AWS AMI) offers two types of virtualization: Paravirtual (PV) and Hardware Virtual Machine (HVM).  Each solution offers its own advantages.
Today we’re going to talk about an important aspect of Amazon Machine Images that somehow fails to capture our attention. Choosing an AWS AMIvirtualization type may not seem critical or relevant at first, but I believe everyone should have at least a basic understanding of how the different virtualization options function.
How many times have you actually thought about which kind of virtualization is best suited to your needs before you select your AWS AMI? Or better: how often have you thought about it, but ignored it and just started working anyway? When you select an AWS AMI to launch an instance you will see something like this:
AWS AMI - HVM
AWS AMI - PV
What are these highlighted terms all about? I’ll explain.

The AWS AMI and the Xen hypervisor

Every AWS AMI uses the Xen hypervisor on bare metal. Xen offers two kinds of virtualization: HVM (Hardware Virtual Machine) and PV(Paravirtualization). But before we discuss these virtualization capabilities, it’s important to understand how Xen architecture works. Below is a high-level representation of Xen components:
AWS AMI - Zen
Virtual machines (also known as Guests) run on top of a hypervisor. The hypervisor takes care of CPU scheduling and memory partitioning, but it is unaware of networking, external storage devices, video, or any other common I/O functions found on a computing system.
These guest VMs can be either HVM or PV.

The AWS AMI and HVM vs. PV

HVM guests are fully virtualized. It means that the VMs running on top of their hypervisors are not aware that they are sharing processing time with other clients on the same hardware. The host should have the capability to emulate underlying hardware for each of its guest machines. This virtualization type provides the ability to run an operating system directly on top of a virtual machine without any modification — as if it were run on the bare-metal hardware. The advantage of this is that HVMs can use hardware extensions which provide very fast access to underlying hardware on the host system.
Paravirtualization, on the other hand, is a lighter form of virtualization. This technique is fast, and provides near native speed in comparison to full virtualization. With Paravirtualization, the guest operating system requires some modification before everything can work. These modifications allow the hypervisor to export a modified version of the underlying hardware to the VMs, allowing them near-native performance. All PV machines running on a hypervisor are basically modified operating systems like Solaris or various Linux distributions.
This is in contrast to HVM, which requires no modifications to the guest OS and the host OS is completely unaware of the virtualization. This may add to the performance penalty because it places an extra burden on the hypervisor.
Let’s extend this discussion to the AWS AMI. AWS supports Hardware Virtual Machine (HVM) for Windows instances as well as Paravirtualization (PV) for Linux instances. Years ago, AWS would encourage users to use Paravirtualized guest VMs, because they were then considered more efficient than HVM.
Take note here, there is one major disadvantage with Paravirtualization. You need a region-specific kernel object for each Linux instance. Consider a scenario where you want to recover or build an instance in some other AWS region. In that scenario, you need to find a matching kernel — which can be tedious and complex. Nevertheless, I can’t say that this is the only reason that Amazon now recommends using the HVM virtualization versions of latest generation of their instances: there are a number of additional recent enhancements in HVM virtualization which have improved its performance greatly.
Here are some key factors that contributed to Hardware Virtual Machine’s closing the performance gap with Paravirtualization:
  • Improvements to the Xen Hypervisor.
  • Newer generation CPUs with new instruction sets.
  • EC2 driver improvements.
  • Overall infrastructure changes in AWS.
Consider upgrading if you are using an older instance type. Here is an excellent discussion about migrating PV instances to HVM.
This table shows which flavor of AWS AMI (Amazon Linux) are recommended for each Amazon EC2 instance type:
AWS AMI - Types
Amazon currently recommends users choose HVM instead of PV. Ignoring their advice can have very real consequences. For example, in the AWS Frankfurt region, if you try to select an AWS AMI (Amazon Linux) using PV, you will be greatly restricted in your choice of instance types:
AWS AMI - PVAWS AMI - PV
As you can see, the cheapest instance type you can select here is m3.medium. But going with the Amazon Linux AMI on HVM, the cheapest instance type available to you is t2.micro.
AWS AMI - HVM
I am not sure it will work this way in all AWS regions, but this should serve to make you aware about the relevance of virtualization type — which we ignore at our own peril.

Conclusion

Traditionally, Paravirtualized guests performed better with storage and network operations than HVM guests, because they could avoid the overhead of emulating network and disk hardware. This is no longer the case with HVM guests. They must translate these instructions (I/O) every time to effectively emulated hardware. Things have also improved since the introduction of PV drivers for HVM guest’s. HVM guests will also experience performance advantages in storage and network I/O.
Because Amazon is changing their approach towards the AWS AMI, we have no choice but to address this topic. It is possible that in near future you may see HVM types completely replacing PV types. If this happens it is critical that you make informed decisions today. 

Wednesday, January 11, 2017

How to Install Docker in Linux?

How to Install Docker in Linux?
 
Note - You should install Docker using root or with sudo access.
 
Install Docker on Ubantu 
# apt-get update
# apt-get install -y docker.io
# service docker.io start
 
Install Docker on Redhar / Centos
# yum update
# yum install -y docker.io
# systemctl start docker.service
 
How to verify the version of docker?
# docker -v
# docker version
 
How to know docker running?
# service docker.io status (Ubantu)
# systemctl status docker.service (Redhat)
 
How to check details of Docker clients, deamon, containers, images, drivers, etc
# docker info
 
How to update Docker version?
==============================================
# wget -q0- https://get.docker.com/gpg | apt-key add -
# echo deb http://get.docker.com/ubantu docker main > /etc/apt/sources.list.d/docker.list
# apt-get update
# apt-get install lxc-docker
# docker version
 
Configuration post docker installation:
Adding Users to the Docker Group for non-root user
==============================================
# docker run -it ubuntu /bin/bash (as a non-root)
[ permission denied]
# cat /etc/group
# sudo gpasswd -a username docker
# cat /etc/group
# docker run -it ubuntu /bin/bash (as a non-root)
# logout
# login username

Setting the proxy configuratin in Linux and Windows

Setting the proxy configuration in Linux and Windows
 
If you use a proxy server or firewall, you may need to set the http_proxy environment variable in order to access some url from commandline.
 
Windows Command line
set http_proxy=http://your_proxy:your_port
set http_proxy=http://username:password@your_proxy:your_port
set https_proxy=https://your_proxy:your_port
set https_proxy=https://username:password@your_proxy:your_port
 
Windows GUI
1. Open the Control Panel and click the System icon.The System Properties dialog is displayed.
2. On the Advanced tab, click on Environment Variables. The Environment Variables dialog is displayed.
3. Click New in the System variables panel. The New Sytem Variable dialog is displayed.
4. Add http_proxy with the appropriate proxy information
 
Windows Registry
IE can set username and password proxies, so maybe setting it there and import does work
 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d name:port
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyUser /t REG_SZ /d username
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyPass /t REG_SZ /d password
netsh winhttp import proxy source=ie
 
Command to enable proxy usage:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
 
Command to disable proxy usage:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
 
Command to change the proxy address:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d proxyserveraddress:proxyport /f
 
Linux 
export http_proxy=http://your_proxy:your_port
export http_proxy=http://username:password@your_proxy:your_port
export https_proxy=https://your_proxy:your_port
export https_proxy=https://username:password@your_proxy:your_port
export https_proxy=https://%username%:%password%@your_proxy:your_port
 
FAQ
1. How to escape if password has a @ character
Ans - try %40 instead of @
 
2. What is the file name where it stroed the proxy in Ubantu
Ans - /etc/environment
 
3. How to set proxy inforamtin in Apt?
Ans - Adding following line to /etc/apt/apt.conf has solved the problem: 
Acquire::http::proxy "http://10.1.3.1:8080/";
If file does not exist, create it. Do not confuse it with apt.conf.d directory.
 
4. How to set proxy inforamtin in linux Profile?
 
5. Why manual export failed to affect apt-get with the proxy info?
Ans - The reason your manual export failed to affect apt-get is because sudo ignores that environment variable by default (i.e. it doesn't pass it on to the command). For one-off runs, you could do sudo env http_proxy=http://10.1.3.1:8080 apt-get update. Otherwise, you could configure sudo to allow http_proxy to fall through.

Vagrant installation in Centos, Ubuntu and Windows

Vagrant installation in ubuntu
 
1. Update your apt repository
> sudo apt-get update
2. Install VirtualBox.
> sudo apt-get install virtualbox
3. Install Vagrant.
> sudo apt-get install vagrant
 
Vagrant installation in Centos
1. Update your system
> yum -y update
> cd etc/yum.repos.d/
> wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
> yum update -y
> yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel 
> dkms
> yum install virtualbox-5.0
 
2. Install Vagrant
> wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.rpm
> yum localinstall vagrant_1.8.1_x86_64.rpm
 
Vagrant installation in Windows
In this tutorial, we will be installing Vagrant, a bare bones server with Ubuntu installed. Vagrant is a server that runs under VirtualBox. You will need to have VirtualBox installed. You will also need to have Putty installed in order to access your new Vagrant server via SSH. These instructions also apply to Windows 8.
 
Requirements:
A hard connection to the Internet
Putty needs to be installed. (putty-0.62-installer.exe)
VirtualBox needs to be installed.
Recommended: 8 GB RAM is recommended to run VirtualBox on Windows PCs
 
A. Installing Vagrant – bare bones server – Ubuntu only
1. Download and install the most recent VirtualBox for Windows from https://www.virtualbox.org/wiki/Downloads
 
Start up VirtualBox
 
2. Download and install the latest version of Vagrant from http://downloads.vagrantup.com. For this tutorial, we will use version 1.0.6. Windows users, download Vagrant.msi
 
Open Windows cmd prompt
For Windows 8, press Windows key and then press “R” key. This will open the RUN dialog box for you. Type “cmd” and press Enter.
Note: I typed vagrant command and I got the error message saying, ‘vagrant’ command not recognized. It was not added to the Path during install. Restarting your computer may help to refresh the path.
 
3. Change directory to C:\vagrant\vagrant\bin
 
4. Then type the following commands:
 
C:\vagrant\vagrant\bin> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
C:\vagrant\vagrant\bin> vagrant init lucid32
C:\vagrant\vagrant\bin> vagrant up
 
5. Open Putty and enter these credentials:
Hostname: 127.0.0.1
Port: 2222
Connection type: SSH
 
6. Login to Vagrant server
Enter username: vagrant
Password: vagrant
 
Type ls –lah at the prompt.
This is a bare bones server with Ubuntu installed.
 
vagrant@lucid32:~$ls -lah

Tools and Technologies


Operating Systems
Windows
Linux (CentOs & Ubantu)
Version Control Management Tools Using
SVN
Git
Build & Lifecycle Management Tools Using
Ant
Maven
MSBUILD
NANT
Gradle
World of Application Packaging Tools with
RPM
YUM
APT
Virtualization and Container with
Docker
Vagrant
Vmware
VirtualBox
Static Code Analysis using
SonarQube
Test Coverage using
Jacoco
Cobertura
Configuration Management, Automation & Deployment Tools Using
Chef
Puppet
Continuous Integration & Delivery Using
Jenkins
Understanding the Cloud Infrastructure with
Amazon AWS EC2
Server Monitoring Tools with
Nagios
Programming and Scripting with
Bash Scripting
Ruby Fundamental

Saturday, December 17, 2016

Elastic IP Addresses



Elastic IP Addresses
An Elastic IP address is a static IP address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
An Elastic IP address is a public IP address, which is reachable from the Internet. If your instance does not have a public IP address, you can associate an Elastic IP address with your instance to enable communication with the Internet; for example, to connect to your instance from your local computer.
Topics
Elastic IP Address Basics
The following are the basic characteristics of an Elastic IP address:
  • To use an Elastic IP address, you first allocate one to your account, and then associate it with your instance or a network interface.
  • When you associate an Elastic IP address with an instance or its primary network interface, the instance's public IP address (if it had one) is released back into Amazon's pool of public IP addresses. You cannot reuse a public IP address. For more information, see Public IP Addresses and External DNS Hostnames.
  • You can disassociate an Elastic IP address from a resource, and reassociate it with a different resource.
  • A disassociated Elastic IP address remains allocated to your account until you explicitly release it.
  • To ensure efficient use of Elastic IP addresses, we impose a small hourly charge if an Elastic IP address is not associated with a running instance, or if it is associated with a stopped instance or an unattached network interface. While your instance is running, you are not charged for one Elastic IP address associated with the instance, but you are charged for any additional Elastic IP addresses associated with the instance. For more information, see Amazon EC2 Pricing.
  • An Elastic IP address is for use in a specific region only.
  • When you associate an Elastic IP address with an instance that previously had a public IP address, the public DNS hostname of the instance changes to match the Elastic IP address.
  • We resolve a public DNS hostname to the public IP address or the Elastic IP address of the instance outside the network of the instance, and to the private IP address of the instance from within the network of the instance.
If your account supports EC2-Classic, the use and behavior of Elastic IP addresses for EC2-Classic and EC2-VPC may differ. For more information, see Elastic IP Address Differences for EC2-Classic and EC2-VPC.
Elastic IP Address Differences for EC2-Classic and EC2-VPC
If your account supports EC2-Classic, there's one pool of Elastic IP addresses for use with the EC2-Classic platform and another for use with the EC2-VPC platform. You can't associate an Elastic IP address that you allocated for use with a VPC with an instance in EC2-Classic, and vice-versa. However, you can migrate an Elastic IP address you've allocated for use in the EC2-Classic platform to the EC2-VPC platform. You cannot migrate an Elastic IP address to another region. For more information about EC2-Classic and EC2-VPC, see Supported Platforms.
When you associate an Elastic IP address with an instance in EC2-Classic, a default VPC, or an instance in a nondefault VPC in which you assigned a public IP to the eth0 network interface during launch, the instance's current public IP address is released back into the public IP address pool. If you disassociate an Elastic IP address from the instance, the instance is automatically assigned a new public IP address within a few minutes. However, if you have attached a second network interface to an instance in a VPC, the instance is not automatically assigned a new public IP address. For more information about public IP addresses, see Public IP Addresses and External DNS Hostnames.
For information about using an Elastic IP address with an instance in a VPC, see Elastic IP Addresses in the Amazon VPC User Guide.
The following table lists the differences between Elastic IP addresses on EC2-Classic and EC2-VPC. For more information about the differences between private and public IP addresses, see IP Address Differences Between EC2-Classic and EC2-VPC.
Characteristic
EC2-Classic
EC2-VPC
Allocating an Elastic IP address
When you allocate an Elastic IP address, it's for use in EC2-Classic; however, you can migrate an Elastic IP address to the EC2-VPC platform. For more information, seeMigrating an Elastic IP Address from EC2-Classic to EC2-VPC.
When you allocate an Elastic IP address, it's for use only in a VPC.
Associating an Elastic IP address
You associate an Elastic IP address with an instance.
An Elastic IP address is a property of an elastic network interface (ENI). You can associate an Elastic IP address with an instance by updating the ENI attached to the instance. For more information, see Elastic Network Interfaces (ENI).
Reassociating an Elastic IP address
If you try to associate an Elastic IP address that's already associated with another instance, the address is automatically associated with the new instance.
If your account supports EC2-VPC only, and you try to associate an Elastic IP address that's already associated with another instance, the address is automatically associated with the new instance. If you're using a VPC in an EC2-Classic account, and you try to associate an Elastic IP address that's already associated with another instance, it succeeds only if you allowed reassociation.
Stopping an instance
If you stop an instance, its Elastic IP address is disassociated, and you must reassociate the Elastic IP address when you restart the instance.
If you stop an instance, its Elastic IP address remains associated.
Assigning multiple IP addresses
Instances support only a single private IP address and a corresponding Elastic IP address.
Instances support multiple IP addresses, and each one can have a corresponding Elastic IP address. For more information, see Multiple Private IP Addresses.
Migrating an Elastic IP Address from EC2-Classic to EC2-VPC
If your account supports EC2-Classic, you can migrate Elastic IP addresses that you've allocated for use in the EC2-Classic platform to the EC2-VPC platform, within the same region. This can assist you to migrate your resources from EC2-Classic to a VPC; for example, you can launch new web servers in your VPC, and then use the same Elastic IP addresses that you used for your web servers in EC2-Classic for your new VPC web servers.
After you've migrated an Elastic IP address to EC2-VPC, you cannot use it in the EC2-Classic platform; however, if required, you can restore it to EC2-Classic. After you've restored an Elastic IP address to EC2-Classic, you cannot use it in EC2-VPC until you migrate it again. You can only migrate an Elastic IP address from EC2-Classic to EC2-VPC. You cannot migrate an Elastic IP address that was originally allocated for use in EC2-VPC to EC2-Classic.
To migrate an Elastic IP address, it must not be associated with an instance. For more information about disassociating an Elastic IP address from an instance, see Disassociating an Elastic IP Address and Reassociating it with a Different Instance.
You can migrate as many EC2-Classic Elastic IP addresses as you can have in your account. However, when you migrate an Elastic IP address to EC2-VPC, it counts against your Elastic IP address limit for EC2-VPC. You cannot migrate an Elastic IP address if it will result in you exceeding your limit. Similarly, when you restore an Elastic IP address to EC2-Classic, it counts against your Elastic IP address limit for EC2-Classic. For more information, see Elastic IP Address Limit.
You cannot migrate an Elastic IP address that has been allocated to your account for less than 24 hours.
For more information, see Moving an Elastic IP Address.
Working with Elastic IP Addresses
The following sections describe how you can work with Elastic IP addresses.
Topics
Allocating an Elastic IP Address
You can allocate an Elastic IP address using the Amazon EC2 console or the command line. If your account supports EC2-Classic, you can allocate an address for use in EC2-Classic or in EC2-VPC.
To allocate an Elastic IP address for use in EC2-VPC using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Choose Allocate New Address.
  4. (EC2-Classic accounts) In the Allocate New Address dialog box, select VPC from EIP used in, and then choose Yes, Allocate. Close the confirmation dialog box.
  5. (VPC-only accounts) Choose Yes, Allocate, and close the confirmation dialog box.
To allocate an Elastic IP address for use in EC2-Classic using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Choose Allocate New Address.
  4. Select EC2, and then choose Yes, Allocate. Close the confirmation dialog box.
To allocate an Elastic IP address using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Describing Your Elastic IP Addresses
You can describe an Elastic IP address using the Amazon EC2 or the command line.
To describe your Elastic IP addresses using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Select a filter from the Resource Attribute list to begin searching. You can use multiple filters in a single search.
To describe your Elastic IP addresses using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Associating an Elastic IP Address with a Running Instance
You can associate an Elastic IP address to an instance using the Amazon EC2 console or the command line.
(VPC only) If you're associating an Elastic IP address with your instance to enable communication with the Internet, you must also ensure that your instance is in a public subnet. For more information, see Internet Gateways in the Amazon VPC User Guide.
To associate an Elastic IP address with an instance using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Select an Elastic IP address, choose Actions, and then select Associate Address.
  4. In the Associate Address dialog box, select the instance from Instance and then choose Associate.
To associate an Elastic IP address using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Disassociating an Elastic IP Address and Reassociating it with a Different Instance
You can disassociate an Elastic IP address and then reassociate it using the Amazon EC2 console or the command line.
To disassociate and reassociate an Elastic IP address using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Select the Elastic IP address, choose Actions, and then select Disassociate Address.
  4. Choose Yes, Disassociate when prompted for confirmation.
  5. Select the address that you disassociated in the previous step. For Actions, chooseAssociate Address.
  6. In the Associate Address dialog box, select the new instance from Instance, and then choose Associate.
To disassociate an Elastic IP address using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
To associate an Elastic IP address using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Moving an Elastic IP Address
Currently, you can migrate an Elastic IP address to EC2-VPC or restore it to EC2-Classic using the Amazon EC2 Query API, an AWS SDK, or the AWS CLI only.
After you've performed the command to move or restore your Elastic IP address, the process of migrating the Elastic IP address can take a few minutes. Use the describe-moving-addresses command to check whether your Elastic IP address is still moving, or has completed moving.
If the Elastic IP address is in a moving state for longer than 5 minutes, contact http://aws.amazon.com/premiumsupport/.
To move an Elastic IP address using the Amazon EC2 Query API or AWS CLI
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
To restore an Elastic IP address to EC2-Classic using the Amazon EC2 Query API or AWS CLI
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
To describe the status of your moving addresses using the Amazon EC2 Query API or AWS CLI
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
To retrieve the allocation ID for your migrated Elastic IP address in EC2-VPC
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Releasing an Elastic IP Address
If you no longer need an Elastic IP address, we recommend that you release it (the address must not be associated with an instance). You incur charges for any Elastic IP address that's allocated for use with EC2-Classic but not associated with an instance.
You can release an Elastic IP address using the Amazon EC2 console or the command line.
To release an Elastic IP address using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Elastic IPs.
  3. Select the Elastic IP address, choose Actions, and then select Release Addresses. Choose Yes, Release when prompted.
To release an Elastic IP address using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
Using Reverse DNS for Email Applications
If you intend to send email to third parties from an instance, we suggest you provision one or more Elastic IP addresses and provide them to us. AWS works with ISPs and Internet anti-spam organizations to reduce the chance that your email sent from these addresses will be flagged as spam.
In addition, assigning a static reverse DNS record to your Elastic IP address used to send email can help avoid having email flagged as spam by some anti-spam organizations. Note that a corresponding forward DNS record (record type A) pointing to your Elastic IP address must exist before we can create your reverse DNS record.
If a reverse DNS record is associated with an Elastic IP address, the Elastic IP address is locked to your account and cannot be released from your account until the record is removed.
To remove email sending limits, or to provide us with your Elastic IP addresses and reverse DNS records, go to the Request to Remove Email Sending Limitations page.
Elastic IP Address Limit
By default, all AWS accounts are limited to 5 Elastic IP addresses per region, because public (IPv4) Internet addresses are a scarce public resource. We strongly encourage you to use an Elastic IP address primarily for the ability to remap the address to another instance in the case of instance failure, and to use DNS hostnames for all other inter-node communication.
If you feel your architecture warrants additional Elastic IP addresses, please complete theAmazon EC2 Elastic IP Address Request Form. We will ask you to describe your use case so that we can understand your need for additional addresses.

Source:AWS