README.md

Serverless URL Shortener with Redis Cache

A sample URL shortener SPA that uses the high-level cloud.Table and cloud.API components. The example shows to combine serverless functions along with containers. This shows that you can create your own cloud.*-like
abstractions for your own use, your team's, or to share with the community using your language's package manager.

Deploying and running the program

Note: some values in this example will be different from run to run. These values are indicated
with ***.

Create a new stack:

$ pulumi stack init url-cache-testing

Set AWS as the provider:

$ pulumi config set cloud:provider aws

Configure Pulumi to use AWS Fargate, which is currently only available in us-east-1, us-east-2, us-west-2, and eu-west-1:

Set a value for the Redis password. The value can be an encrypted secret, specified with the --secret flag. If this flag is not provided, the value will be saved as plaintext in Pulumi.url-cache-testing.yaml (since url-cache-testing is the current stack name).

$ pulumi config set --secret redisPassword S3cr37Password

Restore NPM modules via npm install or yarn install.

Preview and run the deployment via pulumi up. The operation will take about 5 minutes to complete.