You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/24 11:36:48 UTC

[GitHub] [airflow] rahulraina7 edited a comment on pull request #16012: Fixing Glue hooks/operators

rahulraina7 edited a comment on pull request #16012:
URL: https://github.com/apache/airflow/pull/16012#issuecomment-846977278


   I have also updated the glue hook to use IAM arn for its execution role.
   As there can be a path associated with a role name, This won't work if there is an actual path present.
   
   Example:
   ```
   {'Role': {'Path': '/dataplatform/glue/', 'RoleName': 'glue-role', 'RoleId': 'AROAU2X5YFLK4EU5OCRWW', 'Arn': 'arn:aws:iam::****:role/dataplatform/glue/glue-role', 'CreateDate': datetime.datetime(2021, 5, 23, 14, 50, 3, tzinfo=tzutc()), 'AssumeRolePolicyDocument': {'Version': '2012-10-17', 'Statement': [{'Sid': '', 'Effect': 'Allow', 'Principal': {'Service': 'glue.amazonaws.com'}, 'Action': 'sts:AssumeRole'}]}, 'MaxSessionDuration': 3600, 'RoleLastUsed': {'LastUsedDate': datetime.datetime(2021, 5, 24, 6, 1, 50, tzinfo=tzutc()), 'Region': 'ap-southeast-1'}}, 'ResponseMetadata': {'RequestId': '25bffed5-ef5d-41eb-8959-16e75961d896', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '25bffed5-ef5d-41eb-8959-16e75961d896', 'content-type': 'text/xml', 'content-length': '1005', 'date': 'Mon, 24 May 2021 11:14:04 GMT'}, 'RetryAttempts': 0}}
   
   ```
   Its better to use Arn since the underlying API in boto3 supports that
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org