Lambada is a very opinionated set of tools and frameworks put together to speed up developer productivity.
We believe in "true" Infrastructure as Code, Replicable development environments, Integration Testing, Security, and Serverless.
Let's say we want to put all these together:
We can get it in seconds with the following script:
const result = run(projectName, environment, {
endpointDefinitions: [
(context) => ({
path: '/todos',
method: 'GET',
callbackDefinition: async (event) => ({ result: [] }), // Just a callback with whatever data as body
resources: [{ // When we set access on a resource, we inject the env var with the final name
table: context.databases?.todos,
access: [ LambdaResourceAccess.DynamoDbQuery ],
}]
})
],
createOptionsForCors: true, // Want to have cors of all lambdas? Done
tables: {
'todos': {
name: 'todos', // Will have a final name of {name}-{environment}
primaryKey: 'userId',
rangeKey: 'id',
envKeyName: 'TODOS_TABLE_NAME' // To get the actual table name on runtime
}
},
cdn: {
useCDN: true // Want to have Cloudfront on top? Done
},
})
Running npm create @lambada
will bootstrap:
run
configuration with a health endpoint.