Instance Metadata Profile not using Default Hostname property

53 views
Skip to first unread message

Alex Kline

unread,
Jun 18, 2021, 6:34:44 PM6/18/21
to Cyberduck
Hello Cyberduck Community,

Wanted to check here first before submitting a ticket.  Has anyone run into issues adding a "Default Hostname" property to the S3 (Credentials from Instance Metadata) profile?

For some reason, when I specify a default hostname property in the profile and create a bookmark from it,  I can't connect to the s3 server/hostname specified.  In the Cyberduck logs, I can see Cyberduck is trying to connect to the s3.amazon.com address NOT the one specified in the profile and bookmark.

I've verified the policy attached to the ec2 role works by running some aws cli commands against it.

Here's where I believe it's a Cyberduck issue, if I don't add the Default Hostname property in the ec2 metadata profile and create a bookmark using it.  The server defaults to s3.amazon.com, which doesn't work obviously.  If I change the bookmark's server to the desired s3 hostname I want, it connects successfully.  This seems to be the work-around, but not what I'm after.

I would greatly appreciate any thoughts or insight into adding a Default Hostname in the ec2 metadata profile.  Please let me know if there is any further information I can provide!

Cyberduck Version 7.9.1 (34974)
Windows Server 2019 Datacenter 10.0.17763 Build 17763


Thank you in advance,
-Alex

David Kocher

unread,
Jun 20, 2021, 7:20:14 AM6/20/21
to Cyberduck
What does your command prompt invocation look like? The default hostname should be used if you omit it in the URL for the parameter such as duck --list s3:/<bucketname>/ documented in https://trac.cyberduck.io/wiki/help/en/howto/s3#CyberduckCLI 

Alex Kline

unread,
Jun 21, 2021, 11:43:04 AM6/21/21
to Cyberduck
Hey David,

When I use `duck --list s3://(my-bucket-name)/` it comes back with... `Login s3.amazonaws.com. Login s3.amazonaws.com ? S3 with username and password. No login credentials could be found in the Keychain.` then it asked for an access key.

I tried creating a user profile by copying the ec2 metadata script to %appdata%/Cyberduck/profiles.  But got the same message as above.  I hope I understood what you've asked for.  Any additional thoughts would be greatly appreciated.


Best,
-Alex

David Kocher

unread,
Jun 21, 2021, 11:45:38 AM6/21/21
to Cyberduck
Please try to use duck —list s3:/mybucket-name/

— David
> --
> --
> You received this message because you are subscribed to the Google Groups "Cyberduck" group. To post to this group, send email to cybe...@googlegroups.com
> To unsubscribe from this group, send email to cyberduck+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/cyberduck
> --
> Post bug reports and feature requests
> http://trac.cyberduck.ch/newticket
> --
> Support development
> http://cyberduck.ch/donate/
>
> ---
> You received this message because you are subscribed to the Google Groups "Cyberduck" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cyberduck+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cyberduck/21d7a17d-55dc-42a6-9360-69e27cedcc4an%40googlegroups.com.

Alex Kline

unread,
Jun 21, 2021, 11:51:58 AM6/21/21
to Cyberduck
Unfortunately, I get the same output as before, asking for access key.

```
Login s3.amazonaws.com. Login s3.amazonaws.com ? S3 with username and password. No login credentials could be found in the Keychain.
Access Key ID:
```

Alex Kline

unread,
Jun 21, 2021, 5:21:41 PM6/21/21
to Cyberduck
After playing around with the bookmark saving functionality, I figured out what I was doing wrong.  I didn't fully understand the difference between Hostname and Path parameters.

Using the s3 metadata profile template from the docs, I added the following parameters Default Hostname and Default Path.  My profile looks something like this now:

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Protocol</key>
        <string>s3</string>
        <key>Vendor</key>
        <string>s3-role</string>
        <key>Description</key>
        <string>S3 (Credentials from EC2 Instance Metadata)</string>
        <key>Context</key>
        <key>Username Configurable</key>
        <false/>
        <key>Default Nickname</key>
        <string> S3 (Credentials from EC2 Instance Metadata)</string>
        <key>Password Configurable</key>
        <false/>
        <key>Token Configurable</key>
        <false/>
        <key>Anonymous Configurable</key>
        <false/>
        <key>Default Hostname</key>
        <string>s3.amazonaws.com</string>
<key>Default Path</key>
<string>/bucket-name</string>
    </dict>
</plist>

``` 

After adding the additional parameters (italicized) and replacing the appropriate values (bolded), it works as expected creating connections and bookmarks from the profile using the ec2 metadata role.

I really appreciate your time David helping me to troubleshoot, thank you!


Hope this helpful to anyone else!

-Alex

David Kocher

unread,
Jun 22, 2021, 1:48:58 AM6/22/21
to Cyberduck
Thanks for sharing the solution.

— David
> To view this discussion on the web visit https://groups.google.com/d/msgid/cyberduck/35702d9f-5f68-4ccb-98f4-a96e3a715335n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages