Get-S3 Cmdlet

Parameters   Output Objects   Configuration Settings  

The Get-S3 component provides an easy interface to Amazon's Simple Storage Service (S3).

Syntax

Get-S3 [parameters]

Remarks

The Get-S3 cmdlet allows you to access Amazon's Simple Storage Service (S3) in a secure manner using SSL. Get-S3 allows you to list objects and buckets, and download objects, all within powershell. A brief synopsis follows but please refer to Amazon S3 documentation for details.

You will first need to sign up for the S3 service and obtain an AccessKey and SecretKey from Amazon. Then you can start creating buckets in your account using Send-S3. The buckets are place holders for your objects allowing you to access them through http urls. You can then add objects to any of your buckets using Send-S3.

Get-S3 will allow you to retrieve information from your S3 account. For more information on how to upload and delete objects, or create and delete buckets please take a look at the Send-S3 cmdlet.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.


#get bucket list
get-s3 -AccessKey $S3AccessKey -SecretKey $S3SecretKey

#get object list in bucket
get-s3 -AccessKey $S3AccessKey -SecretKey $S3SecretKey -bucket $bucket

#retrieve object
get-s3 -AccessKey $S3AccessKey -SecretKey $S3SecretKey -bucket $bucket -RemoteObject $object

#retrieve object and write to file
get-s3 -AccessKey $S3AccessKey -SecretKey $S3SecretKey -bucket $bucket -RemoteObject $object -LocalFile tempobject.dat

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

LogFileThe location of a file to which debug information is written.
AccessKeyThe Access Key Id for the Amazon Web Services account.
BucketThe name of the current bucket.
CertPasswordThe password to the certificate store.
CertStoreThe name of the certificate store for the client certificate.
CertStoreTypeThe type of certificate store for the client certificate.
CertSubjectThe subject of the certificate used for client authentication.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for authentication.
FirewallHostName or IP address of firewall.
FirewallPasswordA password if authentication is to be used when connecting through the firewall.
FirewallPortThe port of the firewall to which to connect.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
ForceForces the component to accept the default behavior instead of querying the user.
LocalFileThe local file to save the object data to.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
MaxObjectsThe maximum number of objects to be returned.
MetaOnlySpecifies whether only the headers should be returned from the server.
ObjectPrefixA prefix filter for listing objects.
OverwriteSpecified whether the LocalFile should be overwritten.
ProxyAutoDetectSpecifies if proxy information is automatically detected.
ProxyPasswordThe password to authenticate with.
ProxyPortThe TCP port of the Proxy .
ProxyServerName or IP address of a proxy server (optional).
ProxyUserThe User value to authenticate with.
RegionThe region the component will make requests against.
RemoteObjectThe name of the remote object to retrieve.
SecretKeyThe Secret Access Key for the Amazon Web Services account.
SSLUse SSL to access Amazon S3.
SSLAcceptThe encoded public key of the certificate which is to be trusted explicitly.
TimeoutThe maximum time allowed for the operation.
UseVirtualHostingDetermines which style request to use.

Output Objects


The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.

BucketReturned for each bucket during a list bucket operation.
S3DownloadReturned when an object is retrieved from the S3 server.
S3ListFired for every object during a list object operation.
S3MetaDataThe headers returned from an S3 object when only the metadata is downloaded.

Configuration Settings


The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.

BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
NetCmdlets 2020 - Version 20.0 [Build 8319]