I am trying to activate the AWS ec2 instance at ssm manager using the boto3 api call however its failing with regex error.
Issue is already raised at https://github.com/aws/aws-sdk-js/issues/2748 but no proper solution found
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}+=,.@-_/]*$
Though i have copied the IAM Role ARN.
I really appreciate if anybody has a solution for this..