AWS API Command-Line Tools Setup
179
$ cloudstack-aws-api-register --apikey=User’s CloudPlatform API key --
secretkey=User’s CloudPlatform Secret key --cert=/path/to/cert.pem --
url=http://CloudPlatform.server:7080/awsapi
Note
A user with an existing AWS certificate could choose to use the same certificate with
CloudPlatform, but the public key would be uploaded to the CloudPlatform management server
database.
15.4.2. AWS API Command-Line Tools Setup
To use the EC2 command-line tools, the user must perform these steps:
1. Be sure you have the right version of EC2 Tools. The supported version is available at http://
s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.6.2.0.zip.
2. Set up the environment variables that will direct the tools to the server. As a best practice, you
may wish to place these commands in a script that may be sourced before using the AWS API
translation feature.
$ export EC2_CERT=/path/to/cert.pem
$ export EC2_PRIVATE_KEY=/path/to/private_key.pem
$ export EC2_URL=http://CloudPlatform.server:7080/awsapi
$ export EC2_HOME=/path/to/EC2_tools_directory
15.5. Supported AWS API Calls
The following Amazon EC2 commands are supported by CloudPlatform when the AWS API
compatibility feature is enabled. For a few commands, there are differences between the
CloudPlatform and Amazon EC2 versions, and these differences are noted. The underlying SOAP /
REST call for each command is also given, for those who have built tools using those calls.
Table 15.1. Elastic IP
EC2 command SOAP / REST call CloudPlatform API call
ec2-allocate-address AllocateAddress associateIpAddress
ec2-associate-address AssociateAddress enableStaticNat
ec2-describe-addresses DescribeAddresses listPublicIpAddresses
ec2-diassociate-address DisassociateAddress disableStaticNat
ec2-release-address ReleaseAddress disassociateIpAddress
Table 15.2. Availability Zone
EC2 command SOAP / REST call CloudPlatform API call
ec2-describe-availability-zones DescribeAvailabilityZones listZones
Table 15.3. Images
EC2 command SOAP / REST call CloudPlatform API call
ec2-create-image CreateImage createTemplate