awssession

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: MIT Imports: 6 Imported by: 0

README

aws-session

This is a very small 'package' to help me remember how to establish a Session objectin the AWS SDK.

Documentation

Overview

Package aws_session provides a few small functions for creating an AWS SDK Session object. I find these hard to remember if it's been a while, so I created this small package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() (*session.Session, error)

Create makes an attempt to use the profile and/or the environment variables. If AWS_SDK_LOAD_CONFIG it will use the profile. If all of AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION then these will be used. If neither of those conditions is met, then AWS_SDK_LOAD_CONFIG will be set to true and the profile will be attempted.

func CreateUsingEnvironment

func CreateUsingEnvironment(region string) (*session.Session, error)

CreateUsingEvironment uses the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY to create the Session.

func CreateUsingProfile

func CreateUsingProfile() (*session.Session, error)

CreateUsingProfile sets AWS_SDK_LOAD_CONFIG to true and tries to use the profile.

func CreateUsingStrings

func CreateUsingStrings(awsAccessKey, awsSecretKey, awsRegion string) (*session.Session, error)

CreateUsingStrings creates a Session with the strings passed in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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