Skip to content

Support for IAM Role profiles #32

@carlnordenfelt

Description

@carlnordenfelt

Given the following aws profile:

[profile my-role-based-mfa-profile]
source_profile=my-iam-user-profile
role_arn=arn:aws:iam::1234567890:role/MyRole
mfa_serial=arn:aws:iam::1234567890:mfa/iam-username
region=eu-west-1

I get an error when running:

evb diagram -b{mybus} -p my-role-based-mfa-profile
node:internal/process/promises:218
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error: connect EHOSTUNREACH 169.254.169.254:80 - Local (192.168.72.86:57537)
    at internalConnect (node:net:899:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:428:12)
    at node:net:991:9
    at processTicksAndRejections (node:internal/process/task_queues:75:11) {
  message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1',
  errno: -65,
  code: 'CredentialsError',
  syscall: 'connect',
  address: '169.254.169.254',
  port: 80,
  time: 2021-07-05T11:17:21.628Z,
  originalError: {
    message: 'Could not load credentials from any providers',
    errno: -65,
    code: 'CredentialsError',
    syscall: 'connect',
    address: '169.254.169.254',
    port: 80,
    time: 2021-07-05T11:17:21.628Z,
    originalError: {
      message: 'EC2 Metadata roleName request returned error',
      errno: -65,
      code: 'EHOSTUNREACH',
      syscall: 'connect',
      address: '169.254.169.254',
      port: 80,
      time: 2021-07-05T11:17:21.628Z,
      originalError: {
        errno: -65,
        code: 'EHOSTUNREACH',
        syscall: 'connect',
        address: '169.254.169.254',
        port: 80,
        message: 'connect EHOSTUNREACH 169.254.169.254:80 - Local (192.168.72.86:57537)'
      }
    }
  }
}

Would be great if these types of profiles could be supported too :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions