Sunday, 18 May 2014

How to work with S3 using the AWS Toolkit in Visual Studio

This is another in a series of videos that I am producing for my YouTube channel HowDoYouDoStuff.


In this video, I am going to show you how to work with S3 using the AWS Toolkit in Visual Studio


You can read the transcript below.


HTML 5 Player



Transcript

Hi guys. I'm Phil Stirpe.

In this video, I am going to show you how to work with S3 using the AWS Toolkit in Visual Studio.

In an earlier video I showed you how to download and install the AWS Toolkit into Visual Studio.

But this video I just want to focus on how we can use the AWS toolkit to access S3 whilst working away in Visual Studio.

In that video I showed you how to configure visual studio to use an IAM user called Frank to connect to Amazon web services. That involved entering Frank’s access key and secret key.

Will now we know that Visual Studio is configured let’s focus on using S3.

This video I don’t want to focus on how we might use the SDK to interact with S3 programmatically. I just want to look at how we would carry out management tasks such as creating buckets, dragging files into buckets, and deleting buckets.

Some just going to try and create a new bucket by right clicking on the S3 node in the AWS Explorer.

Going to call it demobucket. The thing to be aware of the S3 is that bucket names need to be globally unique stop and I have a strong feeling that demobucket will have gone by now.

Now. That name is not available. So I could try adding in a hyphen to create demo-bucket but am pretty sure that name will have gone also.

All right let me try a prefix of qa to come up with a bucket named of qa-demo-bucket.

Now here we are getting a different error message. What is interesting is that I did create that bucket earlier and then delete it. But when recording and other video I earlier to perform the same task in Eclipse, I created a Pre-signed URL that granted access to that bucket for an hour and because of that, Amazon web services is preventing me from creating a bucket with that same name.

I’m going to have to come up with another bucket name. How about my-demo-bucket?

No. That name has gone also. This is getting a bit tedious.

Okay. Let’s go for aws-toolkit-demo-bucket.

While that’s a relief. There we have the bucket.

So that’s a task you might perform in Visual Studio as a developer. It’s not worth writing code to create a bucket. You just want to go ahead and create one.

Good luck with the naming.

Another task that you might want to perform in Visual Studio is to simply drag a file and drop into a bucket to work with.

Once again it’s not worth writing the code to achieve this, you just want to get the job done.

So let’s say I want to drag a file into my bucket.

What are can’t do, is simply drag a file from Windows Explorer end to a bucket node in AWS Explorer. That will simply open the file in Visual Studio.

What I need to do, is to open or browse the bucket in AWS Explorer by right clicking the bucket name and selecting Browse.

The S3 browse window opens and offers me a number of options that let me manage my folders.

One thing I can do, is drag a file from Windows Explorer into this S3 browse window in Visual Studio.

This results in the upload settings dialog appearing where I am asked a number of questions.

There are a couple of flavours of S3 including standard and reduced redundancy storage. If I wanted to upload my file into reduced redundancy storage then I simply need to check this box. I could also request that my file be encrypted at rest. In other words whilst stored in S3.

I’m also able to specify that the file is publicly readable. I don’t want to do that.

If I click on the Permissions tab you can see that there are no permissions granted on this file

If I chose, I could add permissions in via this window which would result in an access control list or ACL. I would still probably want to create some IAM policies.

I don’t want to manage permissions from here. I would want to do that elsewhere. For example the AWS console.

So I’m just going to go ahead and click OK.

There we go, the file has been uploaded.

I was given an option to define an alternate key, but I’m happy to use the file name.

That’s how simple it is to upload a file into S3 whilst working in Visual Studio.

And if I can upload a file, I can just as easily download or delete a file.

Now although I didn’t want to manage permissions whilst in Visual Studio, I do want to look at how people might access assets in S3.

If I right click the file and copy the URL into the clipboard, I could open up an incognito window and paste it into the address bar. I’m using an incognito window by the way, because I am already logged in to Amazon web services in another browser window.

As you can see, when trying to access the file in S3 using this URL, I receive access denied. Which is to be expected as no permissions are granted.

In fact only the ceiling get that anyone that root account and the IAM user called Frank have access to that bucket and its contents.

A clever thing we can do whilst in Visual Studio, is to right click the file again choose a pre-signed URL.

This allows you to create a time stamped, pre-signed URL. By default I am being offered one hour’s access which I will accept.

I will generate the URL. By the way, note that this is for a GET action but I could also specify a PUT action.

Let me copied this URL and paste it into that same browser window.

Notice that it contains an access key has just been generated and expiry time.

When I press enter, the file and its contents are returned to this unauthenticated window using the signed URL.

So I’ll just pop back into Visual Studio stop using the AWS toolkit with been able to perform some simple management tasks with S3 such as creating a bucket, uploading a file and generate a pre-signed URL.

The last thing I want to do is simply delete the bucket and any objects within it as I want to tidy up after myself.

There is more that I could do with S3 and of course now we have the AWS toolkit installed, we also have access to the SDK and therefore could go ahead and write code to interact with the service. But I just wanted to give you a feel for some of the simple management tasks that you could carry out with S3 whilst using the AWS toolkit in Visual Studio.



There you have it.

In this video, I have shown you how easy it is to work with S3 using the AWS Toolkit in Visual Studio.

Thanks for watching and please feel free to comment on my blog (www.philipstirpe.com) and Facebook page (www.facebook.com/philip.stirpe.tutorials). Perhaps you could suggest more video topics? Most of all, don't forget to subscribe to keep up with my videos as I release them.

Bye for now.






Flash Player








See you soon

Phil Stirpé
"I don't do average!"






72 comments:

  1. The Information shared are very mush Useful my sincere thanks for sharing this post Please continue to share this kind of post
    AWS Training in Marathahalli

    ReplyDelete
  2. Thanks for taking time to share this post. It is really useful. Continue sharing more like this.
    Regards,
    Amazon Web Services Training in Chennai

    ReplyDelete
  3. Thank you for your post. This is excellent information about the how to work with s3 using aws tool kit.it is amazing
    AWS Training in Hyderabad

    ReplyDelete
  4. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
    No.1 IOS Training Institute in Chennai | Best Android Training Institute in Chennai | Java Training Institute in Chennai

    ReplyDelete
  5. Hi, I have read your blog. Really very informative and excellent post..
    Final Year Project Center in Chennai | IEEE Project Center in Chennai

    ReplyDelete
  6. Excellent sharing..the blog you uploaded was very gud. best bigdata training in bangalore.

    ReplyDelete
  7. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.
    or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete
  8. Hi dear, I like your post so much, and it is very good. Hope that we can communicate with each other. I want to introduce an aso services, I try it and I feel it is so good to us beginners.

    ReplyDelete
  9. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. Amazon Web Services Training in Chennai

    ReplyDelete
  10. Thank you so much for sharing this informative blog. Your technical information is really useful for me. Keep update your blog.
    Regards..
    Amazon Web Services Training in Chennai
    Amazon Web Services Training Institute in Chennai

    ReplyDelete
  11. I strongly believe that there will be great opportunities for those who looked into your site.
    Best Online Software Training Institute | IoT Training

    ReplyDelete
  12. Really great blog, it's very helpful and has great knowledgeable information. Thanks for sharing, keep updating such a good informative blog.

    Digital Transformation Services | Austere Technologies

    ReplyDelete
  13. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles..
    Summer Course Training for Graphic Designing in Chennai | Summer Course Training for Graphic Designing in Velachery

    ReplyDelete
  14. I read this article. I think You put a lot of effort to create this article. I appreciate your work.

    Best Summer Courses in Nanganallur | No.1 Summer Courses in Nanganallur

    ReplyDelete
  15. VERY INFORMATIVE BLOG. KEEP SHARING SUCH A GOOD ARTICLES.

    cloud Services | Austere Technologies

    ReplyDelete
  16. Great article, really very helpful content you made. Thank you, keep sharing.

    Best Software Company | Austere Technologies

    ReplyDelete
  17. wow...nice blog, very helpful information. Thanks for sharing.

    IOT SERVICES | INTERNET OF THINGS | Austere Technologies

    ReplyDelete
  18. Nice blog with excellent information. Thank you, keep sharing.

    Software Security Services | Austere Technologies

    ReplyDelete
  19. Really great blog, it's very helpful and has great knowledgeable information.

    Mobility Services | Austere Technologies

    ReplyDelete
  20. Needed to compose one little word yet thanks for the suggestions that you are contributed here, keep sharing on the new updates...
    Best Online Software Training Institute | HTML5 CSS3 Training

    ReplyDelete
  21. Wow...What an excellent informative blog, really helpful. Thank you.
    Best Commerce College| Avinash college of commerce

    ReplyDelete
  22. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    Best Commerce College in Hyderabad | Avinash College of Commerce

    ReplyDelete


  23. This was an nice and amazing and the given contents were very useful and the precision has given here is good.
    Hadoop Training Institute in Chennai

    ReplyDelete
  24. Hi Thanks for the nice information its very useful to read your blog. We provide best Block Chain Services

    ReplyDelete
  25. Hi Thanks for the nice information its very useful to read your blog. We provide best System Integration Services

    ReplyDelete
  26. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman holiday packages

    ReplyDelete
  27. Hi Thanks for the nice information its very useful to read your blog. We provide best Finance Training in Hyderabad

    ReplyDelete
  28. Hi Thanks for the nice information its very useful to read your blog. We provide best company secretary course

    ReplyDelete
  29. Hi Thanks for the nice information its very useful to read your blog. We provide best Chartered Accountancy

    ReplyDelete
  30. Hi Thanks for the nice information its very useful to read your blog. We provide best Chartered Accountancy

    ReplyDelete
  31. Hi Thanks for the nice information its very useful to read your blog. We provide best Cost And Management Accountancy (CMA)

    ReplyDelete
  32. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Public Accountant

    ReplyDelete
  33. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Financial Analyst

    ReplyDelete
  34. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TOUR PACKAGE @24599

    ReplyDelete
  35. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book BEST ANDAMAN HONEYMOON PACKAGE @5999

    ReplyDelete
  36. Nice blog..! I really loved reading through this article. Thanks for sharing such
    an amazing post with us and keep blogging... RPA Training in Chennai | Blue Prism Training in Chennai

    ReplyDelete
  37. Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

    ReplyDelete
  38. Hi Thanks for the nice information its very useful to read your blog. We provide Software Development Services

    ReplyDelete
  39. Hi Thanks for the nice information its very useful to read your blog. We provide best Chartered Institute Of Management Accountants

    ReplyDelete
  40. Hi Thanks for the nice information its very useful to read your blog. We provide Software Development Services

    ReplyDelete
  41. Hi Thanks for the nice information its very useful to read your blog. We provide best Find All Isfs Courses

    ReplyDelete
  42. This comment has been removed by the author.

    ReplyDelete
  43. This comment has been removed by the author.

    ReplyDelete
  44. Awwsome informative blog ,Very good information thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us. Aviation Courses in Chennai | Best Aviation Academy in Chennai | Aviation Academy in Chennai | Aviation Training in Chennai | Aviation Institute in Chennai

    ReplyDelete
  45. Thanks for such a nice article on Blueprism.Amazing information of Blueprism you have . Keep sharing and updating this wonderful blog on Blueprism
    Thanks and regards,
    blue prism training in chennai
    blue prism training institute in chennai
    Blueprism certification in chennai

    ReplyDelete
  46. Thanks for sharing a valuable information to us. Thanks for your blog.
    CIMA training institute in Hyderabad | ISFS

    ReplyDelete
  47. Amazon has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.For more information visit.
    aws online training
    aws training in hyderabad
    amazon web services(AWS) online training
    amazon web services(AWS) training online

    ReplyDelete
  48. In the beginning, I would like to thank you much about this great post. Its very useful and helpful for anyone looking for tips to help him learn and master in Angularjs. I like your writing style and I hope you will keep doing this good working.
    Best Android Training in Bangalore
    Android Developer Course in Bangalore
    Android App Development Training in Bangalore
    Angularjs Classes in Bangalore
    Angularjs Coaching in Bangalore
    Angularjs Institute in Bangalore

    ReplyDelete
  49. Awwsome informative blog ,Very good information thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us. Aviation Courses in Chennai | Best Aviation Academy in Chennai | Aviation Academy in Chennai | Aviation Training in Chennai | Aviation Institute in Chennai

    ReplyDelete
  50. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work.
    R Programming Training in Chennai | R Programming Training in Chennai with Placement | R Programming Interview Questions and Answers | Trending Software Technologies in 2018

    ReplyDelete
  51. Nice Post. Looking for more updates from you. Thanks for sharing.

    businessexceltemplates
    Article submission sites

    ReplyDelete

  52. It's really a nice experience to read your post. Thank you for sharing this useful information. If you are looking for more about Roles and reponsibilities of hadoop developer | hadoop developer skills Set | hadoop training course fees in chennai | Hadoop Training in Chennai Omr

    ReplyDelete
  53. It is really a great work and the way in which u r sharing the knowledge is excellent. Thanks for helping me to understand basic concepts. Thanks for your informative article.
    Java Training in Chennai OMR
    Pega Training in Chennai OMR
    Python Training in Chennai OMR
    Blue prism Training in Chennai OMR
    RPA Training in Chennai OMR
    Aptitude Training in Chennai OMR

    ReplyDelete