fix: remove unused sess
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
This commit is contained in:
parent
347f6c377a
commit
44e56b30b6
1 changed files with 1 additions and 5 deletions
|
@ -403,10 +403,6 @@ func New(params DriverParameters) (*Driver, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
awsConfig := aws.NewConfig()
|
awsConfig := aws.NewConfig()
|
||||||
sess, err := session.NewSession()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to create new session: %v", err)
|
|
||||||
}
|
|
||||||
if params.AccessKey != "" && params.SecretKey != "" {
|
if params.AccessKey != "" && params.SecretKey != "" {
|
||||||
creds := credentials.NewStaticCredentials(
|
creds := credentials.NewStaticCredentials(
|
||||||
params.AccessKey,
|
params.AccessKey,
|
||||||
|
@ -442,7 +438,7 @@ func New(params DriverParameters) (*Driver, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sess, err = session.NewSession(awsConfig)
|
sess, err := session.NewSession(awsConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create new session with aws config: %v", err)
|
return nil, fmt.Errorf("failed to create new session with aws config: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue