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
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.
    • Expanded tests to cover new region suffixes and null cases.

@coderabbitai
Copy link

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: 749902f9-a429-4de8-be8d-0d17ec8152b1

📥 Commits

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

📒 Files selected for processing (2)
  • src/aws/flb_aws_util.c
  • tests/internal/aws_util.c
✅ Files skipped from review due to trivial changes (1)
  • tests/internal/aws_util.c
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/aws/flb_aws_util.c

📝 Walkthrough

Walkthrough

Refactored AWS endpoint resolution in flb_aws_util.c to use a table-driven region-prefix → domain-suffix mapping, added null-guards returning NULL for missing inputs, and extended tests in tests/internal/aws_util.c to cover null parameters and additional 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 constants for multiple non-standard suffixes and null-guards to return NULL when service or region is NULL.
Tests: Endpoint Coverage
tests/internal/aws_util.c
Updated test_flb_aws_endpoint() to assert NULL returned for NULL inputs, refreshed China/EU-Sovereign expectations, and added assertions for S3 endpoints in C2S, SC2S, CSP, and ADC-E regions; paired flb_free() calls for allocated endpoints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • edsiper
  • niedbalski
  • patrick-stephens
  • sparrc
  • cosmo0920
  • celalettin1286

Poem

🐰✨ I hopped through suffix fields at dawn,
Replaced old checks with a tidy spawn,
Table matches first, no guesswork now,
Null-safe paths make the callers bow,
Suffixes lined up — hop, code, and yawn.

🚥 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 'aws: update support for additional regions' directly aligns with the core changes: adding new AWS endpoint suffixes and region prefix mappings to support additional 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 March 26, 2026 16:36
- 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