Skip to content

Commit

Permalink
break early if the given profile does not exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislas committed Jul 7, 2018
1 parent 1f78f87 commit 1d85ae1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func main() {
if len(region) == 0 {
region = cfg.Region
}
_, err = cfg.Credentials.Retrieve()
if err != nil {
panic("unable to retrieve credentials from profile")
}
vPrintln("Using the AWS Region %s", region)
iamc := iam.New(cfg)
stsc := sts.New(cfg)
Expand Down

0 comments on commit 1d85ae1

Please sign in to comment.