mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05:00
Merge pull request #982 from harshavardhana/aws-sdk-go
doc: Cleanup aws-sdk-go.md
This commit is contained in:
commit
b429bd7ceb
@ -19,18 +19,21 @@ import (
|
|||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/s3"
|
"github.com/aws/aws-sdk-go/service/s3"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Create an S3 service object in the default region.
|
newSession := session.New()
|
||||||
s3Client := s3.New(&aws.Config{
|
s3Config := &aws.Config{
|
||||||
Credentials: credentials.NewStaticCredentials("<YOUR-ACCESS-ID>", "<YOUR-SECRET-ID>", ""),
|
Credentials: credentials.NewStaticCredentials("<YOUR-ACCESS-KEY-ID>", "<YOUR-SECRET-ACCESS-KEY", ""),
|
||||||
Endpoint: aws.String("http://localhost:9000"),
|
Endpoint: aws.String("http://localhost:9000"),
|
||||||
Region: aws.String("us-east-1"),
|
Region: aws.String("us-east-1"),
|
||||||
DisableSSL: aws.Bool(true),
|
DisableSSL: aws.Bool(true),
|
||||||
S3ForcePathStyle: aws.Bool(true),
|
S3ForcePathStyle: aws.Bool(true),
|
||||||
})
|
}
|
||||||
|
// Create an S3 service object in the default region.
|
||||||
|
s3Client := s3.New(newSession, s3Config)
|
||||||
|
|
||||||
cparams := &s3.CreateBucketInput{
|
cparams := &s3.CreateBucketInput{
|
||||||
Bucket: aws.String("newbucket"), // Required
|
Bucket: aws.String("newbucket"), // Required
|
||||||
|
Loading…
Reference in New Issue
Block a user