aws

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package aws reads configuration from the stores AWS holds it in.

It is selected by importing it, which is how an application picks a platform without naming one anywhere else:

import _ "github.com/newstack-cloud/celerity-go-sdk/config/aws"

An init registers it for the AWS platform, and the generated platform file links it for an AWS deploy target, so an application does nothing to have its configuration read.

Which store a value comes from

A blueprint's celerity/config resource lists the keys that hold no sensitive value, and the deploy engine uses that to decide how the store is created: a store of mostly plain text becomes parameters under a path, and one whose values are sensitive becomes a single secret. It says which in the environment, and this package reads whichever it names.

A secret is read through the parameters and secrets Lambda extension where the function has it attached, since that is a local cache and avoids a request per cold start. Parameters are always read through the SDK: the extension has no equivalent of the call that reads a tree of parameters by path prefix.

Everything about the extension is here rather than in core, which holds no provider's environment variables.

Index

Constants

View Source
const (
	// StoreSecretsManager holds a whole store as one secret, read and decoded
	// in a single request. The default, since a store commonly holds values
	// that are all sensitive.
	StoreSecretsManager config.StoreKind = "secrets-manager"
	// StoreParameterStore holds each value separately under a path, which is
	// what a store of mostly plain text wants.
	StoreParameterStore config.StoreKind = "parameter-store"
)

The kinds of store AWS holds configuration in, which a deployment names in CELERITY_CONFIG_STORE_KIND. These are AWS's own services, which is why they are named here and not in core.

View Source
const ExtensionPortEnvVar = "PARAMETERS_SECRETS_EXTENSION_HTTP_PORT"

ExtensionPortEnvVar is set by AWS when the parameters and secrets extension layer is attached to a function, and is how this package knows the local cache is there to use.

View Source
const Name = "aws"

Name identifies this provider in errors.

View Source
const SessionTokenEnvVar = "AWS_SESSION_TOKEN"

SessionTokenEnvVar is the function's own credentials token, which the extension requires on every request so that only the function it belongs to can read its secrets.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider reads configuration from AWS.

An application does not construct one, importing this package registers it, and it is selected when the platform is AWS.

func (*Provider) Backend

func (p *Provider) Backend(kind config.StoreKind) (config.Backend, error)

Backend returns the backend reading a store of this kind.

A kind AWS does not hold configuration in is an error naming what it does, since it means the deployment asked for something this provider cannot do and every value would otherwise read as absent.

func (*Provider) Name

func (p *Provider) Name() string

Name identifies the provider.

func (*Provider) Platform

func (p *Provider) Platform() config.Platform

Platform is the platform this provider serves.

Jump to

Keyboard shortcuts

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