Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
/ go-cloud-s3blob Public archive

A thin wrapper around the default go-cloud S3 blob opener to check for a credentials parameter and use it to assign AWS S3 session credentials.

License

Notifications You must be signed in to change notification settings

aaronland/go-cloud-s3blob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cloud-s3blob

This is thing wrapper around the default go-cloud S3 blob opener to check for a credentials parameter (in blob URIs) and use it to assign AWS S3 session credentials.

Important

This package has been superseded by aaronland/gocloud-blob-s3 and is no longer maintained.

Example

import (
	"context"
	"gocloud.dev/blob"
	_ "github.com/aaronland/go-cloud-s3blob"
)

func main() {

	ctx := context.Background()	
	bucket, _ := blob.OpenBucket(ctx, "s3blob://BUCKET?region=REGION&credentials=CREDENTIALS")

	// do stuff with bucket here
}

Note the use of the s3blob:// scheme which is different than the default s3:// scheme.

Credentials

Credentials for AWS sessions are defined as string labels. They are:

Label Description
env: Read credentials from AWS defined environment variables.
iam: Assume AWS IAM credentials are in effect.
{AWS_PROFILE_NAME} This this profile from the default AWS credentials location.
{AWS_CREDENTIALS_PATH}:{AWS_PROFILE_NAME} This this profile from a user-defined AWS credentials location.

See also

About

A thin wrapper around the default go-cloud S3 blob opener to check for a credentials parameter and use it to assign AWS S3 session credentials.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages