

# Working with Amazon Simple Queue Service from the AWS Toolkit for JetBrains
<a name="sqs"></a>

The following topics describe how work with the Amazon Simple Queue Service service from the AWS Toolkit for JetBrains.

**Topics**
+ [Working with Amazon Simple Queue Service queues](sqs-queues.md)
+ [Using Amazon SQS with AWS Lambda in the AWS Toolkit for JetBrains](sqs-lambda.md)
+ [Using Amazon SQS with Amazon SNS in the AWS Toolkit for JetBrains](sqs-sns.md)

# Working with Amazon Simple Queue Service queues
<a name="sqs-queues"></a>

The following topics describe how to use the AWS Toolkit for JetBrains to work with Amazon Simple Queue Service queues and messages.

Standard and FIFO (First-In-Last-Out) are the two kinds of messages you can send using Amazon SQS in the AWS Toolkit for JetBrains. 

**To create an Amazon SQS queue**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, open the context menu for (right-click) the **Amazon SQS** service, and choose **Create Queue...**.

1. Provide a queue name and choose the queue type. 
**Note**  
For more information on queue types, see the [Amazon SQS standard queues](https://docs.aws.amazon.com//AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html) and [Amazon SQS FIFO (First-In-First-Out) queues](https://docs.aws.amazon.com//AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html) topics in the *Amazon Simple Queue Service Developer Guide*. 

1. Choose **Create**.

**To view Amazon SQS messages**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue you want to view and choose **View Messages**.

1. Choose **View Messages** to view the messages in this queue.

**To edit Amazon SQS queue properties**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue that you want to edit and choose **Edit Queue Properties...**.

1. In the **Edit Queue Properties** dialog box that opens, review and modify your queue properties. For more information on Amazon SQS properties, see [Configuring queue parameters (console)](https://docs.aws.amazon.com//AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-queue-parameters.html) in the *Amazon Simple Queue Service Developer Guide*.

**To send Standard messages**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue for sending your message and choose **Send a message**.

1. Populate the message and choose **Send**. After you send the message, you see a confirmation that includes the message ID.

**To send FIFO messages**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue for sending your message and choose **Send a message**.

1. Populate the message, group id, and an optional deduplication id.
**Note**  
If no deduplication id is provided, one will be generated.

1. Choose **Send**. After you send the message, you see a confirmation that includes the message ID.

**To delete an Amazon SQS queue**

1. Verify that a queue is empty before you delete it. For more information see [Confirming that a queue is empty](https://docs.aws.amazon.com//AWSSimpleQueueService/latest/SQSDeveloperGuide/confirm-queue-is-empty.html) in the *Amazon Simple Queue Service Developer Guide*.

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click **Amazon SQS**, and choose **Delete Queue...**.

1. Confirm that you want to delete the queue, and choose **OK** in the deletion dialog box.

# Using Amazon SQS with AWS Lambda in the AWS Toolkit for JetBrains
<a name="sqs-lambda"></a>

The following procedure details how to configure Amazon SQS queues as Lambda triggers in the AWS Toolkit for JetBrains. 

**To configure an Amazon SQS queue as a Lambda triggers**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue you want to work with and choose **Configure Lambda Trigger**.

1. In the dialog box, from the drop-down menu, choose the Lambda function that you want to trigger.

1. Choose **Configure**.

1. If the Lambda function lacks the necessary IAM permissions for Amazon SQS to run it, the toolkit generates a minimal policy that you can add to the IAM role for the Lambda function. 

   Choose **Add Policy**.

After you configure your queue, you get a status message about the applied changes, including any applicable error messages.

# Using Amazon SQS with Amazon SNS in the AWS Toolkit for JetBrains
<a name="sqs-sns"></a>

The following procedure details how to subscribe Standard Amazon SQS queues to Amazon SNS topics using the AWS Toolkit for JetBrains. 

**Note**  
You can't subscribe FIFO Amazon SQS queues to Amazon SNS topics.

**To subscribe a Standard Amazon SQS queue to an Amazon SNS topic**

1. From the AWS Toolkit for JetBrains, expand the AWS Explorer to view your AWS services.

1. From the AWS Explorer, expand the **Amazon SQS** service to view a list of your existing queues.

1. Right-click the queue you want to work with and choose **Subscribe to SNS topic...**.

1. In the dialog box, from the drop-down menu, choose an Amazon SNS topic, and then choose **Subscribe**.