Skip to content

feat(aws-marketplace): gate Enterprise on the AWS Marketplace container license and add the EKS install profile - #9917

Merged
waleedlatif1 merged 3 commits into
stagingfrom
feat/aws-marketplace-container-license
Nov 12, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
feat/aws-marketplace-container-license

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • On a Marketplace install (AWS_MARKETPLACE_LICENSE_PRODUCT_SKU set), the container entrypoint reads the buyer's AWS License Manager licenses for this product before the server loads, with ListReceivedLicenses filtered to the product SKU and the AWS Marketplace issuer fingerprint. A license that License Manager reports AVAILABLE and that carries the enterprise_license entitlement sets ENTERPRISE_ENABLED and its browser twin, so every existing Enterprise gate reads the answer unchanged
  • The license is read, not checked out. A contract usually covers the deployment with one unit, so a checkout from every replica would make them compete for it, and a unit stuck after a failed check-in reads exactly like an expired license for an hour
  • No license, or a check that can't reach License Manager, leaves Sim running as the open-source core. It never stops serving
  • It re-checks every 15 minutes, the cadence AWS recommends for renewals, upgrades and cancellations. A definitive change (not a failed check) sends SIGTERM so Kubernetes restarts the pod in the right mode. Enterprise flags are read once at startup by the server and the browser, so a restart applies the change without rewriting any gate
  • Nothing runs without the SKU env var, so other self-hosted and cloud deployments are unaffected
  • New examples/values-aws-marketplace.yaml, the EKS profile the Marketplace chart ships as its defaults:
    • It runs only Sim's own images: app, realtime, migrations, and the cron image for scheduled jobs in place of curlimages/curl.
    • Bundled Postgres and Redis are off in favor of the buyer's RDS and ElastiCache, because AWS Marketplace hosts and scans every image a listing can deploy. The helm test busybox hook is off for the same reason.
    • Secrets come only from pre-created Kubernetes Secrets, never from values.
    • The ServiceAccount is annotated for IRSA.
  • New examples/aws-marketplace-prerequisites.yaml, a CloudFormation template for the buyer's account:
    • RDS for PostgreSQL 17, Multi-AZ and encrypted, with the master password managed in Secrets Manager.
    • Valkey with TLS and a generated auth token.
    • The IRSA role, allowed only license-manager:ListReceivedLicenses.
  • @aws-sdk/client-license-manager 3.1162.0, the same version as the other AWS clients. It goes through awsRequestHandler, so HTTPS_PROXY is honored

Type of Change

  • New feature

Testing

  • helm lint and helm template with the new profile, alone and with ci/default-values.yaml, the way the chart CI renders every example. Rendered images are only simstudioai/{simstudio,realtime,migrations,cron}
  • aws cloudformation validate-template and cfn-lint pass. cfn-lint's only warning is the major-only EngineVersion: '17', kept on purpose so RDS picks the current minor
  • bun run lint, plus check:egress-boundary, check:source-conventions, check:utils, check:file-names, check:comment-hygiene, check:explicit-any and check:boundaries. The full audits, type-check and tests run in CI
  • Chart version bumped to 1.11.15 for the chart-testing version check
  • The end-to-end proof comes after release: subscribe from an allowlisted account, install on EKS from the Marketplace registry, and confirm the license read turns Enterprise on

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 12, 2026 00:51
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 12, 2026 1:22am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Adds AWS Marketplace license checks before server startup and an EKS install profile backed by RDS and ElastiCache.

  • AWS Marketplace licenses now set Enterprise mode before Sim starts.
  • EKS Marketplace installs use Sim images and buyer-managed AWS services.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Boot[Container starts] --> Secrets[Load runtime secrets]
  Secrets --> SKU{Marketplace SKU set?}
  SKU -->|No| Server[Start server]
  SKU -->|Yes| Read[Read received licenses]
  Read --> Flags[Set Enterprise flags]
  Flags --> Server
  Flags --> Poll[Check every 15 minutes]
  Poll --> Changed{Definitive answer changed?}
  Changed -->|No or failed check| Poll
  Changed -->|Yes| Restart[Send SIGTERM; Kubernetes restarts container]
Loading

Reviews (3) · Last reviewed commit: "docs(aws-marketplace): say where the pro..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 7 files

Confidence score: 2/5

  • container-license.ts lets any individual Enterprise feature flag bypass the Marketplace check, so unlicensed customers may get Enterprise features. Make Marketplace license state authoritative over those flags.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/billing/aws-marketplace/container-license.ts">

<violation number="1" location="apps/sim/lib/billing/aws-marketplace/container-license.ts:44">
P1: The Marketplace check can be bypassed by setting any individual Enterprise feature flag, because this change only disables the master switch and feature flags explicitly override it. Make Marketplace license state the entitlement source for every Enterprise feature, or reject/clear per-feature overrides when the SKU is configured.</violation>
</file>

Turn on auto-fix | Re-trigger cubic

…, scope the IAM role to it, and bump the chart
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

…he RDS username tied to the template, and note why the license is read in the pod's Region
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 8 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 05a5990 into staging Nov 12, 2026
96 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/aws-marketplace-container-license branch November 12, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant