AWS F# Lambda web server
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set aws-fs-lambda-webservercd pulumi-examples/aws-fs-lambda-webserverThis example creates a web server in AWS Lambda using the Giraffe web server.
Prerequisites#
Deploying the example#
-
Create a new stack:
Terminal window pulumi -C ./pulumi stack init dev -
Set the AWS region to deploy into:
Terminal window pulumi -C ./pulumi config set aws:region us-west-2 -
Build and publish the Lambda function, making the output available to the Pulumi program:
Terminal window dotnet publish ./LambdaWebServer -
Deploy the stack, which archives the published function output and creates the Lambda:
Terminal window pulumi up -C ./pulumi -
In a browser, navigate to the URL for
websiteUrl. You should see the welcome message.
Cleaning up#
Once you’re finished experimenting, tear down your stack’s resources by destroying and removing it:
pulumi destroy -C ./pulumipulumi stack rm -C ./pulumi