-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dynamodb): global tables version 2019.11.21 #5821
Conversation
Add support for global tables version 2019.11.21. Version 2019.11.21 (current) of global tables enables to dynamically add new replica tables from a table populated with data. It is more efficient and consumes less write capacity than version 2017.11.29. Uses the custom resource provider framework (async) to update the table (`onEvent`) and check for replica creation (`isComplete`). Tables no longer have to be created in separate "regional" stacks and then "glued" together with a custom resource as in `@aws-cdk/aws-dynamodb-global`. This means that a separate module is no longer justified. Deprecate `@aws-cdk/aws-dynamodb-global`: it uses version 2017.11.29 and the API and custom resource implementation for version 2019.11.21 is much cleaner. See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html Closes aws#5752
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
latestSdkInstalled = true; | ||
} | ||
|
||
export async function onEventHandler(event: any): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eladb I was not able to use the framework types (AWSCDKAsyncCustomResource
namespace) exported in @aws-cdk/custom-resources
... any idea why? or how I could use them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I export those types in lib/provider-framework/index.ts
(export * from './types'
), I can use them but then jsii
complains when building @aws-cdk/custom-resources
because types are extending types defined in @types/aws-lambda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course it works by deeply importing (import { IsCompleteResponse, OnEventResponse } from '@aws-cdk/custom-resources/lib/provider-framework/types';
), this is OK inside this repo but not a good user experience for users consuming @aws-cdk/custom-resources
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I did not have time to look at this last week - @nija-at , it's all yours :). |
We can maybe add something here to also close #5516. Looking into this. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@eladb do we want to expose an array of |
Maybe we can add this later |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
@jogold @eladb I'm trying to enable I'm wondering if this is by design, for example, if there's any limitation with global tables and global point in time recovery, or if we can expose or even enable it by default if the main table has |
@phstc can you open us a separate issue about this? This PR is over 2 years old, not really a great place for this discussion I feel 🙂. |
Add support for global tables version 2019.11.21.
Version 2019.11.21 (current) of global tables enables to dynamically add new
replica tables from a table populated with data. It is more efficient and
consumes less write capacity than version 2017.11.29.
Uses the custom resource provider framework (async) to update the table
(
onEvent
) and check for replica creation (isComplete
).Tables no longer have to be created in separate "regional" stacks and then
"glued" together with a custom resource as in
@aws-cdk/aws-dynamodb-global
.This means that a separate module is no longer justified.
Deprecate
@aws-cdk/aws-dynamodb-global
: it uses version 2017.11.29 and the APIand custom resource implementation for version 2019.11.21 is much cleaner.
See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html
Closes #5752
Closes #5489
Closes #5516
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license