Skip to content

aws: update support for additional regions#11613

Open
ShelbyZ wants to merge 2 commits intofluent:masterfrom
ShelbyZ:aws-regions
Open

aws: update support for additional regions#11613
ShelbyZ wants to merge 2 commits intofluent:masterfrom
ShelbyZ:aws-regions

Conversation

@ShelbyZ
Copy link
Copy Markdown
Contributor

@ShelbyZ ShelbyZ commented Mar 23, 2026

  • add new endpoint suffixes
  • use mapping between region prefix to endpoint suffix
  • update flb_aws_endpoint to use new mapping
  • update test_flb_aws_endpoint to test additional regions

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [] Example configuration file for the change
  • [] Debug log output from testing the change
  • [] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Should work to expand changes merged into fluent/fluent-bit-docs#2507 to list out isolated region details.

Backporting

  • [] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • New Features

    • Added support for additional AWS region families, including government and specialized isolated cloud domains.
  • Bug Fixes

    • Improved endpoint resolution with a table-driven region→suffix mapping and a safe default.
    • Added null-parameter handling so missing inputs produce no endpoint.
  • Tests

    • Expanded tests to cover new region suffixes and null-input cases.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d83bb75e-c8f7-4827-a8f9-cc54de1ddec6

📥 Commits

Reviewing files that changed from the base of the PR and between 4673da7 and a3bea06.

📒 Files selected for processing (1)
  • src/aws/flb_aws_util.c
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/aws/flb_aws_util.c

📝 Walkthrough

Walkthrough

Refactors AWS endpoint resolution to use a table-driven region-prefix → domain-suffix mapping, adds null-guards returning NULL for missing service/region, introduces additional non-standard suffix constants, and extends tests to cover NULL inputs and more isolated-region suffixes.

Changes

Cohort / File(s) Summary
AWS Endpoint Resolution
src/aws/flb_aws_util.c
Replaced hard-coded special-case suffix logic with a table (endpoint_suffixes) of region-prefix → domain-suffix entries (first-match via strncmp). Added new suffix constants for non-standard regions and early null-guards to return NULL when service or region is missing.
Tests: Endpoint Coverage
tests/internal/aws_util.c
Updated test_flb_aws_endpoint() to assert NULL for NULL inputs, refreshed China/EU-Sovereign expectations, and added assertions for S3 endpoints in C2S, SC2S, CSP, and ADC-E isolated regions; ensured proper freeing of allocated endpoints.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • edsiper
  • patrick-stephens
  • sparrc
  • niedbalski

Poem

🐰 I hopped through suffix rows at play,
Matched prefixes first, sent hard-cases away,
Guarded the gaps so callers rest true,
New regions lined up — a tidy view,
Hop, free, test — code done, carrot stew.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—expanding AWS region support via new endpoint suffix mappings for isolated and non-standard regions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ShelbyZ added 2 commits April 13, 2026 22:27
- add new endpoint suffixes
- use mapping between region prefix to endpoint suffix
- update flb_aws_endpoint to use new mapping

Signed-off-by: Shelby Hagman <shelbyzh@amazon.com>
- update test_flb_aws_endpoint to test additional regions

Signed-off-by: Shelby Hagman <shelbyzh@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant