MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / buildAxios

Function buildAxios

packages/s3-lambda-processing/src/index.js:14–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12let cacheInstance;
13
14async function buildAxios() {
15 if (cacheInstance) {
16 return cacheInstance;
17 }
18
19 const apiKey = await ssm
20 .getParameter({
21 Name: `/linen-dev/${STAGE}/INTERNAL_API_KEY`,
22 WithDecryption: true,
23 })
24 .promise();
25
26 cacheInstance = axios.create({
27 headers: { 'x-api-internal': apiKey.Parameter?.Value },
28 });
29
30 return cacheInstance;
31}
32
33module.exports.handler = async function (event, context, callback) {
34 console.log('Process email');

Callers 1

index.jsFile · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected