Move IIS Logs to AWS s3 bucket


I have a requirement to upload IIS logs 7 days older to AWS S3 Bukcet. By using below code I am able to access AWS folders under bucket

Now if I type Get-S3Directories -BucketName backups I get the following output:

Now the challenge is I have to move IIS older than 7 days under SERVER-IISLogFiles/ Directory

So I have created this

I am not entirely sure whether its going to move to SERVER-IISLogFiles/ Directory, not sure if I am missing anything here apart from this, I doubt its going to keep the folder structure of local IIS folder on IIS



You could try and use the following method to create your folder structure within the S3 Bucket. Using the Key Prefix parameter and splitting your path to your folders should work.


Move IIS Logs to AWS s3 bucket by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply