fbpx
POSThttps://api.spotinst.io/functions/iam/role/aws?accountId={ACCOUNT_ID}

Create IAM role ID that connects to your AWS IAM role ARN

URL Parameters

Parameter Type Description
ACCOUNT_ID * String

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
	"role": {
		"description": "s3 full access",  
		"provider": "aws",
		"credentials": {
    		"roleArn": "arn:aws:iam::${SPOTINST_AWS_ACCOUNT_ID}:role/${ROLE_NAME}",
    		"externalId": "${EXTERNAL_ID}"
		}
	}
}

Body Attributes


  • role.description String
    Description of ID
  • role.provider * String
    prover of IAM role
  • role.credentials.roleARN * String
    ARN that you want to associate with the Spotinst role ID
  • role.credentials.externalId String
    External ID
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "iamRoleConfig": {
    "roleId": "sfr-5da1aba5"
  }
}