# aws/aws-sdk-go-v2 architecture

> Architecture diagram of the GitHub repository aws/aws-sdk-go-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aws/aws-sdk-go-v2
- Repository: https://github.com/aws/aws-sdk-go-v2

## Overview

The AWS SDK for Go v2 is a client library for invoking AWS service APIs. Its documented user workflow is to load configuration, construct a service client, call an operation, and receive typed output or an error. Generated operation code defines request and response shapes and configures middleware; the excerpted service operations also show pagination and waiter helpers. The tree identifies protocol, signing, retry, and HTTP transport packages as runtime layers. Internal wiring beyond the excerpts is not asserted; dashed links mark likely but unverified execution relationships.

Main entry points: [`service/datapipeline/api_op_PutPipelineDefinition.go`](https://github.com/aws/aws-sdk-go-v2/blob/main/service/datapipeline/api_op_PutPipelineDefinition.go) (API operation), [`aws/middleware/middleware.go`](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/middleware/middleware.go) (Middleware stack), [`service/dynamodb`](https://github.com/aws/aws-sdk-go-v2/tree/main/service/dynamodb) (Service client), [`config/config.go`](https://github.com/aws/aws-sdk-go-v2/blob/main/config/config.go) (Config loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_config["Config loader<br/>[config.go]"]
  node_awsconfig["SDK config<br/>[config.go]"]
end

subgraph group_service["Service clients"]
  node_serviceclient["Service client"]
  node_operation["API operation"]
  node_operationmodels["Typed inputs"]
end

subgraph group_runtime["Request runtime"]
  node_middleware["Middleware stack<br/>[middleware.go]"]
  node_protocols["Protocol encoding"]
  node_signing["Request signing<br/>[middleware.go]"]
  node_retry["Retry handling<br/>[middleware.go]"]
  node_http["HTTP transport<br/>[client.go]"]
end

subgraph group_extensions["SDK extensions"]
  node_pagination["Pagination"]
  node_waiters["Waiters"]
  node_attributevalue["DynamoDB values<br/>[encode.go]"]
  node_expressions["DynamoDB expressions<br/>[expression.go]"]
  node_cloudfrontsign["CloudFront signing<br/>[sign_url.go]"]
  node_dsql["DSQL auth tokens"]
end

node_developer(("Go application"))
node_awsservice(("AWS service"))

node_developer -->|"loads settings"| node_config
node_config -.->|"returns config"| node_awsconfig
node_developer -->|"creates client"| node_serviceclient
node_awsconfig -->|"configures"| node_serviceclient
node_serviceclient -.->|"invokes"| node_operation
node_developer -->|"calls operation"| node_operation
node_operation -->|"serializes shapes"| node_operationmodels
node_operation -->|"configures stack"| node_middleware
node_operation -.->|"provides pages"| node_pagination
node_operation -.->|"provides waits"| node_waiters
node_middleware -.->|"dispatches encoding"| node_protocols
node_middleware -.->|"dispatches signing"| node_signing
node_middleware -.->|"dispatches retries"| node_retry
node_middleware -.->|"dispatches request"| node_http
node_http -.->|"sends request"| node_awsservice
node_developer -.->|"encodes values"| node_attributevalue
node_developer -.->|"builds expressions"| node_expressions
node_developer -.->|"signs URLs"| node_cloudfrontsign
node_developer -.->|"generates tokens"| node_dsql

click node_config "https://github.com/aws/aws-sdk-go-v2/blob/main/config/config.go"
click node_awsconfig "https://github.com/aws/aws-sdk-go-v2/blob/main/aws/config.go"
click node_serviceclient "https://github.com/aws/aws-sdk-go-v2/tree/main/service/dynamodb"
click node_operation "https://github.com/aws/aws-sdk-go-v2/blob/main/service/datapipeline/api_op_PutPipelineDefinition.go"
click node_operationmodels "https://github.com/aws/aws-sdk-go-v2/blob/main/service/datapipeline/api_op_PutPipelineDefinition.go"
click node_pagination "https://github.com/aws/aws-sdk-go-v2/blob/main/service/deadline/api_op_ListStorageProfilesForQueue.go"
click node_waiters "https://github.com/aws/aws-sdk-go-v2/blob/main/service/bedrockagentcorecontrol/api_op_GetPolicyEngine.go"
click node_middleware "https://github.com/aws/aws-sdk-go-v2/blob/main/aws/middleware/middleware.go"
click node_protocols "https://github.com/aws/aws-sdk-go-v2/tree/main/aws/protocol"
click node_signing "https://github.com/aws/aws-sdk-go-v2/blob/main/aws/signer/v4/middleware.go"
click node_retry "https://github.com/aws/aws-sdk-go-v2/blob/main/aws/retry/middleware.go"
click node_http "https://github.com/aws/aws-sdk-go-v2/blob/main/aws/transport/http/client.go"
click node_attributevalue "https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dynamodb/attributevalue/encode.go"
click node_expressions "https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dynamodb/expression/expression.go"
click node_cloudfrontsign "https://github.com/aws/aws-sdk-go-v2/blob/main/feature/cloudfront/sign/sign_url.go"
click node_dsql "https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dsql/auth/auth_token_generator.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_awsconfig toneBlue
class node_serviceclient,node_operation,node_operationmodels toneAmber
class node_middleware,node_protocols,node_signing,node_retry,node_http toneMint
class node_pagination,node_waiters,node_attributevalue,node_expressions,node_cloudfrontsign,node_dsql toneRose
class node_developer,node_awsservice toneIndigo
```

## Components

### Configuration

- [Config loader](https://github.com/aws/aws-sdk-go-v2/blob/main/config/config.go): `config/config.go`
- [SDK config](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/config.go): `aws/config.go`

### Service clients

- [Service client](https://github.com/aws/aws-sdk-go-v2/tree/main/service/dynamodb): `service/dynamodb`
- [API operation](https://github.com/aws/aws-sdk-go-v2/blob/main/service/datapipeline/api_op_PutPipelineDefinition.go): `service/datapipeline/api_op_PutPipelineDefinition.go`
- [Typed inputs](https://github.com/aws/aws-sdk-go-v2/blob/main/service/datapipeline/api_op_PutPipelineDefinition.go): `service/datapipeline/api_op_PutPipelineDefinition.go`

### Request runtime

- [Middleware stack](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/middleware/middleware.go): `aws/middleware/middleware.go`
- [Protocol encoding](https://github.com/aws/aws-sdk-go-v2/tree/main/aws/protocol): `aws/protocol`
- [Request signing](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/signer/v4/middleware.go): `aws/signer/v4/middleware.go`
- [Retry handling](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/retry/middleware.go): `aws/retry/middleware.go`
- [HTTP transport](https://github.com/aws/aws-sdk-go-v2/blob/main/aws/transport/http/client.go): `aws/transport/http/client.go`

### SDK extensions

- [Pagination](https://github.com/aws/aws-sdk-go-v2/blob/main/service/deadline/api_op_ListStorageProfilesForQueue.go): `service/deadline/api_op_ListStorageProfilesForQueue.go`
- [Waiters](https://github.com/aws/aws-sdk-go-v2/blob/main/service/bedrockagentcorecontrol/api_op_GetPolicyEngine.go): `service/bedrockagentcorecontrol/api_op_GetPolicyEngine.go`
- [DynamoDB values](https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dynamodb/attributevalue/encode.go): `feature/dynamodb/attributevalue/encode.go`
- [DynamoDB expressions](https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dynamodb/expression/expression.go): `feature/dynamodb/expression/expression.go`
- [CloudFront signing](https://github.com/aws/aws-sdk-go-v2/blob/main/feature/cloudfront/sign/sign_url.go): `feature/cloudfront/sign/sign_url.go`
- [DSQL auth tokens](https://github.com/aws/aws-sdk-go-v2/blob/main/feature/dsql/auth/auth_token_generator.go): `feature/dsql/auth/auth_token_generator.go`

### Other components

- **Go application**
- **AWS service**

## Connections

- Go application → Config loader: loads settings (evidence: `README.md`)
- Config loader → SDK config: returns config
- Go application → Service client: creates client (evidence: `README.md`)
- SDK config → Service client: configures (evidence: `README.md`)
- Service client → API operation: invokes
- Go application → API operation: calls operation (evidence: `README.md`)
- API operation → Typed inputs: serializes shapes (evidence: `service/datapipeline/api_op_PutPipelineDefinition.go`)
- API operation → Middleware stack: configures stack (evidence: `service/datapipeline/api_op_PutPipelineDefinition.go`)
- API operation → Pagination: provides pages
- API operation → Waiters: provides waits
- Middleware stack → Protocol encoding: dispatches encoding
- Middleware stack → Request signing: dispatches signing
- Middleware stack → Retry handling: dispatches retries
- Middleware stack → HTTP transport: dispatches request
- HTTP transport → AWS service: sends request
- Go application → DynamoDB values: encodes values
- Go application → DynamoDB expressions: builds expressions
- Go application → CloudFront signing: signs URLs
- Go application → DSQL auth tokens: generates tokens
