Add new examples from pulumi/guides - #2995
Conversation
Adds aws-ts-ai-app-infrastructure, aws-ts-landing-zone, aws-ts-production-observability, and aws-ts-serverless-react-postgres, and lists them in the AWS/TypeScript section of the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d-to-end - index.ts: default Aurora PostgreSQL 16.4 is no longer offered; use 16.8. - edge.ts: add HTTPS egress so the VPC Lambda can reach Secrets Manager (its GetSecretValue call otherwise hangs until the function times out). - api/src/index.ts: parse the secret JSON and use DATABASE_URL instead of passing the whole JSON blob to pg as a connection string. - database.ts: use sslmode=no-verify; modern pg treats sslmode=require as verify-full and fails against Aurora's RDS CA cert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jkodroff
left a comment
There was a problem hiding this comment.
Approved with suggestions - this doesn't make anything worse, but I think these examples could be made more rigorous (possibly as a follow-up, since right now we're probably just trying to get things in the right place).
| 1. [Configure your AWS credentials](https://www.pulumi.com/docs/intro/cloud-providers/aws/setup/) | ||
| 1. [Install Node.js](https://www.pulumi.com/docs/intro/languages/javascript/) | ||
|
|
||
| ## Deploying and running the program |
There was a problem hiding this comment.
I'd love for us to stop repeating these everywhere. The super beginner-oriented instructions really only have value for people who are totally new to Pulumi. You learn these pretty quickly.
There was a problem hiding this comment.
Yeah, this is a great candidate for templatizing, much like what you're doing in the Registry now with config. We can easily discern this from the project config, and should be relatively easy to apply uniformly too. I'll file a follow-up for it.
…r, drop deploy buttons - landing-zone: rebuild the VPC on awsx.ec2.Vpc across three AZs (replaces the hand-rolled subnets/route-tables/NAT), and note in the README + docstring that this is an illustrative, not production-ready, landing zone. - production-observability: rename the Observability component to ObservableLambda so the name describes what it provisions. - Remove the "Deploy this example with Pulumi" buttons from the four new READMEs; Dev Center templates these in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extend pulumi.ComponentResource, parent every child resource to the component, and register the outputs, so the landing zone nests under a single logical resource in the CLI/Console like the other components in these examples. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Folds content from several handwritten registry how-to guides into their corresponding pulumi/examples entries, ahead of retiring those guides in favor of Dev Center (examples auto-flow into the Examples collection there). Companion to #2995. New example: - `aws-ts-s3-folder-component` — the TypeScript component version of the S3 static-website example, filling the gap left by the removed `aws-js-s3-folder-component`. Type-checks clean. README enrichments (light — only where the guide had unique content the example README lacked): - `aws-ts-thumbnailer` — architecture summary + YouTube walkthrough link - `aws-ts-eks-migrate-nodegroups` — Day-2 migration context (create-before-delete + HA settings) - `azure-py-aks` — Azure AD propagation-delay retry note - `kubernetes-ts-configmap-rollout` — why Pulumi triggers a rollout where kubectl doesn't - `kubernetes-ts-guestbook` — TypeScript-vs-YAML framing - `gcp-py-webserver`, `gcp-go-webserver` — one-line overview of what's deployed The remaining example-able guides needed no change; their READMEs already cover the material. Migration guides and true tutorials are handled separately. Draft: examples haven't all been run end-to-end yet. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Josh Kodroff <jkodroff@users.noreply.github.com>
Adds four AWS TypeScript examples adapted from the Pulumi Guides solutions, listed in the AWS/TypeScript section of the README:
aws-ts-ai-app-infrastructure— a Lambda Function URL that invokes an Amazon Bedrock model, scoped to least privilege.aws-ts-landing-zone— a single-account landing zone (two-AZ VPC, KMS key, VPC flow logs, deployer/read-only roles, encrypted CloudTrail) that downstream stacks reference.aws-ts-production-observability— baseline Lambda monitoring: log retention, SNS alerting, error/latency alarms, a CloudWatch dashboard, and X-Ray tracing.aws-ts-serverless-react-postgres— a React SPA on CloudFront with a same-origin Lambda API and a private Aurora Serverless v2 (PostgreSQL) database, layered on the landing-zone example via a StackReference.All four type-check; the serverless website and API bundles build. Not wired into
misc/test.--
Note for reviewers: This brings the four highest-performing "solutions" from https://pulumi.com/guides into this repo so we can retire /guides (it's being replaced with the new Dev Center), but still keep the little bit of SEO goodness it's built up so far. (By adding these as examples, they'll automatically flow into the Examples collection in the Dev center.)
All four verified deployed successfully.