Releases: getlift/lift
1.7.0
This release introduces a brand new Server-Side Website construct 🎉
The server-side-website
construct deploys websites where the HTML is rendered "server-side", i.e. on AWS Lambda.
This is usually done with backend frameworks like Laravel/Symfony (PHP), Ruby on Rails, Django/Flask (Python), Express (Node), etc.
To build a SPA or static website, use the Static Website construct instead.
Quick preview:
service: my-app
provider:
name: aws
functions:
home:
handler: home.handler
events:
- httpApi: 'GET /'
# ...
constructs:
website:
type: server-side-website
assets:
'/css/*': public/css
'/js/*': public/js
plugins:
- serverless-lift
On serverless deploy
, the example above will set up a website that serves both:
https://<domain>/*
-> the website through API Gateway + Lambdahttps://<domain>/css/*
andhttps://<domain>/js/*
-> assets through S3
👉️ Learn more in the Server-Side Website documentation
1.6.0
This release exposes a new variable on static-website constructs:
cname
: the domain name of the resource, such asd111111abcdef8.cloudfront.net
This can be used to reference the bucket from Route53 configuration, for example:
constructs:
landing:
type: static-website
path: public
resources:
Resources:
Route53Record:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: ZXXXXXXXXXXXXXXXXXXJ # Your HostedZoneId
Name: app.mydomain
Type: A
AliasTarget:
HostedZoneId: Z2FDTNDATAQYW2 # Cloudfront Route53 HostedZoneId. This does not change.
DNSName: ${construct:landing.cname}
This paves the way for the integration of Route53 Zone management directly within the construct. If you want to know more, you can get involved in the corresponding discussion.
1.5.0
Lift constructs are designed to be functional out of the box.
This is why some constructs automatically add permissions to the Lambda functions deployed in the same serverless.yml
file.
Lift now allows to disable automatic IAM permissions generated by constructs:
# serverless.yml
lift:
automaticPermissions: false
1.4.0
Lift now exports Typescript definitions to be used in serverless.ts
.
In order to use those definitions, simply import them from Lift and use them in conjonction with official @serverless/typescript definitions.
import type { AWS } from '@serverless/typescript';
import type { Lift } from "serverless-lift";
const serverlessConfiguration: AWS & Lift = {
//...
1.3.0
This release provides a new Construct: Database - DynamoDB Single Table
constructs:
myTable:
type: database/dynamodb-single-table
This construct provision a DynamoDB table following Single Table Design best-practices: generic index attribute names, secondary indexes, table stream
Like all other Lift constructs, it provisions permissions for Lambda of the same stack to interact with the provisioned table and it exposes variables like tableName
and tableStreamArn
.
1.2.1
1.2.0
This release provides 2 new queue
commands:
serverless <construct-name>:logs
This command displays the logs of the Lambda "worker" function.
It is an alias to serverless logs --function <construct-name>Worker
and supports the same options, for example --tail
to tail logs live.
serverless <construct-name>:send
Send a message into the SQS queue.
This command can be useful while developing to push sample messages into the queue.
When the command runs, it will prompt for the body of the SQS message. It is also possible to provide the body via the --body="message body here"
option.
Demos:
The body can be provided interactively: