Use aws-sdk-go-v2/config to load AWS config
Replace the hand-rolled credential chain (static, ECS endpoint, EC2 role) with config.LoadDefaultConfig, which handles the full standard AWS credential resolution chain automatically. Co-authored-by: Neil McGibbon <code@neilmcgibbon.com> Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -245,7 +245,7 @@ func (impl *Implm) Run(
|
||||
return fmt.Errorf("cannot get cookie secret bytes: %w", err)
|
||||
}
|
||||
|
||||
awsConfig := awsconfig.NewConfig(
|
||||
awsConfig, err := awsconfig.NewConfig(
|
||||
l,
|
||||
httpclient.DefaultPooledClient(
|
||||
httpclient.WithLogger(l),
|
||||
@@ -259,6 +259,9 @@ func (impl *Implm) Run(
|
||||
Endpoint: impl.cfg.AWS.Endpoint,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot initialize AWS config: %w", err)
|
||||
}
|
||||
|
||||
html2pdfConverter := html2pdf.NewConverter(
|
||||
impl.cfg.ChromeDPAddr,
|
||||
|
||||
Reference in New Issue
Block a user