I'm using some aws-sdk-go functionalities in my app, and it creates DNS style hosts to request, like somebucket.mys3.com
. But I have some DNS issues and want to receive the requests in path-style, like mys3.com/somebucket
. How can I config the SDK to generates it requests in path-style mode?
Use path-style amazon aws sdk go
Asked Answered
In the aws.Config
set the S3ForcePathStyle
to true
, ie
ses, err := session.NewSession(
&aws.Config{
S3ForcePathStyle: aws.Bool(true),
...
}
)
© 2022 - 2024 — McMap. All rights reserved.