Created
November 24, 2016 07:39
-
-
Save ogawatti/e067e573c7cd2b1b4231cf8b015052eb to your computer and use it in GitHub Desktop.
Run Inspector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from datetime import datetime | |
def lambda_handler(event, context): | |
AWS_REGION = "ap-northeast-1" | |
INSPECTOR_TEMPLATE_ARN = "arn:aws:inspector:ap-northeast-1:************:target/**********/template/**********" | |
INSPECTOR_RUN_NAME = "RUN-" + datetime.now().strftime("%Y%m%d%H%M") | |
client = boto3.client('inspector', region_name=AWS_REGION) | |
response = client.start_assessment_run( | |
assessmentTemplateArn=INSPECTOR_TEMPLATE_ARN, | |
assessmentRunName=INSPECTOR_RUN_NAME | |
) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment