async function getConfigFromS3()

in resources/module_3_1/request/index.js [32:46]


async function getConfigFromS3() {

  try {

    const s3Params = {
      Bucket: configBucketName,
      Key: S3_CONFIG_KEY,
    };
    const response = await s3.getObject(s3Params).promise();
    return JSON.parse(response.Body.toString('utf-8'));
  } catch (_error) {
    console.error(_error)
    return undefined;
  }
}