awscloud

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 37 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package awscloud is the cloud as AWS answers it, the release build's driver of cloud.Cloud.

A named profile's clients are built field by field from the AWS config and credentials files under the home folder, never through the SDK's config loader, which reads the environment: so no credential, profile, config-file, role, container or endpoint variable changes what they reach (spec 6.2.2). They do use the HTTP proxy the environment names, and the CA bundle Config names, or else the profile's own, which corporate networks need (see package cloud).

The write-access check reads, with the everyday credentials, sts:GetCallerIdentity, iam:ListRoles, iam:GetRole and iam:SimulatePrincipalPolicy, all of which the AWS managed ReadOnlyAccess policy grants; any it's denied makes the answer unknown. It lists each cached sign-in's permission sets with sso:ListAccountRoles, which that sign-in's own token authorises, and renews an expired one with sso-oidc:CreateToken, which rewrites that sign-in's cache file, as the AWS CLI does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	// contains filtered or unexported fields
}

AWS is the cloud as AWS answers it.

func New

func New(cfg cloud.Config) (*AWS, error)

New is AWS, reading the AWS config under cfg.Home.

func (*AWS) Identity

func (a *AWS) Identity(ctx context.Context, c cloud.Credentials) (cloud.Identity, error)

Identity asks STS's GetCallerIdentity, of the credentials and, where they assume roles, of their chain's base.

func (*AWS) Profile

func (a *AWS) Profile(ctx context.Context, name config.ProfileName) (cloud.Profile, bool, error)

Profile reads the AWS config and credentials files under the home folder.

func (*AWS) StartSignIn

func (a *AWS) StartSignIn(ctx context.Context, name config.ProfileName) (cloud.DeviceSignIn, error)

StartSignIn registers terrace with the profile's Identity Center as a public client and starts a device authorisation there, as the AWS CLI's sign-in with a device code does. The profile must be a sign-in of its own (cloud.Profile.OwnSignIn): its credentials are its permission set's own.

func (*AWS) WriteAccess

func (a *AWS) WriteAccess(ctx context.Context, q cloud.WriteAccessQuery) (cloud.WriteAccess, error)

WriteAccess asks IAM's policy simulator (iam:SimulatePrincipalPolicy) whether the principals the everyday credentials can act as in the account are allowed a delete action, as package cloud's doc says. The principals are each link of the credentials' chain in the account, found with sts:GetCallerIdentity and iam:GetRole, and the role of every permission set each live cached Identity Center sign-in reaches there (sso:ListAccountRoles, then iam:ListRoles). Each is simulated with no region, and in the region the profile or the environment names.

Jump to

Keyboard shortcuts

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