aws

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 47 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 aws implements the AWS Lambda, S3, and CloudFront serverless provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSProvider

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

func NewAWSProvider

func NewAWSProvider(verbose bool) *AWSProvider

func (*AWSProvider) CheckServiceQuotas

func (p *AWSProvider) CheckServiceQuotas(ctx context.Context) error

func (*AWSProvider) DeployCompute

func (*AWSProvider) DeployStatic

func (*AWSProvider) Destroy

func (p *AWSProvider) Destroy(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error

func (*AWSProvider) GetResourceMap

func (*AWSProvider) GetSecrets

func (p *AWSProvider) GetSecrets(ctx context.Context, appName string) (map[string]string, error)

func (*AWSProvider) Initialize

func (p *AWSProvider) Initialize(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error

func (*AWSProvider) InvalidateCache

func (p *AWSProvider) InvalidateCache(ctx context.Context, appCfg *cfgTypes.NextDeployConfig) error

func (*AWSProvider) Rollback

Rollback reverts the Lambda function to a previous deployed zip using the S3 deployment history. Target selection:

  • opts.ToCommit: prefix-match against history GitCommit (errors if not found within retention).
  • opts.Steps (default 1): walk N entries back from the current (last) one.

This is instant — no HTTP download required.

func (*AWSProvider) SetSecret

func (p *AWSProvider) SetSecret(ctx context.Context, appName string, key, value string) error

SetSecret performs an optimistic read-modify-write that survives concurrent writers. See mutateSecrets for the concurrency model.

func (*AWSProvider) UnsetSecret

func (p *AWSProvider) UnsetSecret(ctx context.Context, appName string, key string) error

UnsetSecret performs an optimistic read-modify-write that survives concurrent writers. Returns nil if the key was already absent.

func (*AWSProvider) UpdateSecrets

func (p *AWSProvider) UpdateSecrets(ctx context.Context, appName string, secrets map[string]string) error

UpdateSecrets is the public write entry point. It diffs against the remote blob first to avoid polluting version history and save API calls, then delegates to writeSecretBlob. Callers that already hold the pre-image (e.g. mutateSecrets) should call writeSecretBlob directly to skip the diff.

type DeploymentEntry

type DeploymentEntry struct {
	S3Key       string `json:"s3_key"`
	GitCommit   string `json:"git_commit,omitempty"`
	GitDirty    bool   `json:"git_dirty,omitempty"`
	GeneratedAt string `json:"generated_at,omitempty"`
}

DeploymentEntry records a single Lambda deployment with the git commit it was built from, so rollbacks can be addressed by commit hash rather than opaque S3 keys.

type ImageOptConfig

type ImageOptConfig struct {
	AllowedDomains []string `json:"allowed_domains"`
	DeviceSizes    []int    `json:"device_sizes"`
	ImageSizes     []int    `json:"image_sizes"`
	Formats        []string `json:"formats"`
}

ImageOptConfig is the JSON contract consumed by the imgopt Lambda binary. AllowedDomains is the flattened list of every Next.js image source — both the legacy `images.domains[]` and the hostnames extracted from `images.remotePatterns[]`. The nextcore feature detector merges both into HasExternalImages, so the imgopt lambda only needs the flat list.

Jump to

Keyboard shortcuts

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