Skip to content

Dispatch failure

0

Hi,

I am using Rust with cargo lambda https://www.cargo-lambda.info/guide/getting-started.html and up until recently everything has been fine. However yesterday I went to do the usual deploy and had this error return:

Error: × failed to fetch lambda function ├─▶ dispatch failure ├─▶ io error ├─▶ error trying to connect: invalid peer certificate: UnknownIssuer ╰─▶ invalid peer certificate: UnknownIssuer

Since getting this I have tried:

  • Doing the action on another machine on another network (just incase this was related to the network)
  • Resetting aws sso credentials via aws configure command AND manually
  • Performed a fresh windows install and installed only the required (rust, cargo-lambda, wingw, vs) in order to build and deploy

I have created a discussion with cargo-lambda as well but this doesn't seem to be related to cargo-lambda as it appears to be a TLS / SSL cert. So far nothing has been able to fix this issue.

This is now very much above my skill set and wondering where to go from here / if anyone else has encountered?

Thanks!

asked 2 years ago2.6K views

1 Answer
2

The error you're encountering suggests an issue with SSL/TLS certificate validation when trying to connect to AWS services. This "dispatch failure" with an "UnknownIssuer" error typically indicates that your system is unable to verify the authenticity of the AWS server's certificate.

Here are some steps you can try to resolve this issue:

  1. Update your system's root certificates: Ensure your operating system has the latest root certificates installed. On Windows, this usually happens automatically through Windows Update, but you might want to check for any pending updates.

  2. Check your system time: Incorrect system time can cause SSL certificate validation failures. Make sure your computer's clock is accurately synchronized.

  3. Verify AWS CLI configuration: Double-check your AWS CLI configuration, especially the region setting. Sometimes, region mismatches can lead to connection issues.

  4. Use verbose logging: Try running your deployment command with increased verbosity or debug logging. This might provide more detailed information about where the connection is failing.

  5. Temporarily disable SSL verification (for testing only): As a diagnostic step, you could try temporarily disabling SSL verification. This is NOT recommended for production use, but it can help isolate whether the issue is specifically related to certificate validation.

  6. Check for antivirus or firewall interference: Some security software can interfere with SSL connections. Temporarily disabling these (if safe to do so in your environment) might help identify if they're the cause.

  7. Use a network trace tool: Tools like Wireshark can help you see the details of the SSL handshake and potentially identify where it's failing.

If none of these steps resolve the issue, you may need to contact AWS support for further assistance, as there could be an issue on their end or with the specific AWS service you're trying to access.

Remember, while this error can be frustrating, it's important not to bypass SSL verification in a production environment, as it's a crucial security measure.

Sources
Error handling - AWS SDK for Rust
Troubleshooting issues in Lambda - AWS Lambda

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.