I Have a aws lambda function built in java.
When i try to call one api endpoint i get this error:
"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
I tried to import the public certificate CRT but not worked:
- echo "Install My certificates"
- aws s3 cp s3://myrepositoria/mycacert.crt
- cp mycacert.crt /usr/local/share/ca-certificates/mycacert.crt
- ls /usr/local/share/ca-certificates/
- keytool -import -noprompt -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -alias mycacert -file /usr/local/share/ca-certificates/mycacert.crt -storepass changeit
- update-ca-certificates
- apt-get install jq
But I get error when I call an api endpoint.