Skip to content

(bedrock-agentcore-alpha): support service/region in IAM credential provider for gateway targets #37696

@badmintoncryer

Description

@badmintoncryer

Describe the feature

Add optional service / region arguments to GatewayCredentialProvider.fromIamRole().

GatewayCredentialProvider.fromIamRole({ service: 'bedrock-runtime', region: 'us-east-1' });

Use Case

coverage: missing feature

The L1 IamCredentialProvider (service / region) already exists, but the L2 alpha only emits credentialProviderType: 'GATEWAY_IAM_ROLE' and cannot specify the SigV4 signing service / region. Needed for cross-region calls and for targets where the service can't be inferred from the URL.

Proposed Solution

Add optional props (service?, region?) to fromIamRole(). Zero-arg call keeps existing behavior.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS CDK Library version (aws-cdk-lib)

2.251.0

AWS CDK CLI version

2.1119.0

Environment details (OS name and version, etc.)

all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions