AWS SDK for the Go programming language.
Clone or download
Permalink
Failed to load latest commit information.
.github initial merge from v1 sdk Oct 10, 2017
aws fixing numbers to no longer return an error if too large (#236) Nov 5, 2018
example aws: rename CanceledErrorCode to ErrCodeRequestCanceled (#131) Feb 22, 2018
internal allowing LHS of equal expr to contain spaces (#237) Nov 10, 2018
models Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018
private Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018
service Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018
.gitignore Refactor SDK to use only request method (#33) Nov 13, 2017
.travis.yml initial merge from v1 sdk Oct 10, 2017
CHANGELOG.md Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018
CHANGELOG_PENDING.md initial merge from v1 sdk Oct 10, 2017
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#138) Mar 5, 2018
CONTRIBUTING.md initial merge from v1 sdk Oct 10, 2017
Gopkg.lock initial merge from v1 sdk Oct 10, 2017
Gopkg.toml removing dependency of ini parse (#209) Aug 16, 2018
LICENSE.txt initial merge from v1 sdk Oct 10, 2017
Makefile changes to allow for go1.11 to work (#207) Aug 12, 2018
NOTICE.txt initial merge from v1 sdk Oct 10, 2017
README.md Fix missing import in README.md example (#222) Oct 24, 2018
buildspec.yml updated buildspec for vendored content Oct 11, 2017
cleanup_models.sh Fix hashbang typo in cleanup_models.sh (#211) Sep 4, 2018
doc.go Update v2 SDKs example and documentation (#86) Jan 9, 2018
go.mod Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018
go.sum Release v2.0.0-preview.5 (2018-09-27) (#219) Sep 27, 2018

README.md

Build Status Documentation

AWS SDK for Go v2

aws-sdk-go-v2 is the Developer Preview for the v2 of the AWS SDK for the Go programming language.

Check out the Issues and Projects for design and updates being made to the SDK. The v2 SDK requires a minimum version of Go 1.9.

We'll be expanding out the Issues and Projects sections with additional changes to the SDK based on your feedback, and SDK's core's improvements. Check the the SDK's CHANGE_LOG for information about the latest updates to the SDK.

Getting started

The best way to get started working with the SDK is to use go get to add the SDK to your Go Workspace manually.

go get -u github.com/aws/aws-sdk-go-v2

You could also use Dep to add the SDK to your application's dependencies. Using Dep will simplify your update story and help your application keep pinned to specific version of the SDK

dep ensure -add github.com/aws/aws-sdk-go-v2

Hello AWS

This example shows how you can use the v2 SDK to make an API request using the SDK's Amazon DynamoDB client.

package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/endpoints"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/dynamodb"
)

func main() {
	// Using the SDK's default configuration, loading additional config
	// and credentials values from the environment variables, shared
	// credentials, and shared configuration files
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("unable to load SDK config, " + err.Error())
	}

	// Set the AWS Region that the service clients should use
	cfg.Region = endpoints.UsWest2RegionID

	// Using the Config value, create the DynamoDB client
	svc := dynamodb.New(cfg)

	// Build the request with its input parameters
	req := svc.DescribeTableRequest(&dynamodb.DescribeTableInput{
		TableName: aws.String("myTable"),
	})

	// Send the request, and get the response or error back
	resp, err := req.Send()
	if err != nil {
		panic("failed to describe table, "+err.Error())
	}

	fmt.Println("Response", resp)
}

Feedback and contributing

The v2 SDK will use GitHub Issues to track feature requests and issues with the SDK. In addition, we'll use GitHub Projects to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.

GitHub issues. To provide feedback or report bugs, file GitHub Issues on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.

Gitter channel. For more informal discussions or general feedback, check out our Gitter channel for the SDK. The Gitter channel is also a great place to ask general questions, and find help to get started with the 2.0 SDK Developer Preview.

Contributing. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0 Developer Preview release. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.