-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dynamodb table and provider for tag and path revalidation (#…
…145) * feat: add dynamodb table and provider for tag and path revalidation This diff adds the DynamoDB table and supporting data provider function to support Next.js path and tag revalition. This feature is supported by `open-next` (read more about it here: https://open-next.js.org/inner_workings/isr#tags) and is inspired by sst/sst@v2.27.0...v2.28.0 The changes include * Adding a new DynamoDB table which stores time stamps, tags, and paths for revalidation consideration * Adds a function (`dynamodb-provider`) which populates the DynamoDB table on deployment with the initial set of tags / paths / timestamps generated in the Next.js build phase * **Bumps `aws-cdk-lib` to 2.95.1**, matching the SST version for access to `DynamoDB.TableV2` * Adds a simple description to the "primary" server handler A bit more info: I did this because SST uses the DynamoDB `TableV2` construct and I thought it would be best to match. I added a description because at least for me the function names end up mangled (I actually think it’d be great to clean these up, but I frankly don’t know the best practice here from IaC / AWS perspective) and it’s nice to be able to easily identify different functions, in particular the server handler, in the AWS console for debugging. From what I can tell this is a non-breaking change, however this brings me back to a general question about how we should be managing versions and default open-next build commands… SST uses `2.2.1` as the default version of `open-next` in the build command. * chore: bump cdk version and fix some resource names * Using the current latest version of CDK lib * Remove duplicate "Revalidation" from name strings for new queue and dynamodb provider functions As far as I can tell the CDK bump hasn't had any negative impact, deployment works fine and the Next.js App Playground is deploying and seemingly working well. * chore: update generated api docs * chore: update open-next to use version 2.2 * chore: match casing for function descriptions to image function * chore: update generated api doc * * use the latest 2.x version of open-next as default build option * (note if somebody reads this in the future and is looking for a known working version, as of this commit I'm using `[email protected]` with success) * some cleanup of names and removing a non-null assertion --------- Co-authored-by: Kevin Mitchell <>
- Loading branch information
1 parent
350933a
commit e68e49f
Showing
10 changed files
with
159 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.