Skip to content

fix: handle SchemaRegistryURI that resolves to a string in MSK and SelfManagedKafka events - #4029

Merged
Vandita2020 merged 1 commit into
aws:developfrom
Vandita2020:correct-intrinsic-value
Nov 3, 2026
Merged

Vandita2020 merged 1 commit into
aws:developfrom
Vandita2020:correct-intrinsic-value

Conversation

@Vandita2020

Copy link
Copy Markdown
Contributor

Issue #, if available

Description of changes

When SchemaRegistryConfig.SchemaRegistryURI is a Ref to a template parameter that has a value
(passed in or from Default), the intrinsics resolver returns a plain string. The code in
PullEventSource.get_schema_registry_permissions then called .get("Fn::Sub") on that string and
the transform failed with AttributeError: 'str' object has no attribute 'get'.

The resolved value is now handled as either a string or a dict:

  • string: used as the registry ARN, so Glue permissions are generated for Glue registry ARNs
  • dict (e.g. Fn::Sub): same behavior as before

Applies to both MSK and SelfManagedKafka events.

Description of how you validated changes

  • Unit tests in test_msk_event_source.py and test_self_managed_kafka_event_source.py for
    SchemaRegistryURI as Ref to a Glue ARN parameter, Ref to a non-Glue URL parameter,
    Ref to an unresolved parameter, Ref to a resource, Fn::GetAtt and Fn::Sub.
  • New transform test function_with_kafka_schema_registry_uri_ref_to_parameter (aws, aws-cn,
    aws-us-gov).
  • The new tests that exercise the bug fail without the pull.py change and pass with it.
  • tests/model, tests/schema and tests/translator pass.

Checklist

  • Add/update transform tests
    • Using correct values
    • Using wrong values
  • Add/update integration tests

Examples?

N/A

@Vandita2020
Vandita2020 requested a review from a team as a code owner November 3, 2026 01:16
@Vandita2020
Vandita2020 added this pull request to the merge queue Nov 3, 2026
Merged via the queue into aws:develop with commit 69e2756 Nov 3, 2026
9 checks passed
@Vandita2020
Vandita2020 deleted the correct-intrinsic-value branch November 3, 2026 19:13
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.

3 participants