AWS Developer Tools Blog

Drag and Drop in the AWS Toolkit for Visual Studio

Using drag and drop can be a great time saver when using your favorite tool, but it is not always obvious what drag and drop features are available. The AWS Toolkit for Visual Studio has many drag and drop features that you might not have discovered yet.

AWS Explorer to the Code Window

When dragging resources from AWS Explorer to your code, the name used to look up the resource is inserted into your code. For example, dragging an Amazon S3 bucket inserts the bucket name into your code. This is especially useful for Amazon SQS queues where the full queue URL is inserted, and for Amazon SNS topics where the topic ARN is inserted.

Amazon S3 Bucket Browser

Files and folders in Windows Explorer can be dragged into the S3 bucket browser. This uploads the local files and folders to the specific bucket. S3 objects can also be dragged out of the S3 bucket browser into Windows Explorer. If you drag a “folder” from the S3 bucket browser, a folder is created on your local system, and all of the objects with the folder prefix are downloaded into the folder.

Subscribing Amazon SQS Queues to Amazon SNS Topics

In order to have an SQS queue receive messages from an SNS topic, the queue must be subscribed and the permissions on the SQS queue must give the SNS topic access to the SendMessage action. In the toolkit, this is easy to do by opening up the SNS topic view and then dragging the target SQS queue into the view.

This displays the confirmation dialog box with the check box to add permissions on the SQS queue for the SNS topic. Afterwards, you can confirm the permissions by right-clicking the SQS queue and selecting Edit Policy. You can also confirm the subscription by using the “Publish to Topic” feature in the topic view and seeing the message in the queue view.

AWS Identity and Access Management (IAM) Policy Editor

Using IAM to restrict access to your resources is very important in keeping your account secure. In the policies that you create for IAM groups, roles, and users, you identify the resources you want to give or deny access to by their Amazon Resource Name (ARN). To make this step easier, you can drag your target resources or services from AWS Explorer to the policy editor, which automatically fills in the required ARNs.

AWS CloudFormation Stack to a Template File

When using the CloudFormation Editor, you can drag stacks from AWS Explorer to an open template file. This replaces all the contents of the template with the template from the stack. (A confirmation box appears to make sure that this is what you want to do.)