Where do the credentials come from?
The CloudFormation stack creates the IAM role Better Stack assumes. In the AWS console, go to CloudFormation β Stacks β betterstack β Outputs and copy IntegrationRoleArn and ExternalId.
Connects an AWS account to an existing aws source, so we can enumerate your AWS resources and manage CloudWatch log group subscriptions.
This is the API equivalent of the Connect your AWS account step in the source's Ingest tab.
Create the source first with Create a source and "platform": "aws", deploy the CloudFormation stack as described in AWS CloudFormation, then send the stack's IntegrationRoleArn and ExternalId outputs back with the request below.
The CloudFormation stack creates the IAM role Better Stack assumes. In the AWS console, go to CloudFormation β Stacks β betterstack β Outputs and copy IntegrationRoleArn and ExternalId.
URL parameters
ID of the aws source you want to connect the account to
Headers
Bearer $TOKEN
Body parameters
The IntegrationRoleArn output of the Better Stack CloudFormation stack.
Must be sent together with aws_external_id.
The ExternalId output of the Better Stack CloudFormation stack, used for the STS assume-role trust.
Must be sent together with aws_role_arn.
The ID of an AWS account you have already connected. Send this instead of aws_role_arn and aws_external_id to link the source to that account.
The AWS account was connected. The credentials are write-only and are never returned, so the response is the plain source object.
Response body
Your team has no source with the given ID
Response body
Only one of the two credentials was sent
Response body
Better Stack could not assume the role with the given credentials
Response body
Resource discovery starts right after the account is connected. Log groups and metrics appear in the source's Ingest tab within a few minutes.
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.