Skip to content

Comments

feat(services/aws-v4): Add direct configuration support to ECSCredentialProvider#598

Merged
Xuanwo merged 2 commits intoapache:mainfrom
jackye1995:feat/ecs-direct-config
Aug 26, 2025
Merged

feat(services/aws-v4): Add direct configuration support to ECSCredentialProvider#598
Xuanwo merged 2 commits intoapache:mainfrom
jackye1995:feat/ecs-direct-config

Conversation

@jackye1995
Copy link
Contributor

Summary

  • Added direct configuration support to ECSCredentialProvider via new builder methods
  • Configuration via builder methods takes precedence over environment variables
  • Maintained backward compatibility with existing environment variable approach

New Builder Methods

  • with_relative_uri(): Configure relative URI for ECS environments
  • with_auth_token_file(): Set path to authorization token file
  • with_metadata_uri_override(): Override base metadata endpoint for relative URIs

Benefits

  • Enables programmatic configuration without relying on environment variables
  • Useful for containerized environments where setting env vars may not be practical
  • Provides more flexible credential configuration options
  • Addresses the need to supply AWS_CONTAINER_CREDENTIALS_RELATIVE_URI, AWS_CONTAINER_CREDENTIALS_FULL_URI, or AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE externally

Test Plan

  • Added comprehensive unit tests for all new configuration methods
  • Tested priority order: direct config > environment variables
  • Verified backward compatibility with existing environment variable usage
  • All existing tests continue to pass

🤖 Generated with Claude Code

jackye1995 and others added 2 commits August 22, 2025 19:59
…ialProvider

Allow ECSCredentialProvider to be configured directly via builder methods
instead of relying solely on environment variables. Direct configuration
takes precedence over environment variables.

New builder methods:
- with_relative_uri(): Configure relative URI for ECS environments
- with_auth_token_file(): Set path to authorization token file
- with_metadata_uri_override(): Override base metadata endpoint

This enables programmatic configuration of ECS credentials, making it
easier to use in containerized environments where environment variables
may not be practical or desired.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@jackye1995
Copy link
Contributor Author

@Xuanwo if you can take a look at this

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

@Xuanwo Xuanwo merged commit 28b8bf5 into apache:main Aug 26, 2025
37 checks passed
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.

2 participants