gitmyhub

aws-sdk-go

Go ★ 8.7k updated 10mo ago ▣ archived

This SDK has reached end-of-support. The AWS SDK for Go v2 is available here: https://github.com/aws/aws-sdk-go-v2

The original AWS SDK for Go (v1) that lets Go programs call AWS services like S3 and DynamoDB, reached end-of-support July 2025, migration to v2 is strongly recommended.

GoAWSsetup: moderatecomplexity 3/5

This repository is the first-generation AWS SDK for Go, also called v1. It is a code library that Go programs can import to talk to Amazon Web Services: things like storing files in S3, running database queries, sending messages, and hundreds of other AWS operations. It translates Go function calls into the HTTP requests AWS expects, handles authentication, retries failed requests, and parses responses back into Go types your code can work with. Important note: as of July 31, 2025, this SDK reached end-of-support. It will not receive further updates. Amazon's own README strongly recommends migrating to the v2 version of the SDK instead.

The library is organized into two layers. The core layer lives in the aws package and handles things shared across all services: reading credentials, picking the right region, managing retries, and logging. On top of that sits a collection of service client packages, one per AWS service, each under a service subfolder. You create a Session first (which loads your region and credentials from environment variables or config files), then use that Session to create whichever service client you need, and then call methods on that client to make API requests.

Credentials can be supplied in several ways: environment variables, a shared credentials file on disk, IAM roles attached to the machine running your code, or temporary credentials via AWS STS. The SDK picks them up automatically from these sources in a defined order, so you often do not need to hard-code anything.

The README includes a complete working example showing a file upload to S3 with a timeout, which walks through all the core concepts: creating a session, creating a service client, making a request, checking errors, and handling cancellation via Go's context system.

Because this SDK is now in end-of-support, it is only relevant if you are maintaining existing Go code that already uses it. For new projects, the v2 SDK is the current option.

Where it fits