add: Setenv HTTPS_PROXY for aws sdk (#1794)

Co-authored-by: wadahiroka <wadahiroka@192.168.0.8>
This commit is contained in:
hiroka-wada
2023-11-20 10:19:18 +09:00
committed by GitHub
parent 4ffa06770c
commit cbece1dce1

View File

@@ -109,6 +109,10 @@ func (w Writer) Write(rs ...models.ScanResult) error {
if err != nil {
return xerrors.Errorf("Failed to new aws session. err: %w", err)
}
// For S3 upload of aws sdk
if err := os.Setenv("HTTPS_PROXY", config.Conf.HTTPProxy); err != nil {
return xerrors.Errorf("Failed to set HTTP proxy: %s", err)
}
svc := s3.New(sess)
for _, r := range rs {