I have successfully installed an AWS CLI on WSL. In addition I did follow these instructions:
https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/
Now, the first example works and when I run a testcase all is functioning properly and the test succeeds. However, when I run the example from the link above with the encoder with a test, the execution fails.
This is the error log:
s2n_init() failed: 402653268 (Failed to load or unload an openssl provider)
Fatal error condition occurred in /home/username/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:197: 0 && "s2n_init() failed"
Exiting Application
No call stack information available
START RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Version: $LATEST
2022-11-21T09:02:07.642Z xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Task timed out after 1.02 seconds
END RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
REPORT RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Duration: 1015.50 ms Billed Duration: 1000 ms Memory Size: 128 MB Max Memory Used: 16 MB
Now, there are two hints in here:
- failed to load or unload an openssl provider
- something with certificates seen the location where the error occured. This location is my local machine which I Find odd since the (binary) code is uploaded to AWS and running there, not on my local machine I’d assume?
Have I missed an installation step somewhere or is my configuration incorrect? What can I do to provide more information for myself and / or solve the issue?
2
Answers
With the help of @barath I succeeded. I'd like to form a complete answer because two issues are to be addressed here:
1)There is a bug in the "beyond hello" example's main.cpp code
must be:
2)to get rid of the s2n_init() error, one needs to do as barath explained:
Comment line 414 to look like this from line 413 to 415
save the file.
add a comment on line ~223 such that, from line ~222 the code looks like:
Now you can continue the example on https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/ with
This solution worked – https://www.mail-archive.com/[email protected]/msg91357.html.
(Disabling S2N_LIBCRYPTO_SUPPORTS_EVP_RC4 in aws-sdk-cpp)