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

AWS SDK Go V2 Migration #83

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Conversation

fredjoonpark
Copy link
Contributor

@fredjoonpark fredjoonpark commented Dec 17, 2024

Issue #, if available:


Description of changes:

This change upgrades the underlying AWS Go SDK from V1 to V2.

Some notes and highlights regarding significant changes:

  • V2 SDK splits services into separate modules
  • The config module in V2 introduces a single entry point (config.LoadDefaultConfig()) which consolidates loading AWS credentials
  • service client APIs have been refined for more idiomatic Go usage (ie. relying less on aws.String() wrappers and providing typed fields where possible)
  • all SDK operations now require a context.Context (supporting graceful cancellation, timeouts)
  • the internal request pipeline has been restructured around Smithy middleware. Errors now follow a more consistent structure influenced by Smithy’s model-driven error definitions, making it easier to identify and handle specific error conditions (like ResourceNotFound or AccessDenied) through typed errors rather than relying on string matching
  • V2 SDK now uses a dedicated paginator with an iterative interface (HasMorePages() and NextPage()) to handle multi-page API responses. In our context, NextPage performs the network call for fetching query responses (previously QueryPages)
  • Added a docker-compose.yml
  • Added a new config parameter for setting max write retries
  • Updated exception status code to return 400 to match the SDK

Additional resources:


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@fredjoonpark fredjoonpark changed the title Integ sdk go v2 AWS SDK Go V2 Migration Dec 17, 2024
Copy link
Contributor

@forestmvey forestmvey left a comment

Choose a reason for hiding this comment

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

Thanks for the change.
I have validated the following:

  • Integration tests
  • Unit tests
  • TLS tests
  • Correctness tests
  • Deployed the connector and tested ingestion
  • Deployed the connector and tested remote_read operations

@forestmvey forestmvey merged commit 250636c into awslabs:main Dec 17, 2024
4 checks passed
@forestmvey forestmvey deleted the integ-sdk-go-v2 branch December 17, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants