Skip to main content

Genkit AWS Plugin

AWS observability integration for Genkit, enabling telemetry export to AWS X-Ray (distributed tracing) and CloudWatch (metrics/logs).

Installation

pip install genkit-plugin-aws

Quick Start

from genkit.plugins.aws import add_aws_telemetry

# Enable AWS X-Ray telemetry (uses AWS_REGION env var)
add_aws_telemetry()

# Or with explicit region
add_aws_telemetry(region='us-west-2')

Configuration

Environment Variables

Variable Description
AWS_REGION AWS region for X-Ray endpoint (required)
AWS_DEFAULT_REGION Fallback region if AWS_REGION not set
AWS_ACCESS_KEY_ID AWS access key (or use IAM role)
AWS_SECRET_ACCESS_KEY AWS secret key (or use IAM role)

Options

add_aws_telemetry(
    region='us-west-2',          # AWS region (or use AWS_REGION env var)
    log_input_and_output=False,  # Set True to disable PII redaction
    force_dev_export=True,       # Export even in dev environment
    disable_traces=False,        # Set True to disable tracing
)

IAM Permissions

The following IAM permissions are required:

For Traces (X-Ray)

Attach the AWSXrayWriteOnlyPolicy managed policy, or create a custom policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "xray:PutTraceSegments",
                "xray:PutTelemetryRecords"
            ],
            "Resource": "*"
        }
    ]
}

Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                           AWS Plugin                                    │
├─────────────────────────────────────────────────────────────────────────┤
│  Plugin Entry Point (__init__.py)                                       │
│  └── add_aws_telemetry() - Enable X-Ray/CloudWatch export               │
├─────────────────────────────────────────────────────────────────────────┤
│  telemetry/tracing.py - Distributed Tracing                             │
│  ├── AWS X-Ray OTLP exporter configuration                              │
│  ├── SigV4 authentication for AWS endpoints                             │
│  ├── AwsXRayIdGenerator for X-Ray-compatible trace IDs                  │
│  └── OpenTelemetry integration                                          │
└─────────────────────────────────────────────────────────────────────────┘

Data Flow:
┌──────────────┐    ┌──────────────┐    ┌──────────────────────┐
│ Genkit App   │───►│ OpenTelemetry│───►│ AWS Observability    │
│ (actions,    │    │ SDK + ADOT   │    │ (X-Ray, CloudWatch)  │
│  flows)      │    └──────────────┘    └──────────────────────┘
└──────────────┘

AWS Documentation

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genkit_plugin_aws-0.5.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genkit_plugin_aws-0.5.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file genkit_plugin_aws-0.5.0.tar.gz.

File metadata

  • Download URL: genkit_plugin_aws-0.5.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for genkit_plugin_aws-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f92f4d7289dbefb2730452f147dbce468253e1dc09bd3a7a3b597a002275a638
MD5 83dfb99f74fcb478dea2d4e05778a56f
BLAKE2b-256 1bbc0826f9e29f5a1abe52e0bcf38d615effeb0376b1d4c950b7a32d2e347a14

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_aws-0.5.0.tar.gz:

Publisher: publish_python.yml on firebase/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkit_plugin_aws-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genkit_plugin_aws-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34d9508af4cf6c9e3acd1559df87e127d6f918dadcba2443a02ffe6c2e874c99
MD5 5d382f34de1cb89d3686640c4acfb165
BLAKE2b-256 81ef3de85068a088833a6170de2762ce5463719a000b947a916fdd4b37f4ee73

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit_plugin_aws-0.5.0-py3-none-any.whl:

Publisher: publish_python.yml on firebase/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page