Repository navigation
Description
This ticket system is to report bugs and feature requests. For support, visit the help page first.
Describe the bug
Attempts to authentication to AWS S3 Bucket using the "S3 (Credentials from AWS Command Line Interface)" profile do not consistently work. Most of the time, when using the profile to open a connection, the following error message appears:
Login failed (S3 (Credentials from AWS Command Line Interface)) The security token included in the request is invalid. Please contact your web hosting service provider for assistance.
I am following the instructions from this: https://docs.cyberduck.io/protocols/s3/#connecting-using-assumerole-from-aws-security-token-service-sts. I have bookmarks to S3 buckets stored in CyberDuck and when trying to open those bookmarks, the connection fails with the same error message.
This was working properly in an earlier version (9.0.x) but no longer works consistently.
To Reproduce
Steps to reproduce the behavior:
- Open Terminal, run
aws sso login --profile <profile_name> - In Terminal, run
aws sts get-caller-identity --profile <profile_name> - Open CyberDuck, click the Open Connection button.
- Select "S3 (Credentials from AWS Command Line Interface)" profile.
- Type
<profile_name>in the "Profile Name in ~/.aws/..." field, then click the Connect button - See error
Expected behavior
After clicking the "Connect" button, I should see the list of S3 buckets in the AWS Account.
It is possible to get the connection to work sometimes, by going through the following process.
- Close the error message window.
- Click the Open Connection button again.
- Click the "S3 (Credentials from AWS Command Line Interface)" option in the drop-down menu.
- Click the "S3 (Credentials from AWS Command Line Interface)" option again (to select it again, even though it was already selected)
- (the profile name should still be in the field, so there is no need to re-type it)
- Click the Connect button
- See the list of S3 buckets in the window!
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS (15.7.1)
- Version CyberDuck v9.3.0
Log Files
Here's the snippet from a failed authentication:
2025-11-25 15:56:18,417 [Thread-68] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request POST / HTTP/1.1
2025-11-25 15:56:18,417 [Thread-68] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
2025-11-25 15:56:18,475 [Thread-68] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive for 60000 MILLISECONDS
2025-11-25 15:56:18,475 [Thread-68] DEBUG com.amazonaws.retry.ClockSkewAdjuster - Reported server date (from 'Date' header): Tue, 25 Nov 2025 20:56:18 GMT
2025-11-25 15:56:18,480 [Thread-68] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 2][route: {s}->https://sts.amazonaws.com:443] can be kept alive for 60.0 seconds
2025-11-25 15:56:18,481 [Thread-68] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-2: set socket timeout to 0
2025-11-25 15:56:18,481 [Thread-68] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 2][route: {s}->https://sts.amazonaws.com:443][total available: 1; route allocated: 1 of 1; total allocated: 1 of 1]
2025-11-25 15:56:18,498 [Thread-68] DEBUG com.amazonaws.request - Received error response: com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: The security token included in the request is invalid. (Service: AWSSecurityTokenService; Status Code: 403; Error Code: InvalidClientTokenId; Request ID: 22e5b2ea-6ecd-4839-a71d-2c83e2e44122; Proxy: null)
2025-11-25 15:56:18,498 [Thread-68] DEBUG com.amazonaws.retry.ClockSkewAdjuster - Reported server date (from 'Date' header): Tue, 25 Nov 2025 20:56:18 GMT
2025-11-25 15:56:18,500 [Thread-68] WARN ch.cyberduck.core.sts.STSExceptionMappingService - Map failure com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: The security token included in the request is invalid. (Service: AWSSecurityTokenService; Status Code: 403; Error Code: InvalidClientTokenId; Request ID: 22e5b2ea-6ecd-4839-a71d-2c83e2e44122; Proxy: null)
2025-11-25 15:56:18,500 [Thread-68] DEBUG ch.cyberduck.core.KeychainLoginService - Login failed for Session{host=Host{protocol=Profile{parent=Profile{parent=s3, vendor=iterate GmbH, description=null, image=null}, vendor=s3-cli, description=S3 (Credentials from AWS Command Line Interface), image=null}, region='null', port=443, hostname='s3.amazonaws.com', credentials=Credentials{user='PROFILENAME', password='', tokens='TemporaryAccessTokens{accessKeyId='********', secretAccessKey='', sessionToken='', expiryInMilliseconds=-1}', oauth='OAuthTokens{accessToken='', refreshToken='', idToken='', expiryInMilliseconds=-1}', identity=null, properties={}}, uuid='10bd4d19-1234-abcd-1234-e346130f6b85', nickname='null', defaultpath='null', workdir=null, custom=null, labels=null}, state=open}
2025-11-25 15:56:18,503 [Thread-68] DEBUG ch.cyberduck.core.KeychainLoginService - Reset credentials for Host{protocol=Profile{parent=Profile{parent=s3, vendor=iterate GmbH, description=null, image=null}, vendor=s3-cli, description=S3 (Credentials from AWS Command Line Interface), image=null}, region='null', port=443, hostname='s3.amazonaws.com', credentials=Credentials{user='PROFILENAME', password='', tokens='TemporaryAccessTokens{accessKeyId='********', secretAccessKey='', sessionToken='', expiryInMilliseconds=-1}', oauth='OAuthTokens{accessToken='', refreshToken='', idToken='', expiryInMilliseconds=-1}', identity=null, properties={}}, uuid='10bd4d19-1234-abcd-1234-e346130f6b85', nickname='null', defaultpath='null', workdir=null, custom=null, labels=null}
Here's the snippet from a successful authentication:
2025-11-25 15:56:27,374 [Thread-81] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request POST / HTTP/1.1
2025-11-25 15:56:27,374 [Thread-81] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
2025-11-25 15:56:27,426 [Thread-81] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive for 60000 MILLISECONDS
2025-11-25 15:56:27,426 [Thread-81] DEBUG com.amazonaws.retry.ClockSkewAdjuster - Reported server date (from 'Date' header): Tue, 25 Nov 2025 20:56:27 GMT
2025-11-25 15:56:27,453 [Thread-81] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 4][route: {s}->https://sts.amazonaws.com:443] can be kept alive for 60.0 seconds
2025-11-25 15:56:27,453 [Thread-81] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-4: set socket timeout to 0
2025-11-25 15:56:27,453 [Thread-81] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 4][route: {s}->https://sts.amazonaws.com:443][total available: 1; route allocated: 1 of 1; total allocated: 1 of 1]
2025-11-25 15:56:27,453 [Thread-81] DEBUG com.amazonaws.request - Received successful response: 200, AWS Request ID: e468c914-46dc-4cd7-a76b-9ce7b152a8ba
2025-11-25 15:56:27,453 [Thread-81] DEBUG com.amazonaws.requestId - x-amzn-RequestId: e468c914-46dc-4cd7-a76b-9ce7b152a8ba
2025-11-25 15:56:27,453 [Thread-81] DEBUG ch.cyberduck.core.sts.STSAuthorizationService - Successfully verified credentials for {UserId: ABDCABCD12341234ABCD:USERNAME@domain.tld,Account: 123456781234,Arn: arn:aws:sts::123456781234:assumed-role/AWSReservedSSO_ROLENAME_randomstring/USERNAME@domain.tld}
Additional context
Add any other context about the problem here.
Activity
dkocher commentedon Dec 2, 2025
It looks like the S3 (Credentials from AWS Command Line Interface) profile installed is missing a recent configuration change 1 now required. Can you open Preferences → Profiles which should sync the latest version. You can verify on disk with
The output should match
ee93d6f70890eb8b1adfb4aa0d8a2177.Footnotes
https://github.com/iterate-ch/profiles/pull/160 ↩
cabutlermit commentedon Dec 2, 2025
That was it! the md5 of my file was different, so I checked and it still had
<false>in that line instead of true. When I updated the file per the PR you linked to, everything worked as expected.I was still using the file I had downloaded a while ago from the docs.cyberduck.io documentation page. I just used the link from the current version of that page and I see that it has been updated.
Thanks so much for your investigation into this! From my perspective, this issue can be closed.
Fix #17690. Validate tokens when using AWS CLI profile.
Merge pull request #17722 from iterate-ch/bugfix/GH-17690
dkocher commentedon Dec 5, 2025
This should be fixed with #17722. Please let me know if you can reproduce with the latest beta build 9.3.1.44132. See Preferences → Update to switch the update feed.
mashner-kobold commentedon Dec 9, 2025
I just upgraded to 9.3.1 after experiencing this issue and finding this ticket, but am still getting the same error in 9.3.1.Fixed with the .cyberduckprofile change noted below.
zlibto commentedon Dec 9, 2025
Hi, same as above. It seems that the access was fine when creating a bookmark with a profile name for the first time, but immediate fails again when using the bookmark for the second time.Nvm, manually editting the profile file in addition to upgrading to 9.3.1 seems to do the trick: #17690 (comment)nodakai commentedon Dec 10, 2025
Because of #17744 the only option was to manually edit
~/Library/Group\ Containers/G69SCX94XU.duck/Library/Application\ Support/duck/Profiles/S3\ \(Credentials\ from\ AWS\ Command\ Line\ Interface\).cyberduckprofileingyhere commentedon Dec 14, 2025
(I reached this page by clicking through the release notes.) Today, unable to connect to S3 with anything newer than 9.2.4. I can connect via the AWS CLI tools, but not with CyberDuck 9.3+. If this issue was meant to fix the problem detailed in the description, I don't think it worked, or possibly there is something else going on here.
dkocher commentedon Dec 15, 2025
Please comment in #17757.
ingyhere commentedon Dec 15, 2025
Thank you. As long as people know this was not fixed in the latest release. Clearly it is obfuscated in the GH issues list so not easily findable. Given the extent of the regression I would consider yanking or rolling back the latest 9.3.x versions.
jcitalan commentedon Feb 12, 2026
I can confirm this issue is still reproducible in 9.3.1 (44136), even when not using the "S3 (Credentials from AWS Command Line Interface)" profile.
In our case:
us-east-1s3.us-east-1.amazonaws.comaws s3 lsaws s3api get-bucket-locationCyberduck 9.3.1 consistently fails with:
Downgrading to 9.2.4 immediately resolves the issue with the exact same credentials and configuration.
We have reproduced this on multiple macOS machines.
This suggests the regression in 9.3.x may not be limited to the CLI profile but could affect S3 authentication/signing more broadly.
Leaving this here for visibility in case others encounter the same behavior.
dkocher commentedon Feb 12, 2026
In general you are not supposed to set a region specific endpoint when connecting to AWS. The endpoint will be derived depending on the bucket region.
jcitalan commentedon Feb 12, 2026
Thanks for the clarification.
The
s3.us-east-1.amazonaws.commention was actually suggested by ChatGPT while troubleshooting 😅 — but to clarify, my actual tests were done using the standard default endpoint:s3.amazonaws.comI did not manually force a region-specific endpoint in Cyberduck during normal testing.
The behavior is the same when using the default S3 connection configuration.
Also, as mentioned before, downgrading to 9.2.4 immediately resolves the issue with the exact same credentials and setup.
Just wanted to clarify that the region-specific endpoint was not part of the actual working/failing comparison.
dkocher commentedon Feb 12, 2026
It seems to me your comment is unrelated to this ticket. Can you open a discussion including the transcript.
jcitalan commentedon Feb 12, 2026
Thanks for the clarification.
You’re correct — my case may not be directly related to the CLI profile / STS issue described here.
I commented because the symptoms (InvalidClientTokenId errors in 9.3.x that disappear when downgrading to 9.2.4) appeared very similar, but since I am using standard Access Key authentication, it may indeed be a separate regression.
I’ll open a new issue and include the full transcript, version comparison, and configuration details to avoid mixing contexts.
Thanks for pointing that out.
jonnott commentedon Feb 19, 2026
Definitely still an issue in 9.3.1. I get the 'Try again..' dialog after every upload operation to an S3 bucket, then afterwards I can't do anything until I click 'Disconnect', which doesn't actually then disconnect, but seems to temporarily resolve the issue (i.e. I can then see the files that were just uploaded).