export const handler = async (event) => {
try {
const jsonObject = event;
const formattedMessage = `Security Hubが以下の重要度の異常を検知しました: ${jsonObject["Security Hubが以下の重要度の異常を検知しました"]}
Account ID: ${jsonObject["Account ID"]}
発生時間: ${jsonObject["発生時間"]}
ProductArn: ${jsonObject["ProductArn"]}
検出内容: ${jsonObject["検出内容"]}`;
return formattedMessage;
} catch (error) {
return `Error: ${error.message}`;
}
};
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme