-
Notifications
You must be signed in to change notification settings - Fork 676
InvokeRestApi in MWAA always returns 400 Bad Request with URL mismatch #3057
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
Comments
If you want to manually call your workflow directly as you described, you'll need to get a web token, exchange it for a web session, and then use that to call your hosted workflow, as described here (this is using Python but the same idea applies here) |
@Madrigal However, I'm still unable to determine the root cause of the error. Through debugging, I've discovered that the Additionally, since the response.body fails to deserialize (as indicated by the "invalid character 'U'" error), I can't extract any helpful information from the error message itself. func awsRestjson1_deserializeOpErrorInvokeRestApi(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
} Could you provide any insight into what might be causing this ValidationException or suggest additional debugging approaches I could try? |
Yes. This may be tricky to de-serialize by the SDKs since the format coming from the service may not be JSON if it's coming directly from the workflow. You can use ClientLogMode to print what the exact response is coming down the wire, which will help you identify what's going wrong
|
Using Thanks for the quick feedback!🙏 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
When using InvokeRestApi with the AWS SDK for Go v2, I'm consistently getting a 400 Bad Request error. The request URL in the actual HTTP call appears to be different from what I specified in my code.
Expected Behavior
The request should be constructed with the URL I specified in my code, which would include the DAG name in the path.
Current Behavior
The API call always results in a 400 Bad Request error with the following error message:
Debug logs show that the actual request URL is:

Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/service/mwaa v1.34.2
Compiler and Version used
1.23
Operating System and version
mac OS 15.3.2
The text was updated successfully, but these errors were encountered: