def retrieve_arn(config):
 if config.get('arn'):
  return config.get('arn')
 if config.get('Arn'):
  return config.get('Arn')
 if config.get('CertificateArn'):
  return config.get('CertificateArn')
 if config.get('group', {}).get('arn'):
  return config.get('group', {}).get('arn')
 if config.get('role', {}).get('arn'):
  return config.get('role', {}).get('arn')
 if config.get('user', {}).get('arn'):
  return config.get('user', {}).get('arn')
 return None

def retrieve_arn ( config ) : if config . get ( 'arn' ) : return config . get ( 'arn' ) if config . get ( 'Arn' ) : return config . get ( 'Arn' ) if config . get ( 'CertificateArn' ) : return config . get ( 'CertificateArn' ) if config . get ( 'group' , { } ) . get ( 'arn' ) : return config . get ( 'group' , { } ) . get ( 'arn' ) if config . get ( 'role' , { } ) . get ( 'arn' ) : return config . get ( 'role' , { } ) . get ( 'arn' ) if config . get ( 'user' , { } ) . get ( 'arn' ) : return config . get ( 'user' , { } ) . get ( 'arn' ) return None
see issue #374 .