Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Credential failure during S3 deploy #11723

Closed
corrylc opened this issue Nov 22, 2023 · 3 comments
Closed

AWS Credential failure during S3 deploy #11723

corrylc opened this issue Nov 22, 2023 · 3 comments

Comments

@corrylc
Copy link

corrylc commented Nov 22, 2023

Deploy is no longer possible when using AWS SSO profiles. This appears to be related to changes in AWS CLI and may have a fix in the upstream aws-sdk-go, see also aws/aws-sdk-go#4649 and hashicorp/terraform#32448

I encountered the same error in Terraform this morning, and was forced to update to resolve the issue. It appears that Hugo needs a similar update.

Some redactions done to protect environment names, but the output is the real error I get when running the command which worked a week ago.

% AWS_PROFILE=sso-profile-name hugo deploy --dryRun
Deploying to target "s3" (s3://bucket-name?region=us-east-1)
Error: blob (code=Unknown): NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.120.4-f11bca5fec2ebb3a02727fb2a5cfb08da96fd9df+extended darwin/arm64 BuildDate=2023-11-08T11:18:07Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes

@bep bep removed the NeedsTriage label Nov 22, 2023
@bep bep added this to the v0.121.0 milestone Nov 22, 2023
bep pushed a commit that referenced this issue Nov 22, 2023
…11724)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.45.14 to 1.48.2.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.45.14...v1.48.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Updates #11723
@bep
Copy link
Member

bep commented Nov 22, 2023

I merged an update in #11724 -- I don't have time to test this particular issue, so I'll leave this open until others can confirm. I will cut a release early next week.

@corrylc
Copy link
Author

corrylc commented Nov 22, 2023

Thanks! I am not too familiar with go, but I did try the following, and the issue appears to be fixed!

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@d528bbd6d0e63bb366ea8a3e95042f771c17817a
AWS_PROFILE=profile-name ~/go/bin/hugo deploy --dryRun

The SHA was HEAD at the time of my test, wasn't sure how to specify the head of the master branch.

Thanks for the quick fix!

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants