How to Access Amazon S3 with Temporary Credentials and MFA via AWS STS GetSessionToken in CS Browser
CS Browser
Free Windows client for Amazon S3 and Amazon S3 compatible storage services
 
Follow

Access Amazon S3 with AWS STS GetSessionToken

Use the Amazon S3 via GetSessionToken account type when your IAM user's access to Amazon S3 requires multi-factor authentication (MFA). For example, you can use it to browse a bucket whose policy requires MFA for listing and downloading files.

CS Browser calls GetSessionToken in AWS Security Token Service (AWS STS). AWS returns an access key ID, a secret access key, and a session token with a limited lifetime. These credentials carry the IAM user's permissions. When you authenticate with MFA, they also carry the MFA context required by the policy. To access Amazon S3 with the permissions of an IAM role, use AssumeRole.

CS Browser keeps these temporary credentials in memory and requests a new set as needed when they are about to expire. If you configured an MFA device, it prompts for a current code each time it requests credentials.

Before you start

Add a source account to CS Browser using the IAM user's long-term AWS access keys. The user needs the permissions for the Amazon S3 operations you plan to perform. AWS requires no separate sts:GetSessionToken permission to obtain the session.

If your policy requires MFA, have the IAM user's MFA device ready and find its serial number or ARN in the user's security credentials. AWS recommends using IAM user credentials for this operation. See Permissions for GetSessionToken.

Add a GetSessionToken account

  1. In CS Browser, choose Accounts, Add new account or press Ctrl+Alt+N.

    Accounts menu with Add new account highlighted

    The Add New Account dialog opens:

    Add New Account dialog with the GetSessionToken account type and an IAM user source account
  2. Display name - Enter a name to identify the account in the Accounts menu.

  3. Account type - Select Amazon S3 via GetSessionToken.

  4. Source account - Select the CS Browser account that holds the IAM user's long-term AWS access keys.

  5. Use secure transfer (SSL/TLS) - Keep this enabled to encrypt connections to Amazon S3.

    If MFA is required, enter its device ID under advanced settings.

  6. Click Add new account, then select the new account from the Accounts menu.

    Accounts menu with the saved GetSessionToken account highlighted

Advanced Account Settings

Use these settings to configure MFA and the session duration, control how CS Browser connects, and choose what it loads when you select the account.

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

The Advanced Account Settings dialog opens:

GetSessionToken tab with MFA Serial and Session duration in seconds

MFA Serial - Enter the ARN of the IAM user's virtual MFA device or the serial number of their hardware MFA device. Leave it blank when the session does not require MFA. When you configure a device, CS Browser prompts for its current six-digit code.

Session duration in seconds - Enter a value from 900 (15 minutes) to 129,600 (36 hours) for an IAM user. CS Browser starts with 3600 seconds (1 hour). AWS uses a 12-hour default for IAM user requests that omit the duration and limits root-user sessions to one hour. See GetSessionToken request parameters.

Connection

Select the Connection tab to change 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 - Choose whether CS Browser follows the global setting, validates certificates for this account, or bypasses validation. See account connection settings for details.

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

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

Use Amazon S3 Transfer Acceleration - Use a Transfer Acceleration endpoint for file transfers. Enable this option for buckets where Transfer Acceleration is configured.

Miscellaneous

Select the Miscellaneous tab to choose what CS Browser loads when you select this account.

Miscellaneous tab with bucket listing, CloudFront distribution checks, and External Buckets

List all my buckets when account assigned - When enabled, CS Browser calls Amazon S3 ListBuckets when you select this account. If the operation returns AccessDenied, check the IAM user's s3:ListAllMyBuckets permission. If the user has access to specific buckets only, turn off this option and enter those buckets under External Buckets.

Check CloudFront distributions when account assigned - Enables a CloudFront ListDistributions check after bucket listing so CS Browser can mark buckets used as origins. The user needs the cloudfront:ListDistributions permission for this check. Turn off this option if the user has no CloudFront access.

External Buckets - Enter one bucket per line. You can include an optional prefix, such as example-bucket/reports/2026. The IAM user needs access to each bucket or prefix you enter.

To apply the advanced settings, 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.