Introduction
In this article, I will show you how to create an S3 Bucket in Amazon Web Services and then access and manage its objects from your C# code.
Using the code
Before you use this code, you will need to have an AWS account and know how to create an S3 bucket in AWS. I have provided a step-by-step guide that explains how to create a S3 bucket, add users by using IAM in AWS, and set up a group policy to regulate access to the S3 resources.
You can see my S3 tutorial here.
Start a new project in Visual Studio, then continue by adding AWS SDK to our project from the Nuget repository,

To maintain our objects and perform the download, upload, and delete, I have created separated classes,

S3BucketDelete
To delete objects (files and folders).
S3BucketDownload
To download objects into local destinations from the AWS S3.
S3BucketUpload
To upload files from the location sources into our S3,
S3BucketView
To view objects (files and folders) in S3.
Both local and remote files and folders are listed in listView and treeView objects. So, you can browse. The project’s app.config file is where we need to place our credentials to access the S3 objects so that AWS SDK can access them,
In addition to this, I have defined another property to store the bucket name.
![]()
As soon as the app is launched, we prepare the files,
Two ContextMenuStrip controls provide shortcuts to perform our functions
I have also added StatusBar and placed StatusLabels to show the selected file, current local path, S3 object address, and network status label.
To remove objects from the S3 folders, you have to check the item checkbox, and after the right-click, select the Delete option.
The Settings
I wanted this project to be as customizable as possible, so I decided to add the Settings screen so that I can switch between different AWS accounts and S3 objects:
![]()
As you can see, the Settings form provides two methods to store and restore the app settings values from the app.config file.
And this method saves the changes to the app.config,
Points of Interest
Once you figure out how everything works, you will improve this code and build your own. I wrote this code in a few hours, and I’m sure it has plenty of room to improve.
History
This is the first version of the software and I hope to improve it with some new features such as access to multiple S3 objects from different AWS accounts.