/go-codebuild-aws-sdk

GO codebuild aws sdk sample step to use

Primary LanguageGo

go-codebuild-aws-sdk

In this example project I am using codebuild aws sdk API where the goal is to get builds and their detailed deployment

The aws sdk version used in this example is old, there is a new version to use but it does not have the *iface interface and this lacks difficulty in unit testing implementations.

See more at:

How to run

You need to have an aws webservice account and create a project on code build (see: https://aws.amazon.com/pt/codebuild/). To test you can create a plan without artifact.

After that, take your credential and enter this snippet code:

sess, _ := session.NewSession(&aws.Config{
		Region:      aws.String("us-east-1"),
		Credentials: credentials.NewStaticCredentials("YOUR_ID", "YOUR_SECRET", "YOUR_TOKEN_OPTIONAL")},
	)

Done! run the command inside de path go run main.go and see your result. To run the tests : go test