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

[internal/aws] migrate to AWS v2 SDK #37728

Open
Tracked by #36699
crobert-1 opened this issue Feb 5, 2025 · 2 comments · May be fixed by #37910
Open
Tracked by #36699

[internal/aws] migrate to AWS v2 SDK #37728

crobert-1 opened this issue Feb 5, 2025 · 2 comments · May be fixed by #37910
Labels
dependency-major-update Indicates a dependency major version bump good first issue Good for newcomers help wanted Extra attention is needed internal/aws

Comments

@crobert-1
Copy link
Member

crobert-1 commented Feb 5, 2025

Component(s)

internal/aws

Describe the issue you're reporting

AWS has annouced that it will be discontinuing support for go AWS SDK v1 and we should be updating the collector to migrate away from it to ensure any issues with the package are dealt with.

https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/

@crobert-1 crobert-1 added the dependency-major-update Indicates a dependency major version bump label Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1 crobert-1 added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 5, 2025
@crobert-1 crobert-1 mentioned this issue Feb 5, 2025
19 tasks
@Avinash-Acharya
Copy link

Hey @crobert-1 . I was going through this issue, when I got across this one particular code section at opentelemetry-collector-contrib/internal/aws/awsutil/conn.go

func getSTSCredsFromPrimaryRegionEndpoint(logger *zap.Logger, t aws.Config, roleArn string,
	region string,
) *stscreds.AssumeRoleProvider {
	logger.Info("Credentials for provided RoleARN being fetched from STS primary region endpoint.")
	partitionID := getPartition(region)
	switch partitionID {
	// case endpoints.AwsPartitionID:
	case endpoints.AwsPartitionID:
		return getSTSCredsFromRegionEndpoint(logger, t, endpoints.UsEast1RegionID, roleArn)
	case endpoints.AwsCnPartitionID:
		return getSTSCredsFromRegionEndpoint(logger, t, endpoints.CnNorth1RegionID, roleArn)
	case endpoints.AwsUsGovPartitionID:
		return getSTSCredsFromRegionEndpoint(logger, t, endpoints.UsGovWest1RegionID, roleArn)
	}

	return nil
}

I can't find a way to migrate from "github.com/aws/aws-sdk-go/aws/endpoints" to "github.com/aws/smithy-go/endpoints" Based on what the doc has to say.
The new endpoints does not seems to have the us or cn value based endpoints for conditional cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency-major-update Indicates a dependency major version bump good first issue Good for newcomers help wanted Extra attention is needed internal/aws
Projects
None yet
2 participants