2023å¹´11æãLambdaã®é«åº¦ãªãã°è¨é²ã³ã³ããã¼ã«æ©è½ããªãªã¼ã¹ãããJSONå½¢å¼ã®ãã°ãç°¡åã«CloudWatch Logsã«åºåã§ããããã«ãªãã¾ããã Pythonã®å ´åã¯å ·ä½çã«ã©ã®ãããªãã°ã«ãªãã®ãæ°ã«ãªã£ãã®ã§ãå®è¡ãã¦ã¿ã¾ããã 使ç¨ããã©ã³ã¿ã¤ã ã¯Python 3.12ã§ãã JSONå½¢å¼ã®ãã°ã®ä¾ ãµã³ãã«ã³ã¼ãï¼ import json import logging logger = logging.getLogger() def lambda_handler(event, context): logger.info('ã¡ãã»ã¼ã¸1') logger.info('ã¡ãã»ã¼ã¸2') logger.info(event) logger.info(json.dumps(event)) logger.info('第1å¼æ°ï¼msgï¼ã¯å¿ é ã¿ããã§ã', extra=ev
{{#tags}}- {{label}}
{{/tags}}