-
Notifications
You must be signed in to change notification settings - Fork 336
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
write_get_object_response not setting correct host #622
Comments
Hi @mohantaylor , I created an example for s3 object lambda and I probably got the same error as you: But I could not get that nice error message as you. I am new to rust and error handling seems to me hard. I identified that the error is IO Error, but I could not get the details of this IO Error. If you can help me in this code to provide more granular error message, we can provide this example to the developers to help them identify the root cause of the issue. Thank you in advance |
Unless I'm mistaken, this looks like an error in the AWS SDK for Rust. I'd recommend you to open the issue in that repo instead since the people that work on this project don't have much knowledge about the SDK. |
Thanks, I already noticed it and opened an issue: |
closing in favor of that sdk issue |
|
The issue was fixed in the 01 of May Pre-Release of aws-rust-sdk. |
I am having a few issues getting write_get_object_response to work, turning on TRACE looks like the hostname is not being set correctly?
The code performing the write_get_object_response:
client.write_get_object_response()
.body(ByteStream::new(SdkBody::from("Test data")))
.set_request_token(Some(token))
.set_request_route(Some(route))
.set_status_code(Some(200))
.send()
.await?;
And in the logs I see the following:
/WriteGetObjectResponse
x-id=WriteGetObjectResponse
content-length:24
content-type:application/octet-stream
host:s3-object-lambda.us-east-2.amazonaws.com
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20230321T083024Z
x-amz-fwd-status:200
x-amz-request-route:io-cell002
...
I thought the host should be
io-cell002.s3-object-lambda.us-east-2.amazonaws.com
?The lambda then fails with:
ERROR Lambda runtime invoke{requestId="..." xrayTraceId="Root=...Sampled=0"}: DispatchFailure(DispatchFailure { source: ConnectorError { kind: Io, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: No address associated with hostname" })) } })
Thanks!
The text was updated successfully, but these errors were encountered: