LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Custom webhook integrations
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
    • Calling internal service endpoints in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • How to configure the AWS integration for self-managed Cortex accounts
  • Step 1: Configure your IAM policy
  • Step 2: Configure the AWS account
  • Step 3: Configure resource types

Was this helpful?

Export as PDF
  1. Self-managed Cortex

Self-managed AWS

Last updated 4 days ago

Was this helpful?

In order to connect Cortex to your Amazon Web Services (AWS) resources, follow all steps for IAM policy, account, and resource types setup.

How to configure the AWS integration for self-managed Cortex accounts

Step 1: Configure your IAM policy

For each account:

  1. Log in to your AWS Management Console and open the .

  2. Click Policies, then choose Create policy.

  3. Switch to the JSON editor. Copy the JSON starting policy from Cortex, and paste it into the JSON editor.

    • This policy allows Cortex to list all resources, resource types, and resource tags.

    • If you are pulling in ECS resources, add the following actions to the JSON policy:

    "rds:Describe*",
    "rds:List*",
    "s3:Describe*",
    "s3:List*"
  4. For each resource type that you want to import into Cortex, add policies for reading that type of AWS resource.

    • For example, if you want to import resources of type "AWS::IAM::Role", we'll need to have permission to "iam:ListRoles", "iam:ListAttachedRolePolicies", "iam:GetRole", and "iam:ListRolePolicies". Because this is a dynamic feature, Cortex does not automatically determine this. One option is to start with and remove sensitive permissions as deemed necessary.

  5. Click Review Policy, enter a name, then click Create Policy.

Step 2: Configure the AWS account

There are two options to fetch resources for a single AWS account:

    1. If you have already set up the access key id, access key secret, and account number environment variables from the second approach, remove them.

    • You can manually specify the credentials in Cortex. To do so:

      • Create access users along with access keys for each AWS account you'd like access to. They should have all the permissions listed above.

      • For each set of access keys, set the following environment variables (access key id, access key secret, and account number) in both the backend and the worker ConfigMap:

        • AMAZON_ACCESS_0_ID

        • AMAZON_ACCESS_0_SECRET

        • AMAZON_ACCESS_0_ACCOUNT

Note that the AWS account configuration settings in the UI has no effect if these setups are used.

Multiple AWS accounts

There are two options to fetch resources from multiple AWS accounts:

  • Option 1: STS assume role

    • To use this option, you must be deploying Cortex in an AWS environment (e.g. EKS, or other managed services):

      • If you have already set up the access key id, access key secret, and account number environment variables from the second approach, remove them.

      • In AWS IAM, configure one AWS account that has authorization to use STS assume role for all AWS accounts that you want to fetch resources for. This configuration should encompass IAM roles, configs, and policies.

      • Set AMAZON_AUTH_MODE to ASSUME_ROLE in both the backend and the worker ConfigMap.

      • In Cortex, configure a list of AWS accounts via settings in the UI or via API.

    • If you don't want to use the credentials provided by the environment, you can manually specify the credentials in Cortex:

      1. Create access users along with access keys for each AWS account you'd like access to. They should have all the permissions listed above.

      2. For each set of access keys, set these environment variables (access key id, access key secret, and account number) in your ConfigMap:

        • AMAZON_ACCESS_0_ID

        • AMAZON_ACCESS_0_SECRET

        • AMAZON_ACCESS_0_ACCOUNT

        • AMAZON_ACCESS_1_ID

        • AMAZON_ACCESS_1_SECRET

        • AMAZON_ACCESS_1_ACCOUNT

        • AMAZON_ACCESS_N_ID

        • AMAZON_ACCESS_N_SECRET

        • AMAZON_ACCESS_N_ACCOUNT

Note that the AWS account configuration settings in the UI has no effect if this setup is used.

Step 3: Configure resource types

Cortex will pull all the types you included in the IAM policy under the Cloud Control types field in the Settings section. If resource types aren't appearing in the list, there is likely a permission issue, and the role isn’t set up to discover Cloud Control types. Make sure that "cloudformation:ListTypes", "cloudformation:ListResources", and "cloudformation:GetResource" are added to the IAM policy, so Cortex can pull the list of all available types from AWS.

To select your cloud control types:

  1. In the Cloud control types field, select the types you want Cortex to discover/import.

  2. Click Save cloud control types.

AWS::ApiGateway::DocumentationVersion
AWS::ApiGateway::Step
AWS::CloudFormation::ResourceVersion
AWS::CustomerProfiles::Integration
AWS::CustomerProfiles::ObjectType
AWS::EC2::TransitGatewayMulticastGroupMember
AWS::EC2::TransitGatewayMulticastGroupSource
AWS::ECS::TaskSet
AWS::Glue::Attach::SchemaVersion
AWS::Glue::Attach::SchemaVersionMetadata
AWS::IoTSiteWise::AccessPolicy
AWS::IoTSiteWise::Dashboard
AWS::IoTSiteWise::Project
AWS::Kendra::DataSource
AWS::Kendra::Faq
AWS::MediaConnect::FlowEntitlement
AWS::MediaConnect::FlowOutput
AWS::MediaConnect::FlowSource
AWS::MediaConnect::FlowVpcInterface
AWS::MediaPackage::Asset
AWS::MediaPackage::PackagingConfiguration
AWS::NetworkFirewall::LoggingConfiguration
AWS::QuickSight::Analysis
AWS::QuickSight::Dashboard
AWS::QuickSight::DataSet
AWS::QuickSight::DataSource
AWS::QuickSight::Template
AWS::QuickSight::Theme
AWS::RDS::DBProxyTargetGroup
AWS::S3Outposts::AccessPoint
AWS::S3Outposts::Bucket
AWS::SSO::Assignment
AWS::SSO::InstanceAccessControlAttributeConfiguration
AWS::SSO::PermissionSet

See the AWS documentation for more information: .

Single AWS account

Option 1: Default credentials chain or accounts in environment variables.

Set up AWS credential providers in the environment Cortex is hosted on. This can be done in several ways, including Java system properties, ECS container credentials, or EC2 instance IAM role-provided credentials. See for the full list of approaches and further details.

Option 2: Accounts in environment variables

In the AWS environment, set up AWS credential providers that are compatible with STS assume role authorization. The has the full list of approaches and further details, but not all of them are compatible.

Option 2: Accounts in environment variables

Some Cloud Control types are not currently supported. If the type you're looking to import is in the list, please reach out to to submit a feature request.

IAM console
ReadOnlyAccess permissions
Create IAM policies
​
​
AWS documentation
​
AWS documentation
​
support@cortex.io