aws

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package aws holds the AWS SDK clients that the per-service tool packages (s3, …) share. Unlike the other servers in this family, aws-mcp uses the official aws-sdk-go-v2 rather than a hand-rolled REST client, so credentials come from the standard AWS credential chain (environment, shared config, SSO, or an attached IAM role).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	// Region is the resolved AWS region.
	Region string
	// S3 reaches Amazon S3.
	S3 *s3.Client
	// STS reaches AWS Security Token Service (used by the connectivity check).
	STS *sts.Client
}

Clients bundles the AWS service clients used by the toolsets.

func NewClients

func NewClients(ctx context.Context, region string) (*Clients, error)

NewClients loads AWS configuration from the default credential chain and builds the service clients. An explicit region overrides the chain-resolved one when non-empty.

type Identity

type Identity struct {
	Account string
	Arn     string
	UserID  string
}

Identity describes the calling AWS principal.

func Check

func Check(ctx context.Context, c *Clients) (*Identity, error)

Check verifies credentials by calling STS GetCallerIdentity, returning the resolved principal.

Directories

Path Synopsis
Package s3 exposes read-only Amazon S3 operations: listing buckets and the objects within a bucket.
Package s3 exposes read-only Amazon S3 operations: listing buckets and the objects within a bucket.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL