Skip to content

[Fix] Consolidate CDK deployment into single command, add AWS deployment options to docs website and README#159

Merged
ps48 merged 4 commits intoopensearch-project:mainfrom
kylehounslow:consolidate-cdk-deps
Apr 6, 2026
Merged

[Fix] Consolidate CDK deployment into single command, add AWS deployment options to docs website and README#159
ps48 merged 4 commits intoopensearch-project:mainfrom
kylehounslow:consolidate-cdk-deps

Conversation

@kylehounslow
Copy link
Copy Markdown
Collaborator

@kylehounslow kylehounslow commented Apr 6, 2026

Problem

The CDK Quick Start requires two separate npm install commands — one for the root and one for custom-resources/. These all serve the same goal (deploying AWS resources via CDK) and there is no technical reason for the split. Additionally, the root README has no mention of the AWS CLI installer or CDK deployment paths, and the docs website has no cloud deployment documentation.

Changes

CDK dependency consolidation:

  • Merged custom-resources/package.json dependencies into root package.json
  • Deleted custom-resources/package.json and package-lock.json
  • Updated CDK README Quick Start: two install commands → one

The custom resource Lambdas use CDK's NodejsFunction with esbuild bundling. esbuild resolves imports via standard Node module resolution (walks up to root node_modules). The separate package.json was unnecessary.

Dependencies moved to root: @aws-crypto/sha256-js, @aws-sdk/credential-provider-node, @aws-sdk/signature-v4, @smithy/protocol-http.

Dependencies dropped: @aws-sdk/client-opensearch, @aws-sdk/client-secrets-manager — excluded via externalModules: ['@aws-sdk/*'] in all Lambdas that use them, provided by the Node.js 22 Lambda runtime.

Root README:

  • Added Option 3: AWS Managed Services with component mapping table (local ↔ AWS managed equivalents)
  • Added CLI installer and CDK subsections with quick start commands

Docs website (Starlight):

  • Added new top-level "Deploy to Cloud" sidebar section between "Get Started" and "Send Data"
  • docs/deploy/index.md — Overview page comparing Kubernetes vs Managed Services deployment paths, with component mapping table
  • docs/deploy/aws.md — AWS Managed Services page with CLI installer and CDK instructions, SigV4 telemetry configuration, and cleanup commands
  • Sidebar structured to grow for future native Kubernetes/Helm, Azure, and GCP docs

Testing

  • cdk synth --all — all 4 Lambdas bundle successfully
  • cdk deploy --all — full end-to-end deploy in us-west-2, all custom resources CREATE_COMPLETE
  • cdk destroy --all — clean teardown
  • Docs site builds with all internal links valid (105 pages)

Merge custom-resources/package.json dependencies into the root
package.json and remove the separate package file. This simplifies
the Quick Start from two npm install commands to one.

The custom resource Lambda handlers use NodejsFunction with esbuild,
which resolves imports via standard Node module resolution — walking
up to the root node_modules works correctly.

Dependencies moved to root:
- @aws-crypto/sha256-js (bundled into UI Init Lambda)
- @aws-sdk/credential-provider-node (external, Lambda runtime)
- @aws-sdk/signature-v4 (bundled into UI Init Lambda)
- @smithy/protocol-http (bundled into UI Init Lambda)

Dependencies dropped (excluded via externalModules and provided by
Lambda Node.js 22 runtime):
- @aws-sdk/client-opensearch
- @aws-sdk/client-secrets-manager

Tested: cdk synth + full cdk deploy --all with all 4 custom resource
Lambdas (FGAC mapping, DQS datasource, OpenSearch App, UI Init)
completing successfully.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
@kylehounslow kylehounslow force-pushed the consolidate-cdk-deps branch from 040d935 to cc6bbe1 Compare April 6, 2026 18:50
Add a new top-level 'Deploy to Cloud' sidebar section with two pages:

- deploy/index.md: Overview comparing Kubernetes vs Managed Services
  deployment paths, with component mapping table and links
- deploy/aws.md: AWS Managed Services page with CLI installer and CDK
  instructions, SigV4 telemetry configuration, and cleanup commands

Update astro.config.mjs sidebar to place the new section between
'Get Started' and 'Send Data', structured to grow for future
Kubernetes/Helm, Azure, and GCP support.

Build passes with all internal links valid (105 pages).
Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Update component mapping table in both README and docs site to use
'OpenSearch UI' with the correct documentation link instead of
'OpenSearch Service Dashboards'.
Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.51%. Comparing base (34475bd) to head (2852cf0).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #159   +/-   ##
=======================================
  Coverage   18.51%   18.51%           
=======================================
  Files           3        3           
  Lines          54       54           
  Branches       18       18           
=======================================
  Hits           10       10           
  Misses         44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The repository does not currently contain a Helm chart directory.
Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
@kylehounslow kylehounslow force-pushed the consolidate-cdk-deps branch from 52d8fb4 to 2852cf0 Compare April 6, 2026 19:11
@kylehounslow kylehounslow changed the title Consolidate CDK package.json, add AWS deployment options to README Consolidate CDK deps, add AWS deployment docs to README and docs site Apr 6, 2026
@kylehounslow kylehounslow changed the title Consolidate CDK deps, add AWS deployment docs to README and docs site Consolidate CDK deployment into single command, add AWS deployment options to docs website and README Apr 6, 2026
@kylehounslow kylehounslow marked this pull request as ready for review April 6, 2026 19:31
@kylehounslow kylehounslow added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Apr 6, 2026
@@ -0,0 +1,29 @@
---
title: Deploy to Cloud
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this sounds a bit generic, should title mention AWS? i don't think other cloud providers have all the services we use

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call out. I gave this some thought before landing on this structure. The idea is for "Deploy to Cloud" to be a top-level section that grows over time (short term: native Kubernetes/Helm, and eventually long-term: other cloud providers). I don't want to limit to AWS only. The sidebar already scopes it: the only child page is "AWS Managed Services", so users land in the right place. When we add Helm or another provider later we just drop a new page under the same section without restructuring.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Despite not having all the services we use (mainly OSIS, AOS), an example of supporting other cloud providers could be native K8s / Helm but deployed on GKS or AKS.

| OpenSearch Dashboards | [OpenSearch UI](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/application.html) |

:::note
Native Kubernetes (Helm) deployment documentation is coming soon.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

@kylehounslow kylehounslow changed the title Consolidate CDK deployment into single command, add AWS deployment options to docs website and README [Fix] Consolidate CDK deployment into single command, add AWS deployment options to docs website and README Apr 6, 2026
@ps48 ps48 merged commit 00175d9 into opensearch-project:main Apr 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants