使用boto3

时间:2019-07-09 10:54:06

标签: amazon-web-services boto3 boto

我试图通过boto3 API自动创建AWS检查员评估目标,尽管我提供了正确的资源,但我却遇到了异常

我尝试对程序中的ARN进行硬编码,仍然是相同的错误

import boto3
client = boto3.client('inspector')
assesment_targets = client.create_assessment_target(assessmentTargetName='inspector_automation', resourceGroupArn="arn:aws:resource-groups:eu-central-1:303882392497:group/wallet-dev")

我收到以下异常

botocore.errorfactory.InvalidInputException: An error occurred (InvalidInputException) when calling the CreateAssessmentTarget operation: Invalid Resource Group ARN: arn:aws:resource-groups:eu-central-1:303882392497:group/wallet-dev (Reason: Invalid resource format for Inspector ARN: arn:aws:resource-groups:eu-central-1:303882392497:group/wallet-dev)

0 个答案:

没有答案