WinSCP and S3 buckets

Advertisement

FingerlessGloves
Joined:
Posts:
1
Location:
The Internet

WinSCP and S3 buckets

I've recently been using WinSCP in script mode to download some files from an S3 bucket. I've noticed the original request gets redirected by AWS to the new virtualhost naming scheme and then carrys on and downloads the files. To save the redirection I tried specifying the virtualhost name as it says in the logs but then I get a failed certificte check against
*.s3.amazonaws.com
The open command, that's working with the redirect
open s3://ID:KEY@s3.amazonaws.com/bucket.domain.com-relay/ -rawsettings S3DefaultRegion="eu-west-2" S3UrlStyle=1
If I then change it to use the virtualhost, it doesn't work and complains about the certificate
open s3://ID:KEY@bucket.domain.com-relay.s3.amazonaws.com/
The bucketname isn't techically DNS compliant for the certificate validation of the wildcard, but I don't understand how it's valid when it's redirected to bucket.domain.com-relay.s3.amazonaws.com I assume there's some logic in WinSCP to change the behaviour but it's only doing it when it's redirected.

I would change the name of the bucket to not include ., but that bucket isn't in my control, I only download and delete files from it.

Is anyone able to help, for now I can just leave it with the working redirect but would be nice to save a redirect.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum