我正在尝试使用boto3api调用激活ssm管理器上的AWS ec2实例,但是由于regex错误而失败。你知道吗
问题已在https://github.com/aws/aws-sdk-js/issues/2748提出,但找不到合适的解决方案
response = client.create_activation(DefaultInstanceName='my-instance-name',
IamRole='arn:aws:iam::xxxxxxx:role/my-role-name')
Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 320, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 623, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the CreateActivation operation: 1 validation error detected: Value 'arn:aws:iam::xxxxxxxx:role/my-role-name' at 'iamRole' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[\p{L}\p{N}+=,.@-_/]*$
虽然我模仿了我的角色阿恩。你知道吗
如果有人能解决这个问题,我真的很感激。。你知道吗
IamRole
参数需要角色的名称,而不是ARN。应该用my-role-name
替换arn:aws:iam::xxxxxxx:role/my-role-name
。你知道吗相关问题 更多 >
编程相关推荐