AWS Managed Services
Deploy the Observability Stack to AWS using managed services. This creates the same observability platform as the local Docker Compose stack, backed by:
- Amazon OpenSearch Service or Amazon OpenSearch Serverless — logs, traces, and service map storage
- Amazon Managed Service for Prometheus — time-series metrics
- Amazon OpenSearch Ingestion (OSIS) — OTLP ingestion pipeline (replaces OTel Collector + Data Prepper)
- OpenSearch Dashboards — visualization and exploration
How it works
Section titled “How it works”
Applications, AI agents and infrastructure send OTLP from any OpenTelemetry SDK or Collector to the ingestion pipeline. The pipeline writes logs and traces to OpenSearch and metrics to Prometheus. OpenSearch UI queries both. The diagram shows the Serverless backend; with a managed domain, logs and traces go to the domain instead.
Choose an OpenSearch backend
Section titled “Choose an OpenSearch backend”| Managed (AOS) | Serverless (AOSS) | |
|---|---|---|
| Scaling | Fixed instance count | Auto-scales with OCU |
| Authentication | IAM (SigV4) + FGAC; the deploying IAM role or user is the FGAC master user | IAM only |
| Index management | Built-in index types | Explicit index templates |
| Best for | Predictable workloads, fine-grained control | Variable workloads, zero cluster management |
Both backends use the same OSIS ingestion pipeline and Prometheus workspace. The choice only affects the OpenSearch storage layer.
Choose a deployment method
Section titled “Choose a deployment method”CLI installer
Section titled “CLI installer”Interactive single-command deploy. Creates all resources, configures dashboards, and optionally launches an EC2 instance running the OpenTelemetry Demo for sample telemetry.
Managed (default):
npx @opensearch-project/observability-stackServerless:
npx @opensearch-project/observability-stack --serverlessTakes ~15 minutes. See aws/cli-installer/README.md for full options.
Deploy into a VPC
Section titled “Deploy into a VPC”Pass --vpc-id with --subnet-ids and --security-group-ids to place the OpenSearch domain, the OSIS ingestion pipeline, and the EC2 demo instance inside a VPC on private endpoints. Omit --vpc-id and you get the default public-endpoint deployment. VPC mode requires the managed backend.
npx @opensearch-project/observability-stack --advanced --managed \ --pipeline-name obs-stack \ --region us-east-1 \ --os-domain-name obs-stack \ --vpc-id vpc-xxxxxxxx \ --subnet-ids subnet-aaaa,subnet-bbbb \ --security-group-ids sg-xxxxxxxxUse this when your telemetry sources (EKS, ECS, EC2) run inside a VPC and you want the OpenSearch stack in the same network boundary.
- Pass 1-3 subnets, each in a distinct AZ. With more than one subnet the domain is created zone-aware and the pipeline attaches to the first two.
- Security groups must allow the intra-VPC traffic between the pipeline, domain, and demo instance. A single group that allows traffic from itself works.
- The installer validates the VPC, subnets, and security groups against the EC2 Describe APIs before creating anything, so wrong network inputs fail in seconds rather than partway through domain or pipeline creation.
In interactive mode, advanced mode adds a Network topology step where you pick public endpoints or a VPC, then select subnets and security groups from your account.
Some loading time is cut from the video.
Infrastructure as code using AWS CDK. Deploys one CloudFormation stack, ObsStack-<stackName>, with the OpenSearch domain (or serverless collection), Prometheus workspace, OSIS pipeline, dashboards and optional demo workload, in about 25 minutes. The stack is listed on the Observability stack page of the Amazon OpenSearch Service console.
Managed (default):
cd aws/cdknpm installcdk deploy -c stackName=mystackServerless:
cd aws/cdknpm installcdk deploy -c stackName=mystack --context opensearchType=serverlessWithout the demo workload: add --context enableDemo=false to either command.
See aws/cdk/README.md for configuration, architecture details, and SigV4 telemetry setup.
Sending telemetry
Section titled “Sending telemetry”Both methods create an OSIS ingestion endpoint that accepts OTLP data. Configure your OpenTelemetry Collector to export using SigV4 authentication:
extensions: sigv4auth: region: us-west-2 service: osis
exporters: otlphttp/logs: logs_endpoint: ${OSIS_ENDPOINT}/v1/logs auth: { authenticator: sigv4auth } compression: none otlphttp/traces: traces_endpoint: ${OSIS_ENDPOINT}/v1/traces auth: { authenticator: sigv4auth } compression: none otlphttp/metrics: metrics_endpoint: ${OSIS_ENDPOINT}/v1/metrics auth: { authenticator: sigv4auth } compression: noneThe IAM principal sending data needs osis:Ingest permission on the pipeline ARN.
For a VPC deployment the ingest endpoint is VPC-private, so your collector must run inside the VPC (or reach it over peering/Transit Gateway). A VPC OSIS endpoint also takes ~10-15 minutes after the pipeline reports ACTIVE before it serves requests; until then connections close with no HTTP response. This is AWS-side ingestion warmup, not a configuration problem.
Agent evaluation results
Section titled “Agent evaluation results”Both methods set up storage for agent evaluation results (gen_ai.evaluation.result log events). The pipeline routes those events, and only those, to the evaluation index. Every other log still goes to logs-otel-v1:
route: - logs: 'getEventType() == "LOG" and /eventName != "gen_ai.evaluation.result"' - evaluations: 'getEventType() == "LOG" and /eventName == "gen_ai.evaluation.result"'| Managed (AOS) | Serverless (AOSS NextGen time series collection) | |
|---|---|---|
| Written to | Write alias otel-v1-genai-evaluation over otel-v1-genai-evaluation-000001, -000002, … | One index, otel-v1-genai-evaluation |
| Created by | Before the pipeline exists: the CLI installer, or a CDK custom resource. Both create the ISM policy otel-v1-genai-evaluation-policy, the index template otel-v1-genai-evaluation-index-template, and the first index with the write alias | The pipeline sink, on first write, from the template in the pipeline configuration (template_content, with index.timestamp_field: time) |
| Lifecycle | ISM rollover at 50 GB or 24 hours, deleted after 7 days (CLI --evaluation-retention-days, CDK -c evaluationRetentionDays=<days>; 0 keeps them) | No ISM and no rollover. Retention comes from the collection’s data lifecycle policy |
- OpenSearch Ingestion cannot create ISM policies or aliases, which is why the installer and the CDK create them first.
- The evaluation sink in both pipelines carries the whole evaluation template inline (
index_type: custom,template_type: index-template,template_content). It is the same JSON as the local stack’s template. On a managed domain it is a fallback: if the alias does not exist when the pipeline first writes, the sink creates a concreteotel-v1-genai-evaluationindex with the evaluation mappings and no rollover. - The CLI installer does not create the alias for a VPC domain, because it cannot reach the domain from outside the VPC. The pipeline then creates the concrete index. To use rollover there, create the policy, template and first index from OpenSearch UI Dev Tools before the pipeline first writes.
- If the index step fails, the installer prints a warning and continues. To move a concrete index to the alias later, see Migrate from the logs index.
The eventName route needs a Data Prepper version that stores the OTLP event name (data-prepper#7148, Data Prepper 2.17.0). With an older version, results stay in logs-otel-v1.
Send results from the SDK to the pipeline’s ingest endpoint and path, signed with SigV4:
register( endpoint="https://<ingest-endpoint>/<pipeline-name>", # the SDK appends /v1/traces and /v1/logs sigv4={"service": "osis", "region": "us-west-2"}, service_name="my-agent",)Query the results through the index pattern otel-v1-genai-evaluation*. See Data Model & Ingestion for the template and the attributes.
Cleanup
Section titled “Cleanup”CLI installer:
node bin/cli-installer.mjs destroy --pipeline-name obs-stack --region us-west-2The destroy command automatically detects and cleans up both managed domains and serverless collections associated with the pipeline name.
CDK:
cd aws/cdkcdk destroy -c stackName=mystack