Skip to content

Commit

Permalink
Merge pull request #168 from drone-plugins/CI-14134-final
Browse files Browse the repository at this point in the history
fix: [CI-14134]: fix cross account access
  • Loading branch information
Ompragash authored Sep 19, 2024
2 parents 9d80669 + 4529172 commit 1900baf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ func (p *Plugin) createS3Client() *s3.S3 {
log.Warn("AWS Key and/or Secret not provided (falling back to ec2 instance profile)")
}

sess, err = session.NewSession(conf)
if err != nil {
log.Fatalf("failed to create AWS session: %v", err)
}

client := s3.New(sess, conf)

if len(p.UserRoleArn) > 0 {
Expand Down

0 comments on commit 1900baf

Please sign in to comment.