In this tutorial, we gonna upload files and folders to the AWS s3 bucket using PowerShell. First, you’ll need to install the general
AWS.Tools.Installer package, for more information, follow the link.
Run following command in PowerShell with admin privileges.
Install-Module -Name AWS.Tools.Installer
This post assumes that, you have
SecretKey for you AWS s3 bucket.
Set-AWSCredential ` -AccessKey "YOUR_ACCESS_KEY_ID" ` -SecretKey "YOUR_SECRET_ACCESS_KEY" ` -StoreAs default
After setting AWS credential, let’s upload file with following command
Write-S3Object -BucketName "YourBucketName" -Key "desiredFileNameInBucket.tar" -File "localFile.tar"
For more examples visit : https://docs.aws.amazon.com/powershell/latest/reference/items/Write-S3Object.html