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.
1 |
Install-Module -Name AWS.Tools.Installer |
This post assumes that, you have AccessKey
, SecretKey
for you AWS s3 bucket.
1 2 3 4 |
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
1 |
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
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.