fix(audit): derive SigV4 aws_host from audit_api_url#224
Merged
Conversation
The SigV4 host was hardcoded to the prod audit API hostname, so any audit_api_url override would fail auth against a different host. Derive the host from the URL so wrapper configs can route different terraform directories to different audit API endpoints.
Without the scheme, urlparse('foo.bar').hostname returns None and the
test silently bypasses the real aws_host derivation.
aoskotsky-amplify
previously approved these changes
May 26, 2026
jconstance-amplify
previously approved these changes
May 26, 2026
3fe36cc
|
jconstance-amplify
approved these changes
May 26, 2026
kkozik-amplify
pushed a commit
that referenced
this pull request
May 27, 2026
…aws-host fix(audit): derive SigV4 aws_host from audit_api_url
jconstance-amplify
added a commit
that referenced
this pull request
Jun 9, 2026
Add entries for version bumps that shipped without changelog notes: 0.10.24 (plan_check deletion fix, this PR) and 0.10.23 (504 Gateway Timeout retry, PR #228). Relabel the existing multipath-SSM / tf_validate block to [0.10.22] -- it was mislabeled [0.10.21]: the commit that added it (2bd33e2) landed after the 0.10.21 bump, so it actually released as 0.10.22. Add the real [0.10.21]: the `tf audit` SigV4 aws_host fix (PR #224), previously undocumented. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
aws_hostin_post_audit_infofromaudit_api_urlinstead of the hardcoded prod hostname.BotoAWSRequestsAuthmatches the URL's hostname.Without this, any
audit_api_urloverride (e.g., for a per-environment audit API) signs requests for the prod host and fails auth at the destination API.Part of a 4-PR sequence to stand up a separate audit API in
amplify-devops-testing. This PR must be released and rolled out to the terraform-config runtime image before the matching.tf_wrapperoverride in terraform-config is merged.Test plan
tox -e py39passes.aws_hostresolves to the URL's hostname.