awsutils

package module
v0.0.0-...-656c9ac Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 8 Imported by: 4 modules, 4 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.

README

Shared AWS Utilities for Northwood Labs

[!NOTE] Moved to https://go.nwlabs.dev/x/aws/v2.

This is only a library. It does not work on its own. It is consumed by the various apps.

Usage

import (
    "github.com/northwood-labs/awsutils"
    "github.com/northwood-labs/golang-utils/exiterrorf"
)

func main() {
    ctx := context.Background()
    region := "us-west-2"
    retries := 5
    verbose := false

    config, err := awsutils.GetAWSConfig(ctx, region, retries, verbose)
    if err != nil {
        exiterrorf.ExitErrorf(err)
    }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSConfig

func GetAWSConfig(ctx context.Context, opts ...AWSConfigOptions) (aws.Config, error)

GetAWSConfig returns a standard AWS config object pre-configured for use with regions, retries, and verbosity.

If region is empty, we will attempt to read AWS_REGION then AWS_DEFAULT_REGION.

Types

type AWSConfigOptions

type AWSConfigOptions struct {
	Region  string
	Profile string
	Retries int
	Verbose bool
}

NoOpRateLimit to prevent limiting of queries to AWS.

type NoOpRateLimit

type NoOpRateLimit struct{}

NoOpRateLimit to prevent limiting of queries to AWS.

func (NoOpRateLimit) AddTokens

func (NoOpRateLimit) AddTokens(uint) error

AddTokens to return nil for NoOpRateLimit.

func (NoOpRateLimit) GetToken

func (NoOpRateLimit) GetToken(context.Context, uint) (func() error, error)

GetToken will return nil so that there will be no rate limiting.

Jump to

Keyboard shortcuts

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