A PowerShell Provider for Amazon S3 with C# source code
S3Nas for PowerShell is a partially functional PowerShell Provider for the Amazon Simple Storage Service (S3).
Things that work:
-
Creating a connection to the Amazon S3 service and displaying it as a drive, i.e. S3Nas:\
-
Listing the buckets for an account and listing the contents of a bucket with wildcard support. i.e. ls s*
-
Tab completion of bucket names and key names
-
Get-Item and Set-Item as a String or Byte[]
-
Get-Acl on a bucket or key
-
Rename-Item (currently requires downloading the object and uploading it with a different name - there is an example of doing this via script in the project) This is actually a limitation of the Amazon S3 service at the moment as key names are immutable.
Things that don't work:
-
Set-Acl (have not figured out ObjectSecurity yet)
-
Copy-Item (it appears you can only use this within a namespace so perhaps it is not possible to do the following: copy-item -path S3Nas:\bucket\key -destination C:\filename
To get it working, you will need to fill in your Access and Secret Access keys in the S3NasAuthentication.cs file and compile it. Then modify the paths in the registration script and execute it.
Unfortunately, the documentation on building PowerShell providers is still a bit sparse at this point. Suggestions from enlightened individuals are welcome.
Download the source
Last updated:
- 08/17/07, Fixed a delimiter problem for Get-Item on keys created using other programs that access S3 in hierarchy mode, such as S3Fox
- 08/15/07, Initial release