Amazon S3 Bucket Management with C#: Part 7 – Creating a text file in a Bucket - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Tuesday, August 7, 2018

Amazon S3 Bucket Management with C#: Part 7 – Creating a text file in a Bucket

Before getting started Skill Level: Beginner Assumptions: You already gone through Parts 1-6 of Managing Amazon AWS with C#. Additional information: I sometimes cover small sub-topics in a post. Along with AWS, you will also be exposed to: Rhyous.SimpleArgs Rhyous.StringLibrary Step 1 – Add NuGet Package Right-click on your project and choose Management NuGet Packages. Search for Rhyous.StringLibrary. This is a simple library for string extensions methods and more. String code that is not in .Net by default, yet the methods have proven over time to be commonly used. Install the Rhyous.StringLibrary NuGet package. Step 2 – Add a CreateTextFile method to BucketManager.cs Edit file called BucketManager.cs. Enter this new method: public static async Task CreateTextFile(AmazonS3Client client, string bucketName, string filename, string text) { var dirRequest = new PutObjectRequest { BucketName = bucketName, Key = filename, InputStream = text.ToStream() }; await client.PutObjectAsync(dirRequest); Console.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

AWS,csharp,aws,c#,S3

No comments:

Post a Comment