diff options
author | Matt Brown <[email protected]> | 2023-07-09 00:00:45 +1200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-08-30 16:38:20 +0300 |
commit | c3f273b2d7b18f921410cde6e01442694cda5fe7 (patch) | |
tree | cb521da0e0bc16180c6cad9ed5c4ef20e643b14a /deploy/deploy.go | |
parent | d7dcc76d27dc55b10b9a5c4294c4a883d0bdfb2e (diff) | |
download | hugo-c3f273b2d7b18f921410cde6e01442694cda5fe7.tar.gz hugo-c3f273b2d7b18f921410cde6e01442694cda5fe7.zip |
deploy: Create AWS session for CloudFront invalidation via Go CDK
This allows the AWS credentials to be picked up from the configured
target URL (like blob does) rather than the current behaviour of only
relying on the defaults.
Relying on the defaults here means having to specify credentials twice
(once in the URL for the blob, once in the environment for this code
path) when non-default AWS credentials are in used (e.g. via a profile).
Diffstat (limited to 'deploy/deploy.go')
-rw-r--r-- | deploy/deploy.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deploy/deploy.go b/deploy/deploy.go index 60a3da363..26fac8975 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -271,7 +271,7 @@ func (d *Deployer) Deploy(ctx context.Context) error { } } else { d.logger.Println("Invalidating CloudFront CDN...") - if err := InvalidateCloudFront(ctx, d.target.CloudFrontDistributionID); err != nil { + if err := InvalidateCloudFront(ctx, d.target); err != nil { d.logger.Printf("Failed to invalidate CloudFront CDN: %v\n", err) return err } |