How to Load Amazon S3 Credentials and Session Tokens from Environment Variables in CS Browser
CS Browser
Free Windows client for Amazon S3 and Amazon S3 compatible storage services
 
Follow

Amazon S3 Credentials from Environment Variables

CS Browser can load Amazon S3 access keys and session tokens from its process environment on Windows. Use this account type when a script or credential tool supplies AWS credentials before starting CS Browser.

CS Browser reads the same three standard credential variable names used by the AWS CLI:

  • AWS_ACCESS_KEY_ID - The AWS access key ID. Required.
  • AWS_SECRET_ACCESS_KEY - The AWS secret access key. Required.
  • AWS_SESSION_TOKEN - Required when using temporary AWS credentials.

Use all three values from the same session when setting temporary credentials. To select a named AWS profile, use the AWS Config or credentials file account type.

Set AWS Credentials in PowerShell

Set the variables in PowerShell and launch CS Browser from the same window so it inherits those values. If CS Browser is running, first choose Accounts, Exit. Starting it again while it is open brings the existing instance to the foreground.

Replace the example values with your temporary credentials and adjust the executable path if needed:

$env:AWS_ACCESS_KEY_ID = 'EXAMPLE_ACCESS_KEY_ID'
$env:AWS_SECRET_ACCESS_KEY = 'EXAMPLE_SECRET_ACCESS_KEY'
$env:AWS_SESSION_TOKEN = 'EXAMPLE_SESSION_TOKEN'
Start-Process "$env:ProgramFiles\CS Browser\s3browser-ui.exe"

For long-term access keys, clear any existing AWS_SESSION_TOKEN in the PowerShell session with Remove-Item Env:AWS_SESSION_TOKEN before starting CS Browser. See the AWS access key documentation for the token requirements.

When temporary credentials expire, exit CS Browser, set the new access key ID, secret access key, and session token together, and start it again from the updated environment. Changes made in Windows settings or another shell do not update the environment of a running CS Browser instance.

Use PowerShell's $env: syntax for the session token. Windows setx truncates values longer than 1,024 characters.

Add an Account in CS Browser

Add an account to use the AWS credentials that CS Browser inherited at startup.

  1. Choose Accounts, Add new account.

    Accounts menu with Add new account highlighted

    The Add New Account dialog opens:

    Add New Account dialog with Amazon S3 Credentials from Environment Variables selected

    Display name - Enter the name you want to see in the Accounts menu.

    Account type - Select Amazon S3 (Credentials from Environment Variables).

    Use secure transfer (SSL/TLS) - Keep this enabled to encrypt the connection.

  2. Click Add new account.

  3. Select the saved account in the Accounts menu.

    Accounts menu with the saved AWS Environment Variables account highlighted

If CS Browser reports missing access keys, check that the variables were set in the PowerShell window used to start CS Browser.

Advanced Account Settings

Use these settings to control which buckets CS Browser loads and how the account connects to Amazon S3.

Click advanced settings at the bottom left of the account dialog.

The Advanced Account Settings dialog opens:

General tab with bucket listing, CloudFront checks, and External Buckets

List all my buckets when account assigned - Calls ListBuckets when you select the account. If the call returns AccessDenied, check the s3:ListAllMyBuckets permission. If your credentials give access only to specific buckets, clear this checkbox and enter them under External Buckets.

Check CloudFront distributions when account assigned - Calls ListDistributions so CS Browser can mark buckets that are CloudFront origins. If the call returns AccessDenied, check cloudfront:ListDistributions or clear the checkbox if you do not need this check.

External Buckets - Enter one bucket per line. You can include a prefix, such as example-bucket/reports/2026.

Connection

Select the Connection tab to configure how this account connects to Amazon S3.

Connection tab with SSL/TLS certificate validation, proxy, dual-stack endpoints, and Transfer Acceleration

SSL/TLS certificate validation - Use the global setting or override it for this account. See account connection settings for the available choices.

Proxy - Shows the current proxy mode. Click the summary or the pencil button to open Proxy Settings.

Use dual-stack endpoints (IPv4/IPv6) - Select endpoints that support both IPv4 and IPv6.

Use Amazon S3 Transfer Acceleration - Use an acceleration endpoint for transfers to and from buckets where Transfer Acceleration is enabled.

Click Close, then click Add new account or Save changes in the account dialog.

See Also

CS Browser 13.6.9 Freeware
Powered by Amazon Web Services and Rated by CNET Editors!
Our customers say

"CS Browser is an invaluable tool to me as a web developer to easily manage my automated site backups" -Bob Kraft, Web Developer

"Just want to show my appreciation for a wonderful product. I use CS Browser a lot, it is a great tool." -Gideon Kuijten, Pro User

"Thank You Thank You Thank You for this tool. A must have for anyone using Amazon S3!" -Brian Cummiskey, USA

Related Products
RdpGuard
protects your Windows Server from RDP Brute-force Attacks.
CS Browser is developed by Netsdk Software FZE and is not affiliated with, endorsed by, or sponsored by Amazon or AWS. Amazon S3 and Amazon S3 Glacier are trademarks of Amazon.com, Inc. or its affiliates.
Copyright © 2008-2026 Netsdk Software FZE. All rights reserved.  Terms of Use.  Privacy Policy.  Refund Policy.  Mount Amazon S3 Bucket.  RDP brute-force protection.