AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
DownloadFile (Default)
Read-S3Object-BucketName <String>-Key <String>-File <String>-VersionId <String>-ModifiedSinceDate <DateTime>-UnmodifiedSinceDate <DateTime>-ServerSideEncryptionCustomerMethod <ServerSideEncryptionCustomerMethod>-ServerSideEncryptionCustomerProvidedKey <String>-ServerSideEncryptionCustomerProvidedKeyMD5 <String>-ChecksumMode <ChecksumMode>-UseMultipartDownload <SwitchParameter>-MultipartDownloadType <MultipartDownloadType>-PartSize <FileSize>-ConcurrentServiceRequest <Int32>-EnableLegacyKeyCleaning <SwitchParameter>-ClientConfig <AmazonS3Config>-UseAccelerateEndpoint <SwitchParameter>-UseDualstackEndpoint <SwitchParameter>-ForcePathStyleAddressing <Boolean>DownloadFolder
Read-S3Object-BucketName <String>-KeyPrefix <String>-Folder <String>-DisableSlashCorrection <Boolean>-ModifiedSinceDate <DateTime>-UnmodifiedSinceDate <DateTime>-UseMultipartDownload <SwitchParameter>-ConcurrentServiceRequest <Int32>-DownloadFilesConcurrently <SwitchParameter>-FailurePolicy <FailurePolicy>-EnableLegacyKeyCleaning <SwitchParameter>-ClientConfig <AmazonS3Config>-UseAccelerateEndpoint <SwitchParameter>-UseDualstackEndpoint <SwitchParameter>-ForcePathStyleAddressing <Boolean>FromS3ObjectToFileOrFolder
Read-S3Object-BucketName <String>-File <String>-Folder <String>-S3Object <S3Object>-ModifiedSinceDate <DateTime>-UnmodifiedSinceDate <DateTime>-ServerSideEncryptionCustomerMethod <ServerSideEncryptionCustomerMethod>-ServerSideEncryptionCustomerProvidedKey <String>-ServerSideEncryptionCustomerProvidedKeyMD5 <String>-ChecksumMode <ChecksumMode>-UseMultipartDownload <SwitchParameter>-MultipartDownloadType <MultipartDownloadType>-PartSize <FileSize>-ConcurrentServiceRequest <Int32>-EnableLegacyKeyCleaning <SwitchParameter>-ClientConfig <AmazonS3Config>-UseAccelerateEndpoint <SwitchParameter>-UseDualstackEndpoint <SwitchParameter>-ForcePathStyleAddressing <Boolean>
| Required? | True |
| Position? | 1 |
| Accept pipeline input? | True (ByValue, ByPropertyName) |
ChecksumMode and the object is KMS encrypted, you must have permission to the kms:Decrypt action for the request to succeed. | Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | ConcurrentServiceRequests |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | True (DownloadFile) |
| Position? | 3 |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | True (DownloadFolder) |
| Position? | 3 |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | Directory |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | True |
| Position? | 2 |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | 2 |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | Prefix |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | True |
| Position? | Named |
| Accept pipeline input? | True (ByValue, ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | 4 |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | Version |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | AK |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByValue, ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByValue, ByPropertyName) |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | AWSProfilesLocation, ProfilesLocation |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | StoredCredentials, AWSProfileName |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | RegionToCall |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | SK, SecretAccessKey |
| Required? | False |
| Position? | Named |
| Accept pipeline input? | True (ByPropertyName) |
| Aliases | ST |
Read-S3Object -BucketName amzn-s3-demo-bucket -Key sample.txt -File local-sample.txtThis command retrieves item "sample.txt" from bucket "amzn-s3-demo-bucket" and saves it to a file named "local-sample.txt" in the current location. The file "local-sample.txt" does not have to exist before this command is called.
Read-S3Object -BucketName amzn-s3-demo-bucket -KeyPrefix DIR -Folder Local-DIRThis command retrieves virtual directory "DIR" from bucket "amzn-s3-demo-bucket" and saves it to a folder named "Local-DIR" in the current location. The folder "Local-DIR" does not have to exist before this command is called.
Get-S3Bucket | ? { $_.BucketName -like '*config*' } | Get-S3Object | ? { $_.Key -like '*.json' } | Read-S3Object -Folder C:\ConfigObjectsDownloads all objects with keys ending in '.json' from buckets with 'config' in the bucket name to files in the specified folder. The object keys are used to set the filenames.
Read-S3Object -BucketName amzn-s3-demo-bucket -Key sample.txt -File local-sample.txt -UseMultipartDownloadDownloads a single object using multipart parallel download for improved performance on large files.
Read-S3Object -BucketName amzn-s3-demo-bucket -Key large-file.zip -File local-large-file.zip -UseMultipartDownload -MultipartDownloadType RANGE -PartSize 64MBDownloads a large object using RANGE mode with a custom 64MB part size. RANGE mode uses HTTP byte-range requests and works for all objects regardless of how they were uploaded.
Read-S3Object -BucketName amzn-s3-demo-bucket -KeyPrefix data/ -Folder C:\local-data -UseMultipartDownload -DownloadFilesConcurrentlyDownloads all objects with the key prefix "data/" to a local folder using multipart download with concurrent file downloads.
Read-S3Object -BucketName amzn-s3-demo-bucket -Key large-file.zip -File local-large-file.zip -UseMultipartDownload -ConcurrentServiceRequest 20Downloads a single object using multipart download with 20 concurrent connections for maximum throughput on high-bandwidth networks.
Read-S3Object -BucketName amzn-s3-demo-bucket -KeyPrefix data/ -Folder C:\local-data -UseMultipartDownload -FailurePolicy ContinueOnFailureDownloads all objects with the key prefix "data/" to a local folder using multipart download, continuing past individual file failures instead of aborting.
AWS Tools for PowerShell: 2.x.y.z