| Did this page help you? Yes No Tell us about it... |
To complete the subsequent sections in this guide, you must make configuration changes to the sample files.
![]() | Tip |
|---|---|
If you don't want to write code, you can use the AWS Management Console or Amazon SQS scratchpad, a simple HTML and JavaScript application. |
The easiest way to explore Amazon SQS without writing any code is with the AWS Management Console.
To access SQS with the AWS Management Console
Sign in to the AWS Management Console.
Select the Amazon SQS tab.
An easy way to explore Amazon SQS without writing any code is with the Amazon SQS scratchpad. To use the scratchpad, you must have an AWS account and be signed up for SQS (for more information, see Creating an AWS Account and Signing Up for SQS).
The scratchpad is a simple HTML and JavaScript application based on the 2009-02-01 version of SQS. You can use the scratchpad to understand what Query requests and responses for SQS look like, and to troubleshoot signature issues with Query requests.
To prepare the scratchpad
Go to the scratchpad download.
Download the scratchpad and extract it to a working directory on your computer.
Open the index.html file with a web browser.
The welcome page is displayed.

Enter your Access Key ID and Secret Access Key (for more information, see Getting Your AWS Identifiers).
Follow the tutorial described in the remainder of this guide.
Note that the Java example performs all actions in one call: creating a queue, confirming the queue exists, sending a message, receiving a message, and deleting a message.
To prepare the sample files
Go to the AWS SDK for Java page and download the SDK.
Download the aws-java-sdk-1.0.0.20100226.zip file and unzip it to a directory designated as <sqs home> on your machine.
Open the AWS credentials file:
<sqs home>/aws-java-sdk/samples/AmazonSimpleQueueService/AwsCredentials.properties.
Enter your Access Key ID and Secret Access Key:
# Fill in your AWS Access Key ID and Secret Access Key # http://aws.amazon.com/security-credentials accessKey =<Your AWS Access Key ID>secretKey =<Your Secret Access Key>
Save the file.
Note that the C# example performs all actions in one call: creating a queue, confirming the queue exists, sending a message, receiving a message, and deleting a message.
To prepare the sample files
Go to the AWS SDK for .NET page and download the SDK.
Run the downloaded installation program,
AWSToolsAndSDKForNet.msi.
The installation installs to C:\Program Files\AWS SDK for
.NET by default.
Go to C:\Program Files\AWS SDK for
.NET\Samples\AmazonSQS_Sample and open one of the following sample solutions:
AmazonSQS_Sample.VS2008.sln
AmazonSQS_Sample.VS2010.sln
Open the App.config file.
Enter your Access Key ID and Secret Access Key:
<configuration>
<appSettings>
<add key="AWSAccessKey" value="<Your Access Key ID>"/>
<add key="AWSSecretKey" value="<Your Secret Access Key>"/>
</appSettings>
</configuration>Save the file.
To prepare the sample files
Go to the location of the Perl sample code that AWS provides and download the sample code package.
Extract the sample code into a directory on your machine.
Prepare each of the individual samples:
Open the
amazon-queue-2009-02-01-perl-library/src/Amazon/SQS/Samples/CreateQueueSample.pl
sample file.
Make sure the following lines are not commented out and enter your Access Key ID and Secret Access Key.
my $AWS_ACCESS_KEY_ID = "<Your Access Key ID>"; my $AWS_SECRET_ACCESS_KEY = "<Your Secret Access Key>"; use Amazon::SQS::Client; my $service = Amazon::SQS::Client->new($AWS_ACCESS_KEY_ID, $AWS_SECRET_ACCESS_KEY);
Make sure the following lines are commented out.
use Amazon::SQS::Mock; my $service = Amazon::SQS::Mock->new;
Save the file.
Repeat this procedure for each file in the Samples
directory.
![]() | Note |
|---|---|
The mock service is an alternate way to use the sample code. The service doesn't call
AWS, but instead returns a set response that you can modify to suit your needs (the XML
response files are in the |
To prepare the sample files
Go to the location of the PHP sample code that AWS provides and download the sample code package.
Extract the sample code into a directory on your machine.
Open the
amazon-queue-2009-02-01-php5-library/src/Amazon/SQS/Samples/.config.inc.php
file.
Enter your Access Key ID and Secret Access Key in the following lines and save the file.
define('AWS_ACCESS_KEY_ID', '<Your Access Key ID>');
define('AWS_SECRET_ACCESS_KEY', '<Your Secret Access Key>');Prepare each of the individual samples:
Open the
amazon-queue-2009-02-01-php5-library/src/Amazon/SQS/Samples/CreateQueueSample.php
file.
Make sure the following line is not commented out.
$service = new Amazon_SQS_Client(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);
Make sure the following line is commented out.
$service = new Amazon_SQS_Mock();
Save the file.
Repeat this procedure for each file in the Samples
directory.
![]() | Note |
|---|---|
The mock service is an alternate way to use the sample code. The service doesn't call
AWS, but instead returns a set response that you can modify to suit your needs (the XML
response files are in the |