access temporarily with someone else in your team.Using other authentication methods like IAM role, Session Token, or Federation Token will automatically generate and refresh STS tokens for clients upon request.

An AWS region is required and the connector may only be used to access AWS resources in the specified region.

Fetching STS tokens from the local AWS CLI is possible if the AWS CLI is already configured with valid credentials. In our example, the connectors AWS CLI profile is configured with an IAM user Secret Key. We need to force the ZenML CLI to use the STS token authentication by passing the --auth-method sts-token option, otherwise it would automatically use the session token authentication method:

AWS_PROFILE=connectors zenml service-connector register aws-sts-token --type aws --auto-configure --auth-method sts-token

Example Command Output

⠸ Registering service connector 'aws-sts-token'...

Successfully registered service connector `aws-sts-token` with access to the following resources:

┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃     RESOURCE TYPE     │ RESOURCE NAMES                               ┃

┠───────────────────────┼──────────────────────────────────────────────┨

┃    🔶 aws-generic     │ us-east-1                                    ┃

┠───────────────────────┼──────────────────────────────────────────────┨

┃     📦 s3-bucket      │ s3://zenfiles                                ┃

┃                       │ s3://zenml-demos                             ┃

┃                       │ s3://zenml-generative-chat                   ┃

┠───────────────────────┼──────────────────────────────────────────────┨

┃ 🌀 kubernetes-cluster │ zenhacks-cluster                             ┃

┠───────────────────────┼──────────────────────────────────────────────┨

┃  🐳 docker-registry   │ 715803424590.dkr.ecr.us-east-1.amazonaws.com ┃

┗━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛