Skip to content

fix: support custom AWS regions in AWS UDFs#2790

Merged
daryllimyt merged 1 commit into
mainfrom
fix/aws-udf-region-min-executor
Jun 2, 2026
Merged

fix: support custom AWS regions in AWS UDFs#2790
daryllimyt merged 1 commit into
mainfrom
fix/aws-udf-region-min-executor

Conversation

@tracerat
Copy link
Copy Markdown
Contributor

@tracerat tracerat Bot commented May 29, 2026

Summary

  • Re-add optional region_name overrides for generic AWS boto3 calls and Amazon S3 UDFs.
  • Pass the selected region into boto3/aioboto3 sessions and STS AssumeRole flows.
  • Keep executor changes minimal: only use configured AWS_REGION for host-side AWS role preprocessing, avoiding broad action-argument plumbing.
  • Regenerate AWS tool docs and add targeted unit coverage.

Testing

  • uv run ruff check packages/tracecat-registry/tracecat_registry/integrations/aws_boto3.py packages/tracecat-registry/tracecat_registry/integrations/amazon_s3.py tracecat/executor/secret_preprocessors.py tests/unit/test_aws_assume_role.py tests/unit/test_executor_aws_assume_role.py
  • uv run basedpyright packages/tracecat-registry/tracecat_registry/integrations/aws_boto3.py packages/tracecat-registry/tracecat_registry/integrations/amazon_s3.py tracecat/executor/secret_preprocessors.py tests/unit/test_aws_assume_role.py tests/unit/test_executor_aws_assume_role.py
  • uv run pytest --confcutdir=tests/unit tests/unit/test_aws_assume_role.py tests/unit/test_executor_aws_assume_role.py -q
  • uv run python scripts/generate_tool_docs.py --check
  • git diff --check

Summary by cubic

Adds per-call AWS region support to AWS UDFs and ensures STS AssumeRole uses the selected region. This lets workflows target GovCloud and other regions without changing global secrets.

  • New Features
    • Added optional region_name to tools.aws_boto3.call_api and call_paginated_api, and S3 actions (call_method, get_object, get_objects, list_objects, copy_objects, put_object, delete_object). Passed through to aioboto3/boto3 sessions and clients.
    • STS AssumeRole now respects the region in both async/sync paths. Executor forwards the AWS_REGION secret to IRSA STS role preprocessing.
    • Updated tool docs for aws_boto3 and amazon_s3. Added targeted unit tests.

Written for commit c28c2bd. Summary will update on new commits.

Review in cubic

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 29, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tracecat 🟢 Ready View Preview May 29, 2026, 11:40 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@daryllimyt
Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@daryllimyt daryllimyt merged commit edf02b4 into main Jun 2, 2026
17 checks passed
@daryllimyt daryllimyt deleted the fix/aws-udf-region-min-executor branch June 2, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant