chore: Updates package aws-sdk-go to aws-sdk-go-v2 - follow up#1491
Merged
chore: Updates package aws-sdk-go to aws-sdk-go-v2 - follow up#1491
Conversation
Collaborator
Author
|
Organization contract test failure is flaky, this has been validated locally. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes the migration from AWS SDK Go v1 (aws-sdk-go) to AWS SDK Go v2 (aws-sdk-go-v2) across CloudFormation resources. The changes update import paths, API call patterns, and error handling to align with SDK v2 conventions.
Key Changes:
- Updated AWS SDK imports from v1 to v2 across all resource handlers
- Modified API calls to use context-based patterns (e.g.,
CreateSecret(context.Background(), input)) - Converted error code handling from constants to string conversions (
string(types.HandlerErrorCode...)) - Updated helper utility functions for AWS service client creation
Reviewed changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| cfn-resources/x509-authentication-database-user/cmd/resource/resource.go | Updated error handling to use SDK v2 types and refined nil pointer checks |
| cfn-resources/util/secrets/secret_manager.go | Migrated AWS Secrets Manager client initialization to SDK v2 with context support |
| cfn-resources/util/aws/utils.go | Refactored EC2 client creation and VPC endpoint operations for SDK v2 compatibility |
| cfn-resources/trigger/cmd/resource/resource.go | Replaced SDK v1 string utilities with SDK v2 equivalents |
| cfn-resources/search-index/cmd/resource/resource.go | Updated error codes and operation status handling to SDK v2 patterns |
| cfn-resources/profile/profile.go | Added documentation explaining SDK v2 credential handling in CloudFormation context |
| cfn-resources/private-endpoint/cmd/resource/steps/awsvpcendpoint/aws_vpc_endpoint.go | Migrated EC2 VPC endpoint operations to SDK v2 |
| cfn-resources/go.mod | Reorganized dependencies to properly reflect SDK v2 as primary dependency |
| Multiple test shell scripts | Fixed indentation inconsistencies in shell scripts |
| Multiple resource handlers | Systematically converted error codes to SDK v2 string format |
Comments suppressed due to low confidence (1)
cfn-resources/online-archive/test/cfn-test-create-inputs.sh:1
- The
--mdbVersion 5.0parameter was removed from the cluster creation command. If a specific MongoDB version is required for testing, this parameter should be retained to ensure consistent test environments.
#!/usr/bin/env bash
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
marcosuma
approved these changes
Dec 1, 2025
lantoli
approved these changes
Dec 1, 2025
manupedrozo
approved these changes
Dec 1, 2025
Collaborator
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Jira ticket: CLOUDP-339863
This PR is a follow-up to #1467
Link to any related issue(s):
Type of change:
expected)
Manual QA performed:
Required Checklist:
make fmtand formatted my codeworks in Atlas
Further comments