Deploy the Observability Stack on AWS managed services with a single command. Creates an OpenSearch domain (or serverless collection), OSIS ingestion pipeline, Amazon Managed Prometheus workspace, and a fully configured OpenSearch UI with dashboards — plus an EC2 instance running demo workloads that generate telemetry out of the box.
Managed domain (default):
npx @opensearch-project/observability-stackServerless collection (AOSS):
npx @opensearch-project/observability-stack --serverlessTakes ~15 minutes for managed, ~5 minutes for serverless. When complete, the CLI prints a dashboard URL — open it and you're in.
| Resource | Description |
|---|---|
| OpenSearch domain or serverless collection | Stores logs, traces, and service map data |
| OSIS pipeline | Ingests OTLP data (logs, traces, metrics) via SigV4 |
| Amazon Managed Prometheus | Stores time-series metrics |
| Connected Data Source (Prometheus) | Connects AMP to OpenSearch for metric queries |
| OpenSearch Application | UI with workspace, index patterns, correlations, dashboards |
| IAM roles | Pipeline role (OSIS → OpenSearch + AMP) and Connected Data Source role |
| EC2 instance (t3.xlarge) | Runs OTel Demo + example agents (29 containers generating telemetry) |
All resources are tagged with observability-stack:pipeline-name for identification and cleanup.
Create a managed domain deployment from scratch:
node bin/cli-installer.mjs --managed \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1Create a serverless (AOSS) deployment from scratch:
node bin/cli-installer.mjs --serverless \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1Reuse existing OpenSearch domain / AMP workspace:
node bin/cli-installer.mjs --managed \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1 \
--opensearch-endpoint https://search-your-domain-xxx.us-east-1.es.amazonaws.com \
--prometheus-url https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-xxx/api/v1/remote_writeSkip EC2 demo (just pipeline + UI, no demo workloads):
node bin/cli-installer.mjs --managed \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1 \
--skip-demoLaunch demo workload against an existing pipeline:
node bin/launch-demo.mjs \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1Interactive mode (TUI wizard):
node bin/cli-installer.mjsnode bin/cli-installer.mjs destroy \
--pipeline-name obs-stack-<your-alias> \
--region us-east-1Deletes: EC2 instance, OpenSearch Application, Connected Data Source, OSIS pipeline, IAM roles. OpenSearch domain and AMP workspace are preserved (shared resources).
- Node.js 18+
- AWS credentials configured (
aws sts get-caller-identityshould succeed) - IAM permissions: OSIS, OpenSearch, AMP, IAM role creation, EC2, SSM
- Index pattern fields need manual refresh — After data starts flowing, go to Management → Index Patterns → select pattern → click 🔄 to pick up new fields.
- Demo data takes 10-15 minutes — The EC2 instance needs time to bootstrap Docker, pull images, and start sending telemetry.
- Idempotent but not updateable — Running twice safely no-ops, but won't update existing resources with new config.
aws/cli-installer/
├── bin/
│ ├── cli-installer.mjs # Entry point (full pipeline)
│ └── launch-demo.mjs # Standalone EC2 demo launcher against an existing pipeline
├── src/
│ ├── main.mjs # CLI orchestration + executePipeline flow
│ ├── cli.mjs # Argument parsing + config
│ ├── aws.mjs # AWS resource creation (IAM, OSIS, Connected Data Source, Application)
│ ├── render.mjs # OSIS pipeline YAML generation
│ ├── opensearch-ui-init.mjs # OpenSearch UI setup (SigV4, workspace, dashboards)
│ ├── ec2-demo.mjs # EC2 demo workload launcher
│ ├── destroy.mjs # Resource teardown
│ ├── interactive.mjs # TUI wizard
│ ├── config.mjs # Defaults
│ ├── ui.mjs # Terminal UI helpers (spinners, boxes, theme)
│ ├── arch-image.mjs # Base64 architecture image for dashboard
│ └── commands/ # REPL commands (create, list, describe)
└── test/
└── unit.test.mjs # Unit tests (16 tests, 6 suites)
cd aws/cli-installer
node --test test/unit.test.mjs- SigV4 signing —
opensearch-ui-init.mjsuses@aws-sdk/signature-v4with serviceopensearch. Query params must be in thequeryproperty ofHttpRequest, not embedded in the path. - Idempotency — Every resource creation checks for existence first. Correlations use find-before-create; saved objects with fixed IDs are upserted.
- EC2 demo — User data script installs Docker + Compose, clones the repo, writes a managed-mode collector config, and starts workload services via
docker-compose.managed.yml.