Skip to content

Add support for DynamoDB Global Table V2 (2019.11.21) #2077

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

Open
gcalv0 opened this issue May 23, 2024 · 5 comments · Fixed by aws-controllers-k8s/dynamodb-controller#120
Open
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/dynamodb Indicates issues or PRs that are related to dynamodb-controller.

Comments

@gcalv0
Copy link

gcalv0 commented May 23, 2024

Is your feature request related to a problem?
Yes, actually ACK creates version 2017 (2017.11.29) which requires to create an empty table in the destination before adding global tables for a region. Also there are several restrictions/changes regarding the legacy version.

This request is related with the following closed issue:
#1034

Describe the solution you'd like
Use the actual version as a default to avoid braking changes and offer the possibility to specify the version in the ACK manifest.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html

@a-hilaly a-hilaly added service/dynamodb Indicates issues or PRs that are related to dynamodb-controller. kind/feature Categorizes issue or PR as related to a new feature. labels May 24, 2024
@ack-bot
Copy link
Collaborator

ack-bot commented Nov 20, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 20, 2024
@jlbutler
Copy link
Contributor

/remove-lifecycle stale

@ack-prow ack-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 20, 2024
@michaelhtm
Copy link
Member

michaelhtm commented Feb 27, 2025

Hey @gcalv0, to support this feature we need to introduce the ReplicaUpdates field to the Table resource. We would also need to be careful in comparing the delta between the ReplicationGroupUpdates to see which replicas need to be created, updated, or deleted. I'm not absolutely sure this feature will work for ACK,
but for now a workaround that worked for me was to create the GlobalTable using the and adopting it to ACK using something similar to this:

apiVersion: dynamodb.services.k8s.aws/v1alpha1
kind: Table
metadata:
  name: mytable
  annotations:
    services.k8s.aws/deletion-policy: retain
    services.k8s.aws/read-only: "true"
    services.k8s.aws/adoption-policy: adopt-or-create
    services.k8s.aws/adoption-fields: | 
        {
          "tableName": "mytable"
        }

I hope this helps!

ack-prow bot pushed a commit to aws-controllers-k8s/dynamodb-controller that referenced this issue Mar 25, 2025
fixes aws-controllers-k8s/community#2077

This PR implements support for managing DynamoDB table replicas through the `tableReplicas` field. This enhancement allows users to manage multi-region table replicas that automatically remain in sync. This is complemented by a `replicaDescription` field in the Table status for tracking replica states. 

## Changes Overview

- Added `tableReplicas` field to Table spec for defining replica configurations across regions
- Added controller logic for replica lifecycle management (creation, updates, deletion)
- Implemented validation rules:
  - DynamoDB Streams must be enabled with NEW_AND_OLD_IMAGES
  - Terminal error conditions for invalid configurations
- E2E tests
@a-hilaly
Copy link
Member

/reopen

@ack-prow ack-prow bot reopened this Mar 25, 2025
Copy link

ack-prow bot commented Mar 25, 2025

@a-hilaly: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/dynamodb Indicates issues or PRs that are related to dynamodb-controller.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants