Skip to content
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

Migrate dynamodb engine to AWS SDK v2 #50250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GavinFrazar
Copy link
Contributor

@GavinFrazar GavinFrazar commented Dec 13, 2024

Changelog: Teleport Database Service will now resolve DynamoDB endpoints to AWS-account-based endpoints in supported regions.

Part of #14142

This migrates the Database Service engine for DynamoDB to use AWS SDK v2.
FIPS endpoint resolution has also been enabled.

Finally, if the AWS account ID is known1 then the engine will resolve to the account ID based endpoint for DynamoDB operations in supported regions.

Footnotes

  1. I think it was always a required db spec field, but it's trivial to handle the case where it isn't, because that was prior behavior anyway

@GavinFrazar GavinFrazar requested a review from greedy52 December 13, 2024 22:43
@GavinFrazar GavinFrazar added the no-changelog Indicates that a PR does not require a changelog entry label Dec 13, 2024
@github-actions github-actions bot requested a review from zmb3 December 13, 2024 22:43
@github-actions github-actions bot added database-access Database access related issues and PRs size/sm labels Dec 13, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-50250.d3pp5qlev8mo18.amplifyapp.com

@GavinFrazar GavinFrazar added aws Used for AWS Related Issues. db/dynamodb and removed no-changelog Indicates that a PR does not require a changelog entry labels Dec 13, 2024
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/migrate-dynamodb-engine-sdk branch from a036fa2 to b113763 Compare December 13, 2024 22:58
lib/srv/db/dynamodb/engine.go Show resolved Hide resolved
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodbstreams"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/dax"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dax APIs sourced here are only for deployment, not for interacting with the "database".

I don't think db access works with dax today: https://github.com/aws/aws-dax-go

I propose we drop dax here and track dax separately. WDYT

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that these are only for API operations, e.g.

aws dax describe-clusters --endpoint-url http://localhost:8000

The alternative is to have app access for AWS console set up and use tsh aws dax instead.

App access is a better UX anyway since DynamoDB db-access has to support nosql workbench, which requires using the fake "local" region and configuring a db per region.

I would prefer to drop DAX support in a separate PR at least to limit this to just converting SDK version.

This migrates the Database Service engine for DynamoDB to use AWS SDK
v2.
FIPS endpoint resolution has also been enabled.

Finally, the engine will now resolve to the AWS-account-based endpoint for
DynamoDB operations in supported regions.
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/migrate-dynamodb-engine-sdk branch from b113763 to 978fdce Compare December 24, 2024 00:17
@GavinFrazar GavinFrazar requested a review from greedy52 December 24, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Used for AWS Related Issues. database-access Database access related issues and PRs db/dynamodb size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants