| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
To install the Amazon CloudSearch command line tools
To download the command line tools for Windows, go to https://aws.amazon.com/developertools/4320728073503020 and click the Download button.
To download the command line tools for Mac OS/Linux, go to https://aws.amazon.com/developertools/9054800585729911 and click the Download button.
Unpack the .zip or .tar.gz file. On Windows, we recommend unzipping the tools in the C:\CloudSearch directory.
Set the CS_HOME environment variable to point to the directory where you unpacked the tools.
On Linux and UNIX, enter following command:
export CS_HOME=install_directory_pathOn Windows, enter the following command:
set CS_HOME=install_directory_pathNote
These examples temporarily set the CS_HOME and PATH variables for the duration of your terminal session. You can also set them permanently. On Linux and MacOSX, add the export commands to your shell startup file (.profile, .bashrc, .tcshrc, or .zshrc) in your home directory. On Windows, you can do this through the Control Panel: Control Panel > System and Security > System > Advanced > Environment Variables.
Add the CS_HOME environment variable to your PATH.
On Linux and UNIX, enter following command:
export PATH=$PATH:$CS_HOME/bin
On Windows, enter the following command:
set PATH=%PATH%;%CS_HOME%\bin
Make sure you have the Java 6 (or later) JRE installed and the JAVA_HOME environment variable is set to the full path of the directory that contains the bin directory in which the Java executable resides.
For information about checking your Java installation, go to java.com.
Note
On Mac OS X, JAVA_HOME should be set using the /usr/libexec/java_home command. For example: export JAVA_HOME=$(/usr/libexec/java_home). For more information, see QA1170 on developer.apple.com.
Configure the command line tools to use your
AWS identifiers. The Amazon CloudSearch command line tools look for your AWS identifiers in a text file on your local system in the location specified by the AWS_CREDENTIAL_FILE environment variable. If you have not already configured an AWS credential file:
Use a text editor to create a two-line text file that specifies your AWS identifiers. The first line sets the accessKey property and the second line sets the secretKey property. For example:
accessKey=AKIAIOSFODNN7EXAMPLE secretKey=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Save the file using any name you want (for example, account-key).
Limit the file permissions to only the file owner. (For example, use chmod 600 on the file if you're using Linux/UNIX).
Set the AWS_CREDENTIAL_FILE environment variable.
On Linux and UNIX, enter following command:
export AWS_CREDENTIAL_FILE=credential_file_pathOn Windows, enter the following command:
set AWS_CREDENTIAL_FILE=credential_file_pathTo verify that the Amazon CloudSearch tools are configured correctly, run the cs-describe-domain command. (Since you haven't configured any domains yet, the Domain Summary will be empty.)
cs-describe-domain
If you get an error, check the following:
If the system cannot find the specified path, your JAVA_HOME environment variable needs to be set to the location where you have the JRE installed. For example, C:\Program Files\Java\jre6.
If cs-describe-domain is not recognized as a command, check your PATH and make sure it contains the bin directory for the command line tools, for example /Users/username/CloudSearch/tools/bin.
If you get an InvalidClientTokenId error, your AWS credentials are not configured correctly. Make sure that you've configured the AWS_CREDENTIAL_FILE environment variable and that your credential file contains valid AWS identifiers.