UNPKG

haven-secrets-core

Version:

Core for Haven, the easy to use centralized secrets manager.

13 lines (9 loc) 322 B
const attachUserPolicy = (AWS, accountNumber, path, adminUserName) => { const iam = new AWS.IAM(); const params = { PolicyArn: `arn:aws:iam::${accountNumber}:policy/${path}/${adminUserName}`, UserName: adminUserName, }; return iam.attachUserPolicy(params).promise(); }; export default attachUserPolicy;