Releases: getlift/lift
1.11.0
1.10.0
Features
- Drop NodeJS 10 support by @t-richard in #118 (the AWS CDK dropped support as well)
- [Static website] Optimization: create the request function only if
redirectToMainDomain: true
by @t-richard in #117
Bugfixes
Full Changelog: 1.9.1...1.10.0
1.9.1
1.9.0
1.8.0
Websites (static websites and server-side websites) can now redirect requests to a main domain! (thanks @t-richard)
This is useful, for example, to redirect mywebsite.com
to www.mywebsite.com
to avoid duplicated content (which can hurt SEO):
constructs:
website:
...
domain:
- www.mywebsite.com
- mywebsite.com
# New option 👇️
redirectToMainDomain: true
Read more in the documentation.
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
.