awsauth

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package awsauth resolves AWS credentials for the rdq CLI.

It wraps the SDK's default credential chain and adds an interactive profile picker for the "rdq --profile" (bare flag) UX.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListProfiles

func ListProfiles() ([]string, error)

ListProfiles returns the profile names found in the shared AWS config and credentials files. "default" is always included as the first entry when it exists in either file. A missing file is not an error — it contributes no profiles.

func LoadConfig

func LoadConfig(ctx context.Context, profile string) (aws.Config, error)

LoadConfig resolves AWS credentials. When profile is empty the SDK's default chain applies (environment variables → shared config default profile → EC2/ECS metadata). When profile is non-empty it is used as the shared config profile override.

func SelectProfile

func SelectProfile(profiles []string) (string, error)

SelectProfile launches an interactive fuzzy finder over the given profile names. It fails early when stdin is not a terminal, since the finder would otherwise corrupt piped input.

func VerifyIdentity

func VerifyIdentity(ctx context.Context, cfg aws.Config) (account, arn string, err error)

VerifyIdentity calls sts:GetCallerIdentity and returns the account and ARN for debug logging.

Types

This section is empty.

Jump to

Keyboard shortcuts

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