-
Notifications
You must be signed in to change notification settings - Fork 249
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
Error during dispatch: error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer #577
Comments
Another error log worth mentioning is when we removed use of
|
Hey @ferologics, thanks for submitting this. It sounds like the SDK could be resolving and incorrect endpoint. We'll take a look at this as soon as we're able to. In the meantime, you could try using native-tls instead of RusTLS or, if you can find anothe cert, manually insert it. To enable native-tls, you can activate the feature in your Cargo.toml:
That might end up failing with the same issue but it's worth a shot. |
@Velfi i tried enabling native-tls according to your suggestion but now I get:
This is with Amazon Linux 2 custom runtime using arm64. |
The code in your implementation looks like its using Rusoto instead of aws-sdk-iotdataplane. Are you sure this is an aws-sdk-rust issue? Maybe I'm misunderstanding. At a higher level, I remember there being an issue with the IoT DataPlane endpoint having a bad certificate, but I believe this was resolved by updating the endpoint. If you switch to the latest aws-sdk-rust, this may just work correctly. |
OK. To my knowledge, Rusoto doesn't use aws-sdk-rust at all, so this is a Rusoto issue. |
|
Describe the bug
Encountered the following error when calling
IotDataClient.publish
:Expected Behavior
publishes to mqtt topic
Current Behavior
fails to publish to mqtt topic
Reproduction Steps
cargo lambda build --release --arm64 --output-format zip
SELECT * FROM "rust_lambda_mqtt"
{ "command": "test" }
torust_lambda_mqtt
topic to trigger the lambdaPossible Solution
This looks like some low level TLS error. Custom runtime v2 with rust doesn't seem to be working with the base container. Might just be something with the path of the SSL certs that causes this. The lambda works fine when it's ran locally, the problem starts occurring once it's deployed on Amazon Linux 2 (AL2). Running the lambda on the x86_64 arch in AL2 yields the same error.
Workaround is to use the provided Amazon Linux 1 runtime and compile the lambda with
cargo lambda build --release --target x86_64-unknown-linux-gnu.2.17 --output-format zip
which produces a working bootstrap.zip.Implementation
Cargo.toml
main.rs
IAM role policy used
Similar issues found online
Was told to open an issue here.
Version
Resources
Environment details (OS name and version, etc.)
0.5.1
Logs
The text was updated successfully, but these errors were encountered: