Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Migrate from AWS SDK Go v1 to v2#2

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/update-aws-sdk-go-v2
Draft

Migrate from AWS SDK Go v1 to v2#2
Copilot wants to merge 3 commits intomasterfrom
copilot/update-aws-sdk-go-v2

Conversation

Copy link

Copilot AI commented Jan 6, 2026

Migrates all AWS SDK usage from github.com/aws/aws-sdk-go v1 to github.com/aws/aws-sdk-go-v2.

Changes

Dependencies

  • github.com/aws/aws-sdk-go-v2/config for session configuration
  • github.com/aws/aws-sdk-go-v2/service/s3 for S3 operations
  • github.com/aws/aws-sdk-go-v2/service/s3/types for S3 type definitions

Session initialization

// Before
sess := session.New()
s3Client := s3.New(sess, nil)

// After
cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    log.Fatal(err)
}
s3Client := s3.NewFromConfig(cfg)

S3 API calls

  • All methods now require context.Context as first parameter
  • Direct pointer assignment replaces aws.String() helpers
  • Client type changed from *s3.S3 to *s3.Client
  • ACL type changed from string to types.ObjectCannedACL

Environment variables (S3_BUCKET, S3_ACL, etc.) remain unchanged.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update from AWS SDK Go v1 to AWS SDK Go v2</issue_title>
<issue_description>Please update all usages of github.com/aws/aws-sdk-go v1 in this repo to github.com/aws/aws-sdk-go-v2.

Migration includes updating when AWS sessions are created, e.g.

before:

after:

Also using service-specific modules like github.com/aws/aws-sdk-go-v2/config and github.com/aws/aws-sdk-go-v2/feature/ec2/imds
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 6, 2026 02:35
Co-authored-by: pranavraja <1480813+pranavraja@users.noreply.github.com>
Co-authored-by: pranavraja <1480813+pranavraja@users.noreply.github.com>
Copilot AI changed the title [WIP] Update from AWS SDK Go v1 to AWS SDK Go v2 Migrate from AWS SDK Go v1 to v2 Jan 6, 2026
Copilot AI requested a review from pranavraja January 6, 2026 02:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Update from AWS SDK Go v1 to AWS SDK Go v2

2 participants