You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-06-15 00:15:15 +02:00
Init aws session with region when using role
This commit is contained in:
@ -247,6 +247,9 @@ func main() {
|
||||
// configuration is provided. This is useful for taking advantage of
|
||||
// EC2/ECS instance roles.
|
||||
awsSession = session.Must(session.NewSession())
|
||||
if cfg.Aws.Region != "" {
|
||||
awsSession.Config.WithRegion(cfg.Aws.Region)
|
||||
}
|
||||
|
||||
log.Printf("main : AWS : Using role.\n")
|
||||
|
||||
|
Reference in New Issue
Block a user