Skip to content

[aws] Fix AWS metrics include_linked_accounts false being dropped (7.1 backport) - #21969

Merged
MichaelKatsoulis merged 2 commits into
elastic:backport-aws-7.1from
MichaelKatsoulis:aws-7.1-include-linked-accounts-false
Oct 21, 2026
Merged

MichaelKatsoulis merged 2 commits into
elastic:backport-aws-7.1from
MichaelKatsoulis:aws-7.1-include-linked-accounts-false

Conversation

@MichaelKatsoulis

Copy link
Copy Markdown
Contributor

Backport of #21631 to aws 7.1

WHAT: Render include_linked_accounts unconditionally in all 24 AWS metrics stream templates. Keep owning_account inside {{#if include_linked_accounts}}.

WHY: The key was wrapped in {{#if include_linked_accounts}}, so switching the toggle off omitted the key instead of writing false. The aws metricset in beats treats a missing key as true, so the toggle could not turn linked-account collection off.

The fix already shipped in 6.22.1 (#21639) and 8.7.1 (#21631). 8.x needs Kibana ^9.6.0, and Fleet offers 7.1.x as the latest version on Kibana 9.4/9.5, so users on those versions had no fixed version to upgrade to. This releases it as 7.1.6 (kibana: ^9.4.0).

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  1. Build and install the AWS package from this branch.
  2. Edit an AWS CloudWatch metrics integration. In Advanced options, turn Include Linked Accounts off and save.
  3. Confirm the rendered agent config contains include_linked_accounts: false for that stream.
  4. Leave another AWS metrics stream at the default and confirm it still contains include_linked_accounts: true.

Related issues

Copilot AI balanced review requested due to automatic review settings October 13, 2026 10:06
@MichaelKatsoulis
MichaelKatsoulis requested review from a team as code owners October 13, 2026 10:06
@MichaelKatsoulis
MichaelKatsoulis changed the base branch from main to backport-aws-7.1 October 13, 2026 10:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changelog still contains a placeholder PR URL that must be replaced before release.

1 open finding
What changed in this PR

Backports the AWS linked-account toggle fix to package 7.1.6 for Kibana 9.4/9.5.

Changes:

  • Always renders include_linked_accounts across all 24 metrics streams.
  • Keeps owning_account conditional.
  • Bumps the package and changelog version to 7.1.6.

Contributor tooling: If needed, install integration-skills@elastic-integration-skills.

File Description
packages/​aws/​manifest.yml Bumps version to 7.1.6.
packages/​aws/​changelog.yml Adds the 7.1.6 bug-fix entry.
packages/​aws/​data_stream/​apigateway_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​billing/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​cloudwatch_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​dynamodb/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​ebs/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​ec2_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​ecs_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​elb_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​emr_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​firewall_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​kafka_metrics/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​kinesis/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​lambda/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​natgateway/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​rds/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​redshift/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​s3_daily_storage/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​s3_request/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​s3_storage_lens/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​sns/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​sqs/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​transitgateway/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​usage/​agent/​stream/​stream.yml.hbs Always renders the option.
packages/​aws/​data_stream/​vpn/​agent/​stream/​stream.yml.hbs Always renders the option.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/aws/changelog.yml Resolved
Copilot AI balanced review requested due to automatic review settings October 13, 2026 10:08
@github-actions

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The backport consistently applies the established fix across all 24 affected streams with matching version and changelog updates.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ Package owners are in sync with main.

@qcorporation qcorporation added bugfix Pull request that fixes a bug issue Integration:aws AWS Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Oct 13, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@vera-review-bot

Copy link
Copy Markdown
Contributor

Review summary

Issues found across the latest commits 8da7321 — 1 low

Package-level:

  • 🔵 Proposed commit message

    aws: always render include_linked_accounts in metrics stream templates
    
    The include_linked_accounts key in the 24 AWS metrics stream templates
    was wrapped in an if block on its own value, so turning the Include
    Linked Accounts toggle off omitted the key instead of writing false.
    The aws metricset in Beats treats a missing key as true, so linked-account
    collection could not be disabled. The key is now rendered unconditionally,
    while owning_account is still only rendered when include_linked_accounts
    is true.
    
    This backports the fix from 8.7.1 and 6.22.1 to the 7.1 line as 7.1.6,
    because 8.x requires Kibana ^9.6.0 and Fleet offers 7.1.x as the latest
    version on Kibana 9.4 and 9.5.
    
    Relates #​21627
    

A new commit triggers another review — at most once every 15 minutes. I skip the PR while it's approved or has merge conflicts.

🤖 AI-Generated Review | Vera Review Bot - v0.4.3 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package aws 👍(9) 💚(2) 💔(11)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
firewall_logs 5076.14 3174.6 -1901.54 (-37.46%) 💔
guardduty 1901.14 1303.78 -597.36 (-31.42%) 💔
inspector 1680.67 1175.09 -505.58 (-30.08%) 💔
rds 37037.04 22727.27 -14309.77 (-38.64%) 💔
apigateway_logs 21276.6 14285.71 -6990.89 (-32.86%) 💔
securityhub_insights 1270.65 848.18 -422.47 (-33.25%) 💔
cloudfront_logs 4032.26 2083.33 -1948.93 (-48.33%) 💔
cloudtrail 2976.19 2145.92 -830.27 (-27.9%) 💔
cloudwatch_logs 166666.67 90909.09 -75757.58 (-45.45%) 💔
ec2_logs 40000 31250 -8750 (-21.88%) 💔
emr_logs 30303.03 19230.77 -11072.26 (-36.54%) 💔

To see the full report comment with /test benchmark fullreport

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

@MichaelKatsoulis
MichaelKatsoulis enabled auto-merge (squash) October 19, 2026 10:51
@MichaelKatsoulis
MichaelKatsoulis merged commit 2b88bfd into elastic:backport-aws-7.1 Oct 21, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Changelog sync PR created: #22097

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package aws - 7.1.6 containing this change is available at https://epr.elastic.co/package/aws/7.1.6/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:aws AWS Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants