Closed rpmrmartin closed 1 year ago
Reproducible.
Get-S3Object -BucketName <<bucketname>> -KeyPrefix 'rpmdev/2022-04-29' | Format-Table
returns the following output:
ChecksumAlgorithm ETag BucketName Key LastModified Owner Size StorageClass
----------------- ---- ---------- --- ------------ ----- ---- ------------
{} "e02808103e9d31d114e876004e9e604c" <<bucketname>> rpmdev/2022-04-29-ABCDEF.txt 5/20/2022 4:00:13 PM Amazon.S3.Model.Owner 3139 STANDARD
{} "e02808103e9d31d114e876004e9e604c" <<bucketname>> rpmdev/2022-04-29-ABCDUI.txt 5/20/2022 4:00:13 PM Amazon.S3.Model.Owner 3139 STANDARD
{} "e02808103e9d31d114e876004e9e604c" <<bucketname>> rpmdev/2022-04-29-ACEFGH.txt 5/20/2022 4:00:14 PM Amazon.S3.Model.Owner 3139 STANDARD
{} "e02808103e9d31d114e876004e9e604c" <<bucketname>> rpmdev/2022-04-29-ZRTYUI.txt 5/20/2022 4:00:14 PM Amazon.S3.Model.Owner 3139 STANDARD
Read-S3Object -BucketName <<bucketname>> -KeyPrefix 'rpmdev/2022-04-29' -Folder '<<full_path_to_folder>>' -Verbose
produces the following output:
VERBOSE: Invoking Amazon S3 object download APIs in region 'us-east-2'
VERBOSE: Downloaded 0 object(s) from bucket '<<bucketname>>' with keyprefix 'rpmdev/2022-04-29' to '<<full_path_to_folder>>'
AWSSDK.S3
version 3.7.9.4
) doesn't download anything:
using Amazon.S3;
using Amazon.S3.Transfer;
namespace TransferUtilityDownloadDirectoryTest
{
class Program
{
static string bucketName = "<
static void Main(string[] args)
{
var request = new TransferUtilityDownloadDirectoryRequest
{
BucketName = bucketName,
LocalDirectory = localDirectory,
S3Directory = keyPrefix
};
using (var tu = new TransferUtility(new AmazonS3Client()))
{
tu.DownloadDirectory(request);
}
}
}
}
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
We have implemented new parameter DisableSlashCorrection
for Read-S3Object
in the AWS Tools for PowerShell version 4.1.132
. Please set this parameter to $true
for your scenario which would then not add trailing /
to the KeyPrefix
value.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
Read-S3Object
doesn't download any objects when-KeyPrefix
is specified.Expected Behavior
All the objects in the specified bucket with the specified key prefix are downloaded to the specified folder.
Current Behavior
No objects are downloaded.
Reproduction Steps
Run
Read-S3Object
, specifying-BucketName
,-KeyPrefix
, and-Folder
.Possible Solution
No response
Additional Information/Context
No response
AWS Tools for PowerShell version used
4.1.89
PowerShell version used
Operating System and version
Windows 10 Pro for Workstations 21H2 19044.1706