Uploading to S3 using PowerShell is quite easy.
Here’s the
code:
$accesskey = '123'
$secretkey = '456'
$dregion = 'us-east-1'
Write-S3Object -AccessKey $accesskey -SecretKey $secretkey -Region $dregion -BucketName -File C:\Temp\test-file.txt
#Replace NameofthebucketinS3 with the folder name found in S3
#test-file.txt is the
file that will be uploaded to S3 and is located on c:\Temp
#Change the folder location c:\Temp and the file to be uploaded
#Above code will upload the file to the
root of the S3 Bucket
#If need to upload a file to a specific subfolder in S3 bucket used the code below
$accesskey = '123'
$secretkey = '456'
$dregion = 'us-east-1'
Write-S3Object -AccessKey $accesskey -SecretKey $secretkey -Region $dregion -BucketName
NameofthebucketinS3/SubFolderBucket -File C:\Temp\test-file.txt
Use forward slash to indicate the sub folder path.
So the syntax would be “root folder name” in S3 followed by “forward slash” or “/”
then the “sub folder name”.
If the destination folder is another sub folder
then precede with a “/” then sub folder name.
Heaven's Dew Fall Prayer app for Android :
https://play.google.com/store/apps/details?id=com.myrosaryapp
Comments
Post a Comment