Amazon::SQS::Simple 0.5

Sample Code & Libraries>Amazon SQS>Amazon::SQS::Simple 0.5
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

OO Perl API for accessing the Amazon Simple Queue Service


Submitted By: Simon Whitaker
AWS Products Used: Amazon SQS
Language(s): Perl
Created On: September 9, 2007 9:27 PM GMT
Last Updated: September 21, 2008 9:18 PM GMT

    use Amazon::SQS::Simple;

    my $access_key = 'foo'; # Your AWS Access Key ID
    my $secret_key = 'bar'; # Your AWS Secret Key
    # Create an SQS object
    my $sqs = new Amazon::SQS::Simple($access_key, $secret_key);

    # Create a new queue
    my $q = $sqs->CreateQueue('queue_name');

    # Send a message
    $q->SendMessage('Hello world!');

    # Retrieve a message
    my $msg = $q->ReceiveMessage();
    print $msg->MessageBody() # Hello world!

    # Delete the message

    # Delete the queue
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.