constructor()

in src/lib/dashboard-stack.ts [953:977]


  constructor(scope: Construct, id: string) {
    const certPath =
      'https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem';
    const certPathForAwsCN =
      'https://s3.cn-north-1.amazonaws.com.cn/rds-downloads/rds-combined-ca-cn-bundle.pem';
    super(scope, id, {
      code: Code.fromAsset(path.join(__dirname, '../lambda.d/dashboard/'), {
        bundling: {
          image: Runtime.PROVIDED.bundlingImage,
          user: 'root',
          command: [
            'bash',
            '-c',
            `
            mkdir -p /asset-output/etc &&
            curl ${certPath} -o /asset-output/etc/${DocDB_CA} &&
            curl ${certPathForAwsCN} -o /asset-output/etc/${DocDB_CN_CA}
            `,
          ],
        },
        assetHash: artifactsHash([certPath, certPathForAwsCN]),
      }),
      description: '/RDS CAs',
    });
  }