Skip to content

Settings component for generating AWS sessions and clients.

License

Notifications You must be signed in to change notification settings

asecurityteam/component-aws

Repository files navigation

component-aws - Settings component for AWS clients

GoDoc

Overview

This is a settings component that enables constructing AWS credentials/sessions and some of the clients we regularly use when building services.

Quick Start

package main

import (
    "context"
    "net/http"

    aws "github.com/asecurityteam/component-aws"
    "github.com/aws/aws-sdk-go/service/dynamodb"
    "github.com/asecurityteam/settings"
)

func main() {
    ctx := context.Background()
    envSource := settings.NewEnvSource(os.Environ())

    sess, _ := aws.NewSession(ctx, envSource)
    d := dynamodb.New(sess)
    // or
    db, _ := aws.NewDynamoDB(ctx, envSource)
    // or
    s3 := aws.NewS3(ctx, envSource)
}

Status

This project is in incubation which means we are not yet operating this tool in production and the interfaces are subject to change.

Contributing

Building And Testing

We publish a docker image called SDCLI that bundles all of our build dependencies. It is used by the included Makefile to help make building and testing a bit easier. The following actions are available through the Makefile:

  • make dep

    Install the project dependencies into a vendor directory

  • make lint

    Run our static analysis suite

  • make test

    Run unit tests and generate a coverage artifact

  • make integration

    Run integration tests and generate a coverage artifact

  • make coverage

    Report the combined coverage for unit and integration tests

License

This project is licensed under Apache 2.0. See LICENSE.txt for details.

Contributing Agreement

Atlassian requires signing a contributor's agreement before we can accept a patch. If you are an individual you can fill out the individual CLA. If you are contributing on behalf of your company then please fill out the corporate CLA.