How to use the IAM function from aws-sdk

Find comprehensive JavaScript aws-sdk.IAM code examples handpicked from public code repositorys.

-1
module.exports.configService = new AWS.ConfigService();
fork icon7
star icon21
watch icon6

20
21
22
23
24
25
26
27
28
    const apigatewayv2 = new AWS.ApiGatewayV2(this.config);
    return apigatewayv2;
  }

  iam () {
    const iam = new AWS.IAM(this.config);
    return iam;
  }
}
fork icon3
star icon2
watch icon4

164
165
166
167
168
169
170
171
172
173
  })
}

function deploy (options) {
  const lambda = new AWS.Lambda({ apiVersion: '2015-03-31', region: options.region })
  const iam = new AWS.IAM({ apiVersion: '2010-05-08', region: options.region })

  const getRole = promisify(iam.getRole.bind(iam))
  const createLambdaFunction = promisify(lambda.createFunction.bind(lambda))
  const updateFunctionCode = promisify(lambda.updateFunctionCode.bind(lambda))
fork icon2
star icon3
watch icon5

1
2
3
4
5
6
7
8
9
10
// This file made available under CC0 1.0 Universal (https://creativecommons.org/publicdomain/zero/1.0/legalcode)
//

var aws = require('aws-sdk');
var config = new aws.ConfigService();
var iam = new aws.IAM();

// Helper function used to validate input 
function checkDefined(reference, referenceName) {
        
fork icon808
star icon1
watch icon2

199
200
201
202
203
204
205
206
207
208
var AWS = require('aws-sdk');
// Set the region 
AWS.config.update({region: 'REGION'});

// Create the IAM service object
var iam = new AWS.IAM({apiVersion: '2010-05-08'});

var params = {
  MaxItems: 5,
  UserName: 'IAM_USER_NAME'
fork icon390
star icon319
watch icon63

16
17
18
19
20
21
22
23
24
25
const params = {
  AccessKeyId: event.resource,
  Status: 'Inactive'
}

const IAM = new AWS.IAM()

IAM.updateAccessKey(params, function (err, result) {
  if (err) {
    console.log('Error', err)
fork icon55
star icon149
watch icon24

9
10
11
12
13
14
15
16
17
18
const config = require(configPath);
const skillNamespace = config.skillNamespace;
const profileName = helper.getProfileName(skillNamespace, stage);
const userName = helper.getUserName(skillNamespace, stage);

const iam = new AWS.IAM({ apiVersion: '2010-05-08' });



sync.fiber(() => {
fork icon11
star icon81
watch icon14

2
3
4
5
6
7
8
9
10
11
var AWS = require('aws-sdk');
var memoize = require('./lib/util/memoizeWithOptions');
var promisifyAll = require('./lib/util/promisifyAll');

function iam(options) {
  return promisifyAll(new AWS.IAM(options));
}

/**
 * Returns an instance of AWS.IAM which has Promise methods
fork icon10
star icon26
watch icon8

2
3
4
5
6
7
8
9
10
11
const AWS = require('aws-sdk');
const chalk = require('chalk');

class IAM {
  constructor(options) {
    this.iam = new AWS.IAM({
      apiVersion: '2010-05-08',
      region: options.region
    });
  }
fork icon20
star icon21
watch icon2

4
5
6
7
8
9
10
11
12
13
14
15
16
const { prop, indexBy } = require('ramda');


const PROJECT_NAME = process.env.PROJECT_NAME;


const cloudFormation = new AWS.CloudFormation();
const iam = new AWS.IAM();


function prefixGlobalResourceName(name) {
  return `${PROJECT_NAME}-${name}`;
}
fork icon0
star icon0
watch icon0