0
0

lambda share

Posted at

export const handler = async (event) => {
const originalMessage = event.message;

// 在关键部分添加换行符
const formattedMessage = originalMessage
    .replace(/"サービス Arn":/g, '\n"サービス Arn":')
    .replace(/"検出内容":/g, '\n"検出内容":')
    .replace(/"環境の Security Hub/g, '\n"環境の Security Hub')
    .replace(/"発生時間":/g, '\n"発生時間":')
    .replace(/"ID":/g, '\n"ID":');

return {
    formattedMessage
};

};

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0