Skip to content

Helper package to easily access some aws-sdk-go's methods (SNS, SQS, DynamoDB, Rekognition, S3)

License

Notifications You must be signed in to change notification settings

EasyNetwork/aws-sdk-go-bindings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Apache V2 License BCH compliance

aws-sdk-go-bindings

Helper to easily access some aws-sdk-go's methods. It also contains multiple methods to cover tricky problems like preparing an sns default message and unmarshal an image coming out from a stream like:

// UnmarshalStreamImage unmarshals a dynamo stream image in a pointer to an interface
func UnmarshalStreamImage(in map[string]events.DynamoDBAttributeValue, out interface{}) error {

	dbAttrMap := make(map[string]*dynamodb.AttributeValue)

	for k, v := range in {

		bytes, err := v.MarshalJSON()
		if err != nil {
			return err
		}

		var dbAttr dynamodb.AttributeValue

		json.Unmarshal(bytes, &dbAttr)
		dbAttrMap[k] = &dbAttr

	}

	return dynamodbattribute.UnmarshalMap(dbAttrMap, out)

}

At the moment it covers SNS, SQS, DynamoDB, Rekognition and S3.

Utilization

You can simply import code from pkg package. Almost all the methods are exported so you can access them easily.

Development

Install dep and run dep ensure inside the project's folder to get project's vendors. If you want to fork it or just use it in local, edit internal/configuration/configuration.json as you wish. The default configuration contains endpoints to run the tests on localstack. To run Rekognition tests you need to have an AWS account and use a region where the latter is available.

About

Helper package to easily access some aws-sdk-go's methods (SNS, SQS, DynamoDB, Rekognition, S3)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%