Error: unable to get local issuer certificate | NetworkingError #4235
Unanswered
SaitejaChavva
asked this question in
Q&A
Replies: 1 comment
-
Hey @SaitejaChavva thanks for opening this issue, this error indicates the certificate to be missing can you use something like this and specify your certificate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket.emit (node:domain:475:12)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
code: 'NetworkingError',
region: 'us-east-1',
hostname: 'secretsmanager.us-east-1.amazonaws.com',
retryable: true,
time: 2022-10-13T06:40:29.115Z
}
I'm getting above issue, while accessing the AWS Secrets Manager. Below is my code
import { Handler, APIGatewayEvent } from 'aws-lambda';
import { globalJsonResponse } from "@claims/schema";
import { SecretsManager } from 'aws-sdk';
const client = new SecretsManager({
region : process.env.REGION,
accessKeyId: process.env.ACCESS_KEY_SM,
secretAccessKey: process.env.SECRET_KEY_SM
});
export const handler: Handler = async (event: APIGatewayEvent) => {
const functionName = 'SM';
console.log("inside the handler");
const secretName = "ClaimSuperSecret1";
try {
const res = await client.getSecretValue({ SecretId: secretName }).promise();
console.log("updateTableRes", res)
return globalJsonResponse(200, { status: 200, res, message: 'Secrets reteived successfully' }, functionName);
} catch (error) {
console.log("err", error);
return globalJsonResponse(error.statusCode, { status: error.statusCode, message: error.code }, functionName);
}
};
Beta Was this translation helpful? Give feedback.
All reactions