lib/plugins/aws/deployFunction/index.js/AwsDeployFunction/normalizeArnRole
class AwsDeployFunction:  normalizeArnRole(role) {
    if (typeof role === 'string') {
      if (role.indexOf(':') === -1) {
        const roleResource = this.serverless.service.resources.Resources[role];

        if (roleResource.Type !== 'AWS::IAM::Role') {
          throw new Error('Provided resource is not IAM Role.');
        }

        const roleProperties = roleResource.Properties;
        const compiledFullRoleName = `${roleProperties.Path || '/'}${roleProperties.RoleName}`;

        return this.provider.getAccountInfo().then((result) =>
          `arn:${result.partition}:iam::${result.accountId}:role${compiledFullRoleName}`
        );
      }

      return BbPromise.resolve(role);
    }

    return this.provider.request(
      'IAM',
      'getRole',
      {
        RoleName: role['Fn::GetAtt'][0],
      }
    ).then((data) => data.Arn);
  }