awscommons

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package awscommons contains routines for interacting with AWS. Meant to provide high level interfaces used throughout various Gruntwork CLIs. NOTE: The routines in this package are adapted for aws-sdk-go-v2, not V1.

Index

Constants

View Source
const (
	DefaultRegion = "us-east-1"
)

Variables

This section is empty.

Functions

func GetSecretsManagerMetadata

func GetSecretsManagerMetadata(opts *Options, secretID string) (*secretsmanager.DescribeSecretOutput, error)

GetSecretsManagerMetadata returns the metadata of the Secrets Manager entry with the given ID.

func GetSecretsManagerSecretString

func GetSecretsManagerSecretString(opts *Options, arn string) (string, error)

GetSecretsManagerSecretString will return the secret value stored at the given Secrets Manager ARN.

func NewDefaultConfig

func NewDefaultConfig(opts *Options) (aws.Config, error)

NewDefaultConfig will retrieve a new authenticated AWS config using SDK default credentials. This config can be used to setup new AWS service clients.

func NewSecretsManagerClient

func NewSecretsManagerClient(opts *Options) (*secretsmanager.Client, error)

NewSecretsManagerClient will return a new AWS SDK client for interacting with AWS Secrets Manager.

func SecretsManagerEntryExists

func SecretsManagerEntryExists(opts *Options, arn string) (bool, error)

SecretsManagerEntryExists returns whether or not the SecretsManager Entry with the given ARN exists. This will return an error if it exists, but is not accessible due to permission issues, or if there is an authentication issue.

Types

type Options

type Options struct {
	Region string

	Context context.Context
}

Options represents all the parameters necessary for setting up authentication credentials with AWS.

func NewOptions

func NewOptions(region string) *Options

NewOptions will create a new aws.Options struct that provides reasonable defaults for unspecified values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL