32 lines
1.1 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Viewセキュリティオプション付与チェック用Lambda関数のエントリーポイント
"""
from aws.s3 import ConfigBucket
from exceptions import MeDaCaException
from medaca_logger import MeDaCaLogger
def handler(event, context):
logger = MeDaCaLogger.get_logger()
try:
logger.info('I-01-01', '処理開始 Viewセキュリティオプション付与チェック')
logger.info('I-01-02', 'チェック対象スキーマ名ファイルを読み込み 開始')
config_bucket = ConfigBucket()
check_target_schema_names = config_bucket.read_check_target_schema_names()
print(check_target_schema_names)
except MeDaCaException as e:
logger.exception(e.error_id, e)
raise e
except Exception as e:
logger.exception('E-99', f'想定外のエラーが発生しました エラー内容:{e}')
finally:
logger.info('I-06-01', '処理終了 Viewセキュリティオプション付与チェック')
# ローカル実行用
if __name__ == '__main__':
handler({}, {})