# Example Deployment
A deployment example is available in the Lamb-duh project's ./example directory.
AWS Configuration Required
Before trying this example, make sure you have completed configuring AWS for Lamb-duh, either via the CLI utility automated method or the manual method
API Example
This example deploys a REST API
# What's in the example?
The example contains:
- A file to deploy to S3 (
./src/frontend/index.html
) - A file to deploy as a Lambda function (
./src/backend/functions/hello-world.js
) - An incomplete JSON configuration file template (
./src/template.lamb-duh.configuration.json
) - A
./createDeployment.js
script that will generate a complete configuration, based on your own S3 bucket and IAM role, and generate a deployable archive./example.zip
# Try the example
# Prepare an archive
cd
to the ./example directory
node createDeployment.js
- You will be asked for an S3 bucket where the S3 task will deploy to
- This is optional. If you skip it, the S3 task will be left out of the resulting configuration
- You will also be asked for a key prefix, if you so choose to include one
- You will be asked for an IAM role ARN to be used to run a Lambda function
File Generation
A lamb-duh.configuration.json file will be generated, as will an example.zip file
- Review the final
./src/lamb-duh.configuration.json
file to see how its construction relates to the files in./src
# Deploy via Lamb-duh
- Deploy
./example.zip
to see what's creating in S3, Lambda, and API Gateway
Deployment options
The archive can be deployed by configuring and running the CLI utility deployment, or just copying the archive file to your trigger S3 bucket via the AWS Console
Check the results
View your AWS resources (S3, Lambda, API Gateway) to see what was deployed.
By default, example.zip will be stored using Lamb-duh's historical storage. See history for more details.