-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Guillaume Égée
committed
Sep 4, 2023
1 parent
89d68a7
commit 094bf28
Showing
4 changed files
with
60 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
# Contributing | ||
|
||
## Testing `cdk-dynamodb-migrator` | ||
## Guidelines | ||
|
||
Feel free to open an issue or pull request! | ||
|
||
## Useful commands | ||
|
||
- `pnpm install` install the project | ||
- `pnpm run build` build libraries | ||
- `pnpm run test-linter` perform Eslint check | ||
- `pnpm run test-type` check TypeScript compilation | ||
- `pnpm run test-unit` run jest unit tests | ||
- `pnpm run test` perform all tests | ||
|
||
## Installation | ||
|
||
### Requirements | ||
|
||
- NodeJs >= 18.17 (you can use `nvm install` command) | ||
- pnpm >= 8.7.1 | ||
|
||
### Installation steps | ||
|
||
```sh | ||
pnpm i | ||
``` | ||
|
||
### Deploying `cdk-dynamodb-migrator` app | ||
|
||
```sh | ||
cd cdk-dynamodb-migrator | ||
pnpm run deploy | ||
``` | ||
|
||
#### Deploying a demo example | ||
|
||
```sh | ||
cd cdk-dynamodb-migrator | ||
pnpm link --global | ||
pnpm run build | ||
cd ../demo/example | ||
pnpm link --global cdk-dynamodb-migrator | ||
pnpm cdk deploy | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
# Welcome to your CDK TypeScript project | ||
# DynamoDB data migration enablers | ||
|
||
This is a blank project for CDK development with TypeScript. | ||
A set of enablers for safer data migrations with DynamoDB. | ||
|
||
The `cdk.json` file tells the CDK Toolkit how to execute your app. | ||
## CDK DynamoDB migration construct | ||
|
||
## Useful commands | ||
See [documentation](./cdk-dynamodb-migrator/README.md) | ||
|
||
* `pnpm run build` compile typescript to js | ||
* `pnpm run watch` watch for changes and compile | ||
* `pnpm run test` perform the jest unit tests | ||
* `cdk deploy` deploy this stack to your default AWS account/region | ||
* `cdk diff` compare deployed stack with current state | ||
* `cdk synth` emits the synthesized CloudFormation template | ||
## Contributing | ||
|
||
See [CONTRIBUTING.md](./CONTRIBUTING.md) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# CDK DynamoDB migration framework | ||
# CDK migration construct and stack | ||
|
||
Constructs to manage migration versions performed by a migration lambda | ||
|
||
## Usage | ||
|
||
It is possible to use either `MigrationConstruct` inside a stack, or use `MigrationStack` as an independent stack | ||
These constructs contain a state machine (Step Functions) + a DynamoDB table to store current state and versions. | ||
|
||
They take as input a Lambda function which should perform migrations using a version number strictly increasing. | ||
Lambda input must extend: `{ targetVersion: number }` | ||
Lambda output must extend: `{ status: 'SUCCEEDED' | 'FAILED' }` |
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