Skip to content

Example of using the Golang aws-sdk STS AssumeRole capability.

License

Notifications You must be signed in to change notification settings

adamcrosby/sts-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

STS Example

This go code shows how to take an optional ARN and ExternalID contraint and assume a role via STS.

creds = stscreds.NewCredentials(sess, arn, func(p *stscreds.AssumeRoleProvider) {
  p.ExternalID = &externalID
})

The key here is to use the stscreds provider for aws.Config, rather than work with the sts package and service directly.

About

Example of using the Golang aws-sdk STS AssumeRole capability.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages