Part 1 of this series focuses on how to link Visual Studio to Amazon Web Services (AWS), in order for you access the Simple Storage Service (S3).
Now that you have laid the foundation, it is time to start assembling the pieces.
Connecting Visual Studio to AWS is the first step. I have shown you how to do this in Part 1. Open Visual Studio, and then select the AWS Explorer option in the View menu. Figure 1 below shows how to do this. If the AWS Explorer option is not listed in the View menu, this means that the AWS Toolkit For Visual Studio was not installed correctly. You should remove it completely and re-try the installation.
Figure 1: Select the AWS Explorer option in the View menu. Next, you will need to link your AWS secret access key and AWS access key to a Visual Studio profile. You will see the Profile field in the upper-left corner of the screen. Perhaps it was just me, but I struggled to locate this field the first time I used it. It is located under the toolbar, above the console tree and just below the yellow banner that reads AWS Explorer. Figure 2 shows the Profile field.
Figure 2: Locate the Profile field. The profile field has three icons, as you can see in this figure. The New Account Profile icon is the leftmost of these icons. Visual Studio will open the New account Profile dialog box by clicking on this icon. Figure 3.
Figure 3: Fill in the New Account Profile dialog box. This dialog box is easy to fill in, as you can see from the above figure. First, you will need to give your profile a unique name. Figure 2 shows that I named my Profile AWS. You can call your profile whatever you like.
Next, you’ll need to enter your Access Key ID. You have two options: you can either type or paste these values into the dialog box. However, you also have the option to import them from a.CSV format file. As you may recall, AWS allows you to export these values into a.CSV format when you create an IAM Account. Visual Studio can create the.CSV files at the time you create an account.
Finally, you will need an account number. Your AWS subscription number is the account number. Before clicking OK, you will need to also specify your account type.
You are now ready to access your S3 buckets via Visual Studio. You may be able to access your S3 buckets through Visual Studio. You will need to ensure that your IAM account has all the permissions required. The following permissions must be granted to the IAM account:
S3:GetBucketAclS3:GetBucketS3:ListBucketYou can set the required permissions by logging in to the AWS Console and going to the IAM dashboard, and then going to the Policies section. I am not able to provide a comprehensive discussion on IAM policies. However, I wrote a detailed article on the subject called “Creating Policies for Amazon S3 Storage Buckets” a few weeks back.
Once permissions are in place, you should now be able access your S3 storage containers through Visual Studio or AWS Explorer.
Figure 4 shows that the console tree has an S3 container. This container has been expanded to reveal a storage bin named VS Posey. Visual Studio offers icons for creating folders and uploading files when you select them.
Figure 4: Visual Studio allows you to access a storage bucket.
