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:
Bryan Frimin
2026-06-06 09:00:04 +02:00
parent 66721d63a8
commit daf139c12d
3 changed files with 30 additions and 52 deletions

View File

@@ -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,