AWS Developer Tools Blog

Introducing the S3 PowerShell Drive in AWS Tools for PowerShell

Explore and use Amazon Simple Storage Service (Amazon S3) like a file system with the new S3 PowerShell Drive. You can mount your S3 storage as a drive and navigate it with the same commands that are frequently used for local files: Set-Location, Get-ChildItem, Get-Content, Set-Content, and Remove-Item. Browse buckets and prefixes, read and write objects, and clean up data without needing to compose individual S3 cmdlet calls.

When to use S3 PowerShell Drive

The AWS Tools for PowerShell already provides cmdlets for S3: Get-S3Object, Read-S3Object, Write-S3Object, and dozens more. These cmdlets are well-suited to writing scripts or performing precise operations.

On the other hand, a lot of S3 work is ad-hoc rather than scripted. You may want to explore a bucket manually to understand its contents, check a specific log file, or remove a file that was accidentally uploaded. For that kind of work, S3 PowerShell Drive enables you to work in a simplified environment of folders and files.

The drive works as a PowerShell provider, which presents buckets as folders and objects as files. Core navigation and file commands that work on a local drive can then work on S3. The drive exists only inside your PowerShell session. It is not an OS-level mount and is not visible outside of PowerShell.

Get started

The S3 PowerShell Drive ships as part of the AWS.Tools.S3 module; there’s no separate package to install. If you already use the S3 cmdlets, update to version 5.0.288 or later to use the S3 PowerShell Drive. Install or update it using AWS.Tools.Installer:

Install-AWSToolsModule AWS.Tools.S3

Mount a drive with a profile and Region, then list your buckets:

Mount-S3PSDrive -Name S3 -ProfileName my-profile -Region us-east-1
Get-ChildItem S3:\

Note: The -Region here sets up the S3 client, but the drive isn’t limited to that Region.

Sample output:

   Type     LastModified              Size Name
   ----     ------------              ---- ----
   Bucket   2026-06-02 09:14:03            amzn-s3-demo-app-logs
   Bucket   2026-01-08 16:47:51            amzn-s3-demo-reports

The drive resolves credentials and Region the same way every other S3 cmdlet does. This means if you’ve already set session defaults with Set-AWSCredential and Set-DefaultAWSRegion, then -ProfileName and -Region don’t have to be explicitly passed when mounting. For more information on how to set up credentials, see Authenticating the AWS Tools for PowerShell.

Navigate S3 like a local drive

After mounting the S3 drive, set the current location to a bucket and a prefix, then list its contents. Tab completion works for buckets, prefixes, and objects, so you can build up a path without typing full names.

Set-Location S3:\amzn-s3-demo-reports\2026
Get-ChildItem

Sample output:

   Type     LastModified              Size Name
   ----     ------------              ---- ----
   Folder                                  q1
   Folder                                  q2
   Object   2026-03-31 18:02:11      48210 summary.txt

Get-ChildItem returns each item as a PowerShell object with Name, Type, Size, and LastModified properties. These listings can pipe directly into commands such as Where-Object and Sort-Object:

# List the 10 largest objects with the prefix "2026"
Get-ChildItem S3:\amzn-s3-demo-app-logs\2026 -Recurse |
    Where-Object Type -eq 'Object' |
    Sort-Object Size -Descending |
    Select-Object -First 10 Name, Size, LastModified

Listings stream as results arrive from S3 so even a prefix with a large number of objects begins returning results right away. You can interrupt a listing at any time using Ctrl+C.

Read and write objects like local files

S3 PowerShell Drive presents objects as files, so common file commands are translated to S3 operations: Get-Content downloads an object and Set-Content uploads one. Both commands support -Encoding for text, and Get-Content supports -Raw to return the whole object as a single string. Read and write objects:

# Read an object
Get-Content S3:\amzn-s3-demo-reports\2026\summary.txt -Raw
# Write an object
Set-Content S3:\amzn-s3-demo-reports\2026\notes.txt -Value 'Draft complete'

Note: Uploads can be cancelled at any time with Ctrl+C and do not leave a half-written object in place of the old one.

Copy data between your local disk and S3 by piping Get-Content and Set-Content:

# Upload a local file
Get-Content .\report.csv | Set-Content S3:\amzn-s3-demo-reports\data\report.csv
# Download it again
Get-Content S3:\amzn-s3-demo-reports\data\report.csv | Set-Content .\local-copy.csv

Delete objects and prefixes

Use Remove-Item to delete an object and -Recurse when deleting a prefix—the same convention as the built-in file system provider. There’s no confirmation prompt by default, but the -WhatIf and -Confirm parameters are supported.

To delete an object:

Remove-Item S3:\amzn-s3-demo-reports\2026\notes.txt

To preview a recursive delete before running it:

# Preview a recursive delete before running it
Remove-Item S3:\amzn-s3-demo-app-logs\2025 -Recurse -WhatIf

Access buckets across Regions from one drive

A single mounted drive can reach buckets across Regions. The first time you access a bucket, the provider determines its Region and routes calls to the correct endpoint. This removes the need for a separate drive per Region or any reconfiguration.

Mount-S3PSDrive -Name S3 -ProfileName my-profile -Region us-east-1
# This bucket is in ap-southeast-2 and commands work without extra configuration
Get-ChildItem S3:\amzn-s3-demo-sydney-bucket

Scope a drive to one bucket or prefix

Mount with -Root to confine a drive to a bucket, or a prefix within a bucket. This allows for a more focused view of a project’s data:

Mount-S3PSDrive -Name Reports -Root amzn-s3-demo-reports/2026
Get-ChildItem Reports:\        # Lists the contents of amzn-s3-demo-reports/2026/

Available on Windows, Linux, and macOS

S3 PowerShell Drive runs in both Windows PowerShell 5.1 and PowerShell 7+, so it’s available on Windows, Linux, and macOS.

One small difference across operating systems is that on Linux and macOS, ls, rm, and cat aliases do not work on the drive. These aliases stay bound to the native system tools rather than PowerShell cmdlets and won’t recognize an S3 path. The full cmdlet names, such as Get-ChildItem and Remove-Item, work the same everywhere.

When to use the S3 cmdlets

S3 PowerShell Drive does not cover every S3 operation. Bucket lifecycle and server-side copies stay with the dedicated cmdlets. Use New-S3Bucket and Remove-S3Bucket to manage buckets, and Copy-S3Object for S3-to-S3 copies. Unsupported operations, such as Rename-Item, return a “not supported” error.

Try it today

The S3 PowerShell Drive is available now in AWS.Tools.S3 version 5.0.288 and later.

For the full walkthrough, see the S3 PowerShell documentation in the AWS Tools for PowerShell User Guide. It covers additional topics such as storage classes, encoding options, and supported parameters for each command.

To report a bug or request a feature, open an issue in the aws-tools-for-powershell GitHub repository.

Andy Liao

Andy Liao

Andy is a software engineering intern on AWS Tools for PowerShell. He wants to improve developer tools and learn more about all things computer science.