Skip to content

Commit

Permalink
Merge pull request #321 from daniel-harrison/master
Browse files Browse the repository at this point in the history
Enable shared config for s3
  • Loading branch information
priyawadhwa authored Aug 27, 2018
2 parents f1c6803 + 587a5e2 commit 3654ea4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/buildcontext/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ type S3 struct {
// UnpackTarFromBuildContext download and untar a file from s3
func (s *S3) UnpackTarFromBuildContext() (string, error) {
bucket, item := util.GetBucketAndItem(s.context)
downloader := s3manager.NewDownloader(session.New())
sess, err := session.NewSessionWithOptions(session.Options{
SharedConfigState: session.SharedConfigEnable,
})
if err != nil {
return bucket, err
}
downloader := s3manager.NewDownloader(sess)
directory := constants.BuildContextDir
tarPath := filepath.Join(directory, constants.ContextTar)
if err := os.MkdirAll(directory, 0750); err != nil {
Expand Down

0 comments on commit 3654ea4

Please sign in to comment.