diff --git a/README.md b/README.md index ca73708..e4ee48f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ Previous versions of this application featured an optional [CloudFront](https:// While the CloudFront-enabled version of the application is no longer available in the Serverless Application Repository, the newly created [`examples`](./examples/README.md) directory includes sample [CloudFormation](https://aws.amazon.com/cloudformation/) templates and [Terraform](https://terraform.io/) manifests showing how to deploy the IIIF service as part of a larger application/infrastructure stack. +### Breaking Changes from Version 4.x + +- The value of the `SharpLayer` variable must now be one of `INTERNAL`, `JP2`, or a valid Lambda layer ARN in the same region the + application is being deployed in. The new default is `JP2`, which behaves the same as the former default (empty string). The new + value, `INTERNAL`, uses the `sharp` and `libvips` dependencies compiled into the application itself. + ## Description A IIIF [2.1](https://iiif.io/api/image/2.1/) and [3.0](https://iiif.io/api/image/3.0/) Image API compliant server written as an [AWS Serverless Application](https://aws.amazon.com/serverless/sam/). @@ -19,7 +25,6 @@ A IIIF [2.1](https://iiif.io/api/image/2.1/) and [3.0](https://iiif.io/api/image * A simple [Lambda Function](https://aws.amazon.com/lambda/) wrapper for the [iiif-processor](https://www.npmjs.com/package/iiif-processor) module. * A [Lambda Function URL](https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html) that is used to invoke the IIIF API via HTTPS. * A [Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) containing all the dependencies for the Lambda Function. -* An optional [CloudFormation](https://aws.amazon.com/cloudformation/) template describing the resources needed to deploy the application. ## Prerequisites @@ -111,7 +116,7 @@ npm test --coverage ## Custom Sharp Layer -This lambda uses the Sharp layer from https://github.com/samvera/lambda-layer-sharp-jp2/releases in order to get a version of Sharp with jp2 support. You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template. +By default, the application uses a [custom sharp layer](https://github.com/samvera/lambda-layer-sharp-jp2/releases) built with JPEG2000 support. You can supply the ARN of another custom sharp/libvips Lambda layer, or, if you don't need JP2 support, use the value `INTERNAL` to use the precompiled sharp binaries from NPM. ## Advanced Usage diff --git a/docs/lib/cfn-reader.js b/docs/lib/cfn-reader.js index 3b060eb..a0beec8 100644 --- a/docs/lib/cfn-reader.js +++ b/docs/lib/cfn-reader.js @@ -13,6 +13,7 @@ function getParameters() { } async function getPropertyList(opts = {}) { + opts = { descPrefix: '', ...opts }; const { compileMdx } = await import('nextra/compile'); const result = getParameters(); diff --git a/docs/lib/cfn-tags.js b/docs/lib/cfn-tags.js index b496e05..f6f343b 100644 --- a/docs/lib/cfn-tags.js +++ b/docs/lib/cfn-tags.js @@ -1,7 +1,8 @@ const functionTags = { '!GetAtt': { type: 'string', quoted: false }, '!Sub': { type: 'string', quoted: true }, - '!Ref': { type: 'string', quoted: false } + '!Ref': { type: 'string', quoted: false }, + '!Split': { type: 'array', quoted: false } }; module.exports = Object.entries(functionTags).map(([tag, { quoted }]) => { diff --git a/sam/template.yml b/sam/template.yml index f891047..c4737f5 100644 --- a/sam/template.yml +++ b/sam/template.yml @@ -2,13 +2,13 @@ Transform: "AWS::Serverless-2016-10-31" Metadata: AWS::ServerlessRepo::Application: Name: serverless-iiif - Description: IIIF Image API 2.1 server backend Lambda function + Description: IIIF Image API 2.1 and 3.0 Service Lambda Function Author: Samvera SpdxLicenseId: Apache-2.0 LicenseUrl: ../LICENSE.txt ReadmeUrl: ../README.md Labels: ["iiif", "image-processing"] - HomePageUrl: https://github.com/samvera/serverless-iiif + HomePageUrl: https://samvera.github.io/serverless-iiif SemanticVersion: 5.0.0 SourceCodeUrl: https://github.com/samvera/serverless-iiif AWS::CloudFormation::Interface: @@ -38,7 +38,7 @@ Metadata: Parameters: CorsAllowCredentials: Type: String - Description: | + Description: > Value of the CORS `Access-Control-Allow-Credentials` response header. Must be `true` to allow requests with `Authorization` and/or `Cookie` headers. @@ -52,7 +52,7 @@ Parameters: Default: "*" CorsAllowOrigin: Type: String - Description: | + Description: > Value of the CORS `Access-Control-Allow-Origin` response header. Use the special value `REFLECT_ORIGIN` to copy the value from the `Origin` request header (required to emulate `*` for XHR requests @@ -94,7 +94,7 @@ Parameters: Default: false PyramidLimit: Type: Number - Description: Smallest pyramid image dimension. Set to 0 to prevent server from auto-calculating pyramid page sizes. + Description: Smallest pyramid image dimension. Set to `0` to prevent server from auto-calculating pyramid page sizes. MinValue: 0 Default: 256 ResolverTemplate: @@ -103,7 +103,7 @@ Parameters: Default: "%s.tif" SharpLayer: Type: String - Description: | + Description: > ARN of a custom AWS Lambda Layer containing the sharp and libvips dependencies. Use the special value `JP2` to use the managed JPEG2000-compatible layer, or `INTERNAL` to use the built-in dependencies (without JPEG2000 support).