repo_description: Deploy Node.js projects to AWS Lambda and API Gateway easily
repo_topics: api-gateway aws aws-lambda claudia javascript nodejs serverless
code: const fsPromise = require('../util/fs-promise');
  module.exports = function addPolicy(iam, policyName, roleName, fileName) {
  	'use strict';
  	return fsPromise.readFileAsync(fileName, 'utf8')
  		.then(policyContents => iam.putRolePolicy({
  			RoleName: roleName,
  			PolicyName: policyName,
  			PolicyDocument: policyContents
  		}).promise());
  };
  