This is a brief code using C# to download a file from AWS S3.
"AmazonS3Util.cs" includes 3 main functions:
- Check the names of folders in case you name your folders in S3 according to the version number.
- Return the latest version string.
- Download the file.
Steps to make the code works for you:
- Add your AWS credentials.
- Add Bucket Name and Prefix.
- Change "MainFolder" and 'VersionStability" in the "App.config" if needed.
- Change the folder structure in S3 to match the code or both to match your need wherever needed. The default is:
"s3://[Bucket Name]/[Prefix]/v+[s3Version]/[VersionStability]/[The file that you want to download]"