Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New establishes a Session to interact with AWS.
Credit to https://github.com/cyberark/summon-aws-secrets/blob/master/main.go for initial implementation.
All clients require a Session. The Session provides the client with shared configuration such as region, endpoint, and credentials. A Session should be shared where possible to take advantage of configuration and credential caching. See the session package for more information.
AWS Go SDK does not currently support automatic fetching of region from ec2metadata. If the region could not be found in an environment variable or a shared config file, create metaSession to fetch the ec2 instance region and pass to the regular Session.
If running on an EC2 instance, the metaClient will be available and we can set the region to match the instance If not on an EC2 instance, the region will remain blank and AWS returns a "MissingRegion: ..." error
Types ¶
This section is empty.