Documentation
¶
Overview ¶
Package lambda provides a mock AWS Lambda service for Gopherstack. Supports Image-based (PackageType: Image) and Zip-based (PackageType: Zip) functions. Zip functions use runtime-to-base-image mapping to select an AWS ECR base image and bind-mount the extracted code at /var/task.
Index ¶
- Constants
- Variables
- type AccountLimit
- type AccountSettingsOutput
- type AccountUsage
- type AddLayerVersionPermissionInput
- type AddLayerVersionPermissionOutput
- type AddPermissionInput
- type AddPermissionOutput
- type AliasRoutingConfig
- type AllowedPublishers
- type AmazonManagedKafkaEventSourceConfig
- type AsyncDestinationDelivery
- type CWLogsBackend
- type CapacityProvider
- type CheckpointDurableExecutionInput
- type CheckpointDurableExecutionOutput
- type CodeSigningConfig
- type CodeSigningPolicies
- type CreateAliasInput
- type CreateCapacityProviderInput
- type CreateCapacityProviderOutput
- type CreateCodeSigningConfigInput
- type CreateCodeSigningConfigOutput
- type CreateEventSourceMappingInput
- type CreateFunctionInput
- type CreateFunctionURLConfigInput
- type DNSRegistrar
- type DeadLetterConfig
- type Destination
- type DestinationConfig
- type DocumentDBEventSourceConfig
- type DurableExecution
- type DurableExecutionEvent
- type DurableExecutionState
- type DurableExecutionStatus
- type DynamoDBStreamRecord
- type DynamoDBStreamsReader
- type ESMDestination
- type ESMDestinationConfig
- type EnvironmentConfig
- type EphemeralStorageConfig
- type Error
- type EventSourceMapping
- type EventSourceMappingState
- type EventSourcePoller
- type FISInvocationFault
- type FileSystemConfig
- type Filter
- type FilterCriteria
- type FunctionAlias
- type FunctionCode
- type FunctionCodeLocation
- type FunctionConcurrency
- type FunctionConfiguration
- type FunctionEventInvokeConfig
- type FunctionLayer
- type FunctionPermission
- type FunctionRecursionConfig
- type FunctionScalingConfig
- type FunctionState
- type FunctionURLConfig
- type FunctionURLCors
- type FunctionVersion
- type GetFunctionCodeSigningConfigOutput
- type GetFunctionOutput
- type GetLayerVersionOutput
- type GetPolicyOutput
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExecuteFISAction(ctx context.Context, action service.FISActionExecution) error
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) FISActions() []service.FISActionDefinition
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) IAMAction(r *http.Request) string
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Purge(ctx context.Context, cutoff time.Time)
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- func (h *Handler) TagFunctionByARN(_ context.Context, fnARN string, newTags map[string]string) error
- func (h *Handler) TaggedFunctions(_ context.Context) []TaggedFunctionInfo
- func (h *Handler) UntagFunctionByARN(_ context.Context, fnARN string, tagKeys []string) error
- type ImageConfig
- type InMemoryBackend
- func (b *InMemoryBackend) AddLayerVersionPermission(layerName string, version int64, input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error)
- func (b *InMemoryBackend) AddPermission(functionName, qualifier string, input *AddPermissionInput) (*AddPermissionOutput, error)
- func (b *InMemoryBackend) Close(ctx context.Context)
- func (b *InMemoryBackend) CreateAlias(name string, input *CreateAliasInput) (*FunctionAlias, error)
- func (b *InMemoryBackend) CreateCapacityProvider(input *CreateCapacityProviderInput) (*CapacityProvider, error)
- func (b *InMemoryBackend) CreateCodeSigningConfig(input *CreateCodeSigningConfigInput) (*CodeSigningConfig, error)
- func (b *InMemoryBackend) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMapping, error)
- func (b *InMemoryBackend) CreateFunction(fn *FunctionConfiguration) error
- func (b *InMemoryBackend) CreateFunctionURLConfig(ctx context.Context, functionName, authType string, cors *FunctionURLCors, ...) (*FunctionURLConfig, error)
- func (b *InMemoryBackend) DeleteAlias(name, aliasName string) error
- func (b *InMemoryBackend) DeleteCapacityProvider(name string) error
- func (b *InMemoryBackend) DeleteCodeSigningConfig(cscARN string) error
- func (b *InMemoryBackend) DeleteEventSourceMapping(id string) (*EventSourceMapping, error)
- func (b *InMemoryBackend) DeleteFunction(name string) error
- func (b *InMemoryBackend) DeleteFunctionCodeSigningConfig(functionName string) error
- func (b *InMemoryBackend) DeleteFunctionConcurrency(name string) error
- func (b *InMemoryBackend) DeleteFunctionEventInvokeConfig(name string) error
- func (b *InMemoryBackend) DeleteFunctionURLConfig(functionName string) error
- func (b *InMemoryBackend) DeleteLayerVersion(layerName string, version int64) error
- func (b *InMemoryBackend) DeleteProvisionedConcurrencyConfig(name, qualifier string) error
- func (b *InMemoryBackend) GetAccountSettings() *AccountSettingsOutput
- func (b *InMemoryBackend) GetAlias(name, aliasName string) (*FunctionAlias, error)
- func (b *InMemoryBackend) GetCapacityProvider(name string) (*CapacityProvider, error)
- func (b *InMemoryBackend) GetCodeSigningConfig(cscARN string) (*CodeSigningConfig, error)
- func (b *InMemoryBackend) GetEventSourceMapping(uuid string) (*EventSourceMapping, error)
- func (b *InMemoryBackend) GetFunction(name string) (*FunctionConfiguration, error)
- func (b *InMemoryBackend) GetFunctionByQualifier(name, qualifier string) (*FunctionConfiguration, error)
- func (b *InMemoryBackend) GetFunctionCodeSigningConfig(functionName string) (string, error)
- func (b *InMemoryBackend) GetFunctionConcurrency(name string) (*FunctionConcurrency, error)
- func (b *InMemoryBackend) GetFunctionEventInvokeConfig(name string) (*FunctionEventInvokeConfig, error)
- func (b *InMemoryBackend) GetFunctionRecursionConfig(name string) (*FunctionRecursionConfig, error)
- func (b *InMemoryBackend) GetFunctionScalingConfig(name string) (*FunctionScalingConfig, error)
- func (b *InMemoryBackend) GetFunctionURLConfig(functionName string) (*FunctionURLConfig, error)
- func (b *InMemoryBackend) GetLayerVersion(layerName string, version int64) (*GetLayerVersionOutput, error)
- func (b *InMemoryBackend) GetLayerVersionByArn(layerVersionARN string) (*GetLayerVersionOutput, error)
- func (b *InMemoryBackend) GetLayerVersionPolicy(layerName string, version int64) (*LayerVersionPolicy, error)
- func (b *InMemoryBackend) GetPolicy(functionName, qualifier string) (*GetPolicyOutput, error)
- func (b *InMemoryBackend) GetProvisionedConcurrencyConfig(name, qualifier string) (*ProvisionedConcurrencyConfig, error)
- func (b *InMemoryBackend) GetRuntimeManagementConfig(name string) (*RuntimeManagementConfig, error)
- func (b *InMemoryBackend) GetVersion(name, version string) (*FunctionVersion, error)
- func (b *InMemoryBackend) InvokeFunction(ctx context.Context, name string, invocationType InvocationType, ...) ([]byte, int, error)
- func (b *InMemoryBackend) InvokeFunctionWithQualifier(ctx context.Context, name, qualifier, clientContext, logType string, ...) ([]byte, string, string, int, error)
- func (b *InMemoryBackend) ListAliases(name, functionVersion, marker string, maxItems int) (page.Page[*FunctionAlias], error)
- func (b *InMemoryBackend) ListCapacityProviders() []*CapacityProvider
- func (b *InMemoryBackend) ListCodeSigningConfigs() []*CodeSigningConfig
- func (b *InMemoryBackend) ListEventSourceMappings(functionName, eventSourceARN, marker string, maxItems int) page.Page[*EventSourceMapping]
- func (b *InMemoryBackend) ListFunctionEventInvokeConfigs(name, marker string, maxItems int) ([]*FunctionEventInvokeConfig, string, error)
- func (b *InMemoryBackend) ListFunctionURLConfigs() []*FunctionURLConfig
- func (b *InMemoryBackend) ListFunctionVersionsByCapacityProvider(name, marker string, maxItems int) (page.Page[string], error)
- func (b *InMemoryBackend) ListFunctions(marker string, maxItems int) page.Page[*FunctionConfiguration]
- func (b *InMemoryBackend) ListFunctionsAll(marker string, maxItems int) page.Page[*FunctionConfiguration]
- func (b *InMemoryBackend) ListFunctionsByCodeSigningConfig(cscARN string) ([]string, error)
- func (b *InMemoryBackend) ListLayerVersions(layerName, compatibleRuntime string) ([]*LayerVersion, error)
- func (b *InMemoryBackend) ListLayers(compatibleRuntime, marker string, maxItems int) page.Page[*Layer]
- func (b *InMemoryBackend) ListProvisionedConcurrencyConfigs(name string) ([]*ProvisionedConcurrencyConfig, error)
- func (b *InMemoryBackend) ListVersionsByFunction(name, marker string, maxItems int) (page.Page[*FunctionVersion], error)
- func (b *InMemoryBackend) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error)
- func (b *InMemoryBackend) PublishVersion(name, description string) (*FunctionVersion, error)
- func (b *InMemoryBackend) Purge(ctx context.Context, cutoff time.Time)
- func (b *InMemoryBackend) PutFunctionCodeSigningConfig(functionName, cscARN string) error
- func (b *InMemoryBackend) PutFunctionConcurrency(name string, reserved int) (*FunctionConcurrency, error)
- func (b *InMemoryBackend) PutFunctionEventInvokeConfig(name string, input *PutFunctionEventInvokeConfigInput) (*FunctionEventInvokeConfig, error)
- func (b *InMemoryBackend) PutFunctionRecursionConfig(name string, input *PutFunctionRecursionConfigInput) (*FunctionRecursionConfig, error)
- func (b *InMemoryBackend) PutFunctionScalingConfig(name string, input *PutFunctionScalingConfigInput) (*FunctionScalingConfig, error)
- func (b *InMemoryBackend) PutProvisionedConcurrencyConfig(name, qualifier string, requested int) (*ProvisionedConcurrencyConfig, error)
- func (b *InMemoryBackend) PutRuntimeManagementConfig(name string, input *PutRuntimeManagementConfigInput) (*RuntimeManagementConfig, error)
- func (b *InMemoryBackend) RemoveLayerVersionPermission(layerName string, version int64, statementID string) error
- func (b *InMemoryBackend) RemovePermission(functionName, qualifier, statementID string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SeedCapacityProviderFunctionVersions(name string, versions ...string) error
- func (b *InMemoryBackend) SetActivationDelay(d time.Duration)
- func (b *InMemoryBackend) SetAsyncDestinationDelivery(d AsyncDestinationDelivery)
- func (b *InMemoryBackend) SetCWLogsBackend(cwl CWLogsBackend)
- func (b *InMemoryBackend) SetDNSRegistrar(r DNSRegistrar)
- func (b *InMemoryBackend) SetDynamoDBStreamsReader(r DynamoDBStreamsReader)
- func (b *InMemoryBackend) SetKinesisPoller(p *EventSourcePoller)
- func (b *InMemoryBackend) SetProvisionedConcurrencyDelay(d time.Duration)
- func (b *InMemoryBackend) SetS3CodeFetcher(f S3CodeFetcher)
- func (b *InMemoryBackend) SetSQSReader(r SQSReader)
- func (b *InMemoryBackend) SetSigV4Secret(secret string)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartKinesisPoller(ctx context.Context)
- func (b *InMemoryBackend) TagResource(functionName string, tags map[string]string) error
- func (b *InMemoryBackend) UntagResource(functionName string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateAlias(name, aliasName string, input *UpdateAliasInput) (*FunctionAlias, error)
- func (b *InMemoryBackend) UpdateCapacityProvider(name string, input *UpdateCapacityProviderInput) (*CapacityProvider, error)
- func (b *InMemoryBackend) UpdateCodeSigningConfig(cscARN string, input *UpdateCodeSigningConfigInput) (*CodeSigningConfig, error)
- func (b *InMemoryBackend) UpdateEventSourceMapping(id string, input *UpdateEventSourceMappingInput) (*EventSourceMapping, error)
- func (b *InMemoryBackend) UpdateFunction(fn *FunctionConfiguration) error
- func (b *InMemoryBackend) UpdateFunctionEventInvokeConfig(name string, input *PutFunctionEventInvokeConfigInput) (*FunctionEventInvokeConfig, error)
- func (b *InMemoryBackend) UpdateFunctionURLConfig(functionName, authType string, cors *FunctionURLCors) (*FunctionURLConfig, error)
- type InvocationType
- type Janitor
- type KinesisReader
- type KinesisRecord
- type LastUpdateStatus
- type Layer
- type LayerVersion
- type LayerVersionContent
- type LayerVersionContentInput
- type LayerVersionPolicy
- type LayerVersionStatement
- type ListAliasesOutput
- type ListCapacityProvidersOutput
- type ListCodeSigningConfigsOutput
- type ListFunctionEventInvokeConfigsOutput
- type ListFunctionURLConfigsOutput
- type ListFunctionsByCodeSigningConfigOutput
- type ListFunctionsOutput
- type ListLayerVersionsOutput
- type ListLayersOutput
- type ListProvisionedConcurrencyConfigsOutput
- type ListVersionsByFunctionOutput
- type LoggingConfig
- type Provider
- type ProvisionedConcurrencyConfig
- type PublishLayerVersionInput
- type PublishLayerVersionOutput
- type PutFunctionCodeSigningConfigInput
- type PutFunctionCodeSigningConfigOutput
- type PutFunctionConcurrencyInput
- type PutFunctionEventInvokeConfigInput
- type PutFunctionRecursionConfigInput
- type PutFunctionScalingConfigInput
- type PutProvisionedConcurrencyConfigInput
- type PutRuntimeManagementConfigInput
- type QualifierInvoker
- type QualifierResolver
- type RuntimeManagementConfig
- type S3CodeFetcher
- type SQSMessage
- type SQSMessageAttribute
- type SQSReader
- type SelfManagedEventSource
- type SelfManagedKafkaEventSourceConfig
- type Settings
- type SettingsProvider
- type SnapStart
- type SnapStartResponse
- type SourceAccessConfiguration
- type StorageBackend
- type TaggedFunctionInfo
- type TracingConfig
- type UpdateAliasInput
- type UpdateCapacityProviderInput
- type UpdateCapacityProviderOutput
- type UpdateCodeSigningConfigInput
- type UpdateCodeSigningConfigOutput
- type UpdateEventSourceMappingInput
- type UpdateFunctionCodeInput
- type UpdateFunctionConfigurationInput
- type UpdateFunctionURLConfigInput
- type VpcConfig
Constants ¶
const ( SnapStartApplyOnNone = "None" SnapStartApplyOnPublishedVersions = "PublishedVersions" )
const PackageTypeImage = "Image"
PackageTypeImage is the Image-based Lambda package type (Docker image).
const PackageTypeZip = "Zip"
PackageTypeZip is the Zip-based Lambda package type (code archive).
Variables ¶
var ErrAliasAlreadyExists = errors.New("ResourceConflictException")
ErrAliasAlreadyExists is returned when creating an alias that already exists.
var ErrAliasNotFound = errors.New("ResourceNotFoundException")
ErrAliasNotFound is returned when the specified alias does not exist.
var ErrCodeSigningConfigNotFound = errors.New("CodeSigningConfigNotFoundException")
ErrCodeSigningConfigNotFound is returned when a function has no code signing config associated.
var ErrDurableExecutionNotFound = errors.New("durable execution not found")
ErrDurableExecutionNotFound is returned when a durable execution does not exist.
var ErrESMNotFound = errors.New("ResourceNotFoundException")
ErrESMNotFound is returned when an event source mapping UUID is not found.
var ErrEventInvokeConfigNotFound = errors.New("ResourceNotFoundException")
ErrEventInvokeConfigNotFound is returned when no event invoke config exists for the function.
var ErrFISInvocationError = errors.New("FunctionError: FIS fault injection: invocation error")
ErrFISInvocationError is returned when a FIS invocation-error action is active for a function.
var ErrFunctionAlreadyExists = errors.New("ResourceConflictException")
ErrFunctionAlreadyExists is returned when creating a function that already exists.
var ErrFunctionConcurrencyNotFound = errors.New("ResourceNotFoundException")
ErrFunctionConcurrencyNotFound is returned when a function has no reserved concurrency configured.
var ErrFunctionNotFound = errors.New("ResourceNotFoundException")
ErrFunctionNotFound is returned when the specified Lambda function does not exist.
var ErrFunctionURLForbidden = errors.New("Forbidden")
ErrFunctionURLForbidden is returned when an AWS_IAM function URL request is missing or has an invalid SigV4 signature.
var ErrFunctionURLNotFound = errors.New("ResourceNotFoundException")
ErrFunctionURLNotFound is returned when no function URL config exists for the function.
var ErrInvalidParameterValue = errors.New("InvalidParameterValueException")
ErrInvalidParameterValue is returned when a request parameter has an invalid value.
var ErrInvocationTimeout = errors.New("lambda invocation timed out")
ErrInvocationTimeout is returned when a Lambda invocation exceeds its deadline.
ErrLambdaUnavailable is returned when Lambda cannot invoke (no Docker or no port range).
var ErrLayerNotFound = errors.New("ResourceNotFoundException")
ErrLayerNotFound is returned when the specified layer does not exist.
var ErrLayerVersionNotFound = errors.New("ResourceNotFoundException")
ErrLayerVersionNotFound is returned when the specified layer version does not exist.
var ErrNoPolicyFound = errors.New("ResourceNotFoundException")
ErrNoPolicyFound is returned when a function has no resource-based policy (no permissions).
var ErrProvisionedConcurrencyConfigNotFound = errors.New("ResourceNotFoundException")
ErrProvisionedConcurrencyConfigNotFound is returned when no provisioned concurrency config exists for the qualifier.
var ErrTooManyRequests = errors.New("TooManyRequestsException")
ErrTooManyRequests is returned when a function's reserved concurrency limit is exhausted.
var ErrVersionNotFound = errors.New("ResourceNotFoundException")
ErrVersionNotFound is returned when the specified function version does not exist.
var ErrZipSlip = errors.New("zip entry escapes target directory")
ErrZipSlip is returned when a ZIP archive entry has a path that would escape the target directory.
Functions ¶
This section is empty.
Types ¶
type AccountLimit ¶
type AccountLimit struct {
CodeSizeUnzipped int64 `json:"CodeSizeUnzipped"`
CodeSizeZipped int64 `json:"CodeSizeZipped"`
ConcurrentExecutions int `json:"ConcurrentExecutions"`
TotalCodeSize int64 `json:"TotalCodeSize"`
UnreservedConcurrentExecutions int `json:"UnreservedConcurrentExecutions"`
}
AccountLimit holds the Lambda account-level limits.
type AccountSettingsOutput ¶
type AccountSettingsOutput struct {
AccountLimit *AccountLimit `json:"AccountLimit"`
AccountUsage *AccountUsage `json:"AccountUsage"`
}
AccountSettingsOutput is the response for GetAccountSettings.
type AccountUsage ¶
type AccountUsage struct {
FunctionCount int `json:"FunctionCount"`
TotalCodeSize int64 `json:"TotalCodeSize"`
}
AccountUsage holds the Lambda account-level usage.
type AddLayerVersionPermissionInput ¶
type AddLayerVersionPermissionInput struct {
Action string `json:"Action"`
Principal string `json:"Principal"`
StatementID string `json:"StatementId"`
OrganizationID string `json:"OrganizationId,omitempty"`
}
AddLayerVersionPermissionInput is the request body for AddLayerVersionPermission.
type AddLayerVersionPermissionOutput ¶
type AddLayerVersionPermissionOutput struct {
Statement string `json:"Statement"`
RevisionID string `json:"RevisionId"`
}
AddLayerVersionPermissionOutput is the response for AddLayerVersionPermission.
type AddPermissionInput ¶
type AddPermissionInput struct {
Action string `json:"Action"`
Principal string `json:"Principal"`
StatementID string `json:"StatementId"`
SourceAccount string `json:"SourceAccount,omitempty"`
SourceArn string `json:"SourceArn,omitempty"`
EventSourceToken string `json:"EventSourceToken,omitempty"`
PrincipalOrgID string `json:"PrincipalOrgID,omitempty"`
}
AddPermissionInput is the request body for AddPermission.
type AddPermissionOutput ¶
type AddPermissionOutput struct {
Statement *string `json:"Statement,omitempty"`
}
AddPermissionOutput is the response for AddPermission.
type AliasRoutingConfig ¶
type AliasRoutingConfig struct {
AdditionalVersionWeights map[string]float64 `json:"AdditionalVersionWeights,omitempty"`
}
AliasRoutingConfig holds weighted traffic routing for a Lambda alias.
type AllowedPublishers ¶
type AllowedPublishers struct {
SigningProfileVersionArns []string `json:"SigningProfileVersionArns"`
}
AllowedPublishers holds the signing profile version ARNs allowed for code signing.
type AmazonManagedKafkaEventSourceConfig ¶
type AmazonManagedKafkaEventSourceConfig struct {
ConsumerGroupID string `json:"ConsumerGroupId,omitempty"`
}
AmazonManagedKafkaEventSourceConfig holds configuration for Amazon MSK event sources.
type AsyncDestinationDelivery ¶
type AsyncDestinationDelivery interface {
// DeliverToTarget sends payload to the given target ARN. attributes are
// surfaced as message attributes for SQS/SNS targets (e.g. the DLQ metadata
// AWS attaches: RequestID, ErrorCode, ErrorMessage).
DeliverToTarget(ctx context.Context, targetARN string, payload []byte, attributes map[string]string) error
}
AsyncDestinationDelivery delivers an async-invocation outcome to a configured target ARN (an SQS queue, SNS topic, EventBridge bus, or Lambda function). It is implemented by an adapter in the CLI wiring layer that routes by the target ARN's service. When no delivery implementation is wired, DeadLetterConfig and DestinationConfig are stored but not delivered (the pre-parity behaviour).
type CWLogsBackend ¶
type CWLogsBackend interface {
EnsureLogGroupAndStream(groupName, streamName string) error
PutLogLines(groupName, streamName string, messages []string) error
}
CWLogsBackend is the minimum CloudWatch Logs interface needed by Lambda for log delivery.
type CapacityProvider ¶
type CapacityProvider struct {
CapacityProviderArn string `json:"CapacityProviderArn"`
LastModifiedTime string `json:"LastModifiedTime"`
Name string `json:"Name"`
Status string `json:"Status,omitempty"`
AssignedFunctionVersions []string `json:"-"`
TargetOnDemandConcurrency int `json:"TargetOnDemandConcurrency,omitempty"`
}
CapacityProvider holds a Lambda capacity provider configuration.
type CheckpointDurableExecutionInput ¶
type CheckpointDurableExecutionInput struct {
Marker *string `json:"Marker,omitempty"`
}
CheckpointDurableExecutionInput is the request body for CheckpointDurableExecution.
type CheckpointDurableExecutionOutput ¶
type CheckpointDurableExecutionOutput struct{}
CheckpointDurableExecutionOutput is the response for CheckpointDurableExecution.
type CodeSigningConfig ¶
type CodeSigningConfig struct {
AllowedPublishers *AllowedPublishers `json:"AllowedPublishers"`
CodeSigningConfigArn string `json:"CodeSigningConfigArn"`
CodeSigningConfigID string `json:"CodeSigningConfigId"`
CodeSigningPolicies *CodeSigningPolicies `json:"CodeSigningPolicies,omitempty"`
Description string `json:"Description,omitempty"`
LastModified string `json:"LastModified"`
}
CodeSigningConfig holds a Lambda code signing configuration.
type CodeSigningPolicies ¶
type CodeSigningPolicies struct {
UntrustedArtifactOnDeployment string `json:"UntrustedArtifactOnDeployment,omitempty"`
}
CodeSigningPolicies holds the Lambda code signing policy.
type CreateAliasInput ¶
type CreateAliasInput struct {
RoutingConfig *AliasRoutingConfig `json:"RoutingConfig,omitempty"`
Description string `json:"Description,omitempty"`
FunctionVersion string `json:"FunctionVersion"`
Name string `json:"Name"`
}
CreateAliasInput holds the request body for CreateAlias.
type CreateCapacityProviderInput ¶
type CreateCapacityProviderInput struct {
Name string `json:"Name"`
TargetOnDemandConcurrency int `json:"TargetOnDemandConcurrency,omitempty"`
}
CreateCapacityProviderInput is the request body for CreateCapacityProvider.
type CreateCapacityProviderOutput ¶
type CreateCapacityProviderOutput struct {
CapacityProvider *CapacityProvider `json:"CapacityProvider"`
}
CreateCapacityProviderOutput is the response for CreateCapacityProvider.
type CreateCodeSigningConfigInput ¶
type CreateCodeSigningConfigInput struct {
AllowedPublishers *AllowedPublishers `json:"AllowedPublishers"`
CodeSigningPolicies *CodeSigningPolicies `json:"CodeSigningPolicies,omitempty"`
Description string `json:"Description,omitempty"`
}
CreateCodeSigningConfigInput is the request body for CreateCodeSigningConfig.
type CreateCodeSigningConfigOutput ¶
type CreateCodeSigningConfigOutput struct {
CodeSigningConfig *CodeSigningConfig `json:"CodeSigningConfig"`
}
CreateCodeSigningConfigOutput is the response for CreateCodeSigningConfig.
type CreateEventSourceMappingInput ¶
type CreateEventSourceMappingInput struct {
FilterCriteria *FilterCriteria
DestinationConfig *ESMDestinationConfig
AmazonManagedKafkaEventSourceConfig *AmazonManagedKafkaEventSourceConfig
SelfManagedKafkaEventSourceConfig *SelfManagedKafkaEventSourceConfig
SelfManagedEventSource *SelfManagedEventSource
DocumentDBEventSourceConfig *DocumentDBEventSourceConfig
EventSourceARN string
FunctionName string
StartingPosition string
SourceAccessConfigurations []SourceAccessConfiguration
Topics []string
Queues []string
FunctionResponseTypes []string
BatchSize int
MaximumBatchingWindowInSeconds int
TumblingWindowInSeconds int
MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
BisectBatchOnFunctionError bool
Enabled bool
}
CreateEventSourceMappingInput is the input for CreateEventSourceMapping.
type CreateFunctionInput ¶
type CreateFunctionInput struct {
Environment *EnvironmentConfig `json:"Environment,omitempty"`
ImageConfig *ImageConfig `json:"ImageConfig,omitempty"`
VpcConfig *VpcConfig `json:"VpcConfig,omitempty"`
TracingConfig *TracingConfig `json:"TracingConfig,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty"`
EphemeralStorage *EphemeralStorageConfig `json:"EphemeralStorage,omitempty"`
Code *FunctionCode `json:"Code"`
SnapStart *SnapStart `json:"SnapStart,omitempty"`
Tags map[string]string `json:"Tags,omitempty"`
FunctionName string `json:"FunctionName"`
Description string `json:"Description"`
PackageType string `json:"PackageType"`
Runtime string `json:"Runtime,omitempty"`
Handler string `json:"Handler,omitempty"`
Role string `json:"Role"`
FileSystemConfigs []*FileSystemConfig `json:"FileSystemConfigs,omitempty"`
// Layers is a list of layer ARN strings supplied by the client.
Layers []string `json:"Layers,omitempty"`
Architectures []string `json:"Architectures,omitempty"`
MemorySize int `json:"MemorySize"`
Timeout int `json:"Timeout"`
// Publish, when true, creates the function and immediately publishes version 1.
Publish bool `json:"Publish,omitempty"`
}
CreateFunctionInput holds the request body for CreateFunction.
type CreateFunctionURLConfigInput ¶
type CreateFunctionURLConfigInput struct {
Cors *FunctionURLCors `json:"Cors,omitempty"`
AuthType string `json:"AuthType"`
InvokeMode string `json:"InvokeMode,omitempty"`
}
CreateFunctionURLConfigInput is the request body for CreateFunctionUrlConfig.
type DNSRegistrar ¶
DNSRegistrar is an optional interface for registering synthetic DNS hostnames.
type DeadLetterConfig ¶
type DeadLetterConfig struct {
TargetArn string `json:"TargetArn,omitempty"`
}
DeadLetterConfig holds the dead-letter queue/topic configuration for a Lambda function.
type Destination ¶
type Destination struct {
Destination string `json:"Destination"`
}
Destination holds the ARN for an async invocation destination (SQS, SNS, Lambda, or EventBridge).
type DestinationConfig ¶
type DestinationConfig struct {
OnFailure *Destination `json:"OnFailure,omitempty"`
OnSuccess *Destination `json:"OnSuccess,omitempty"`
}
DestinationConfig holds optional success and failure destinations for async invocations.
type DocumentDBEventSourceConfig ¶
type DocumentDBEventSourceConfig struct {
CollectionName string `json:"CollectionName,omitempty"`
DatabaseName string `json:"DatabaseName,omitempty"`
FullDocument string `json:"FullDocument,omitempty"`
}
DocumentDBEventSourceConfig holds configuration for Amazon DocumentDB event sources.
type DurableExecution ¶
type DurableExecution struct {
ExecutionARN string `json:"ExecutionArn"`
FunctionARN string `json:"FunctionArn,omitempty"`
Status DurableExecutionStatus `json:"Status"`
CheckpointData map[string]any `json:"CheckpointData,omitempty"`
StartTime time.Time `json:"StartTime"`
StopTime *time.Time `json:"StopTime,omitempty"`
History []DurableExecutionEvent `json:"Events,omitempty"`
}
DurableExecution represents a Lambda Durable Execution record.
type DurableExecutionEvent ¶
type DurableExecutionEvent struct {
Timestamp time.Time `json:"Timestamp"`
EventType string `json:"EventType"`
Details string `json:"Details,omitempty"`
}
DurableExecutionEvent represents a single event in a durable execution history.
type DurableExecutionState ¶
type DurableExecutionState struct {
StateData map[string]any `json:"StateData,omitempty"`
ExecutionARN string `json:"ExecutionArn"`
Status DurableExecutionStatus `json:"Status"`
}
DurableExecutionState holds the current state of a durable execution.
type DurableExecutionStatus ¶
type DurableExecutionStatus string
DurableExecutionStatus represents the lifecycle state of a durable execution.
const ( // DurableExecutionStatusRunning means the execution is in progress. DurableExecutionStatusRunning DurableExecutionStatus = "RUNNING" // DurableExecutionStatusStopped means the execution was stopped. DurableExecutionStatusStopped DurableExecutionStatus = "STOPPED" // DurableExecutionStatusSucceeded means the execution completed successfully. DurableExecutionStatusSucceeded DurableExecutionStatus = "SUCCEEDED" // DurableExecutionStatusFailed means the execution failed. DurableExecutionStatusFailed DurableExecutionStatus = "FAILED" )
type DynamoDBStreamRecord ¶
type DynamoDBStreamRecord struct {
NewImage map[string]any
OldImage map[string]any
Keys map[string]any
EventID string
EventName string // INSERT, MODIFY, or REMOVE
SequenceNumber string
StreamViewType string
ApproximateCreationDateTime float64 // Unix epoch seconds
SizeBytes int64
}
DynamoDBStreamRecord is a single record from a DynamoDB stream. The image fields use DynamoDB JSON wire format (e.g. {"pk": {"S": "value"}}).
type DynamoDBStreamsReader ¶
type DynamoDBStreamsReader interface {
// DescribeStreamShards returns the ordered list of shard IDs for the stream.
// streamARN is the full DynamoDB stream ARN.
DescribeStreamShards(streamARN string) ([]string, error)
// GetStreamShardIterator returns an iterator for a specific shard of the stream.
// streamARN is the full DynamoDB stream ARN, shardID is the shard identifier,
// and iteratorType is TRIM_HORIZON or LATEST.
GetStreamShardIterator(streamARN, shardID, iteratorType string) (string, error)
// GetStreamRecords reads up to limit records from the given iterator.
GetStreamRecords(iteratorToken string, limit int) ([]DynamoDBStreamRecord, string, error)
}
DynamoDBStreamsReader reads records from a DynamoDB stream. It is implemented by the DynamoDB backend adapter in the CLI wiring layer.
type ESMDestination ¶
type ESMDestination struct {
Destination string `json:"Destination"`
}
ESMDestination holds the ARN for an event source mapping destination.
type ESMDestinationConfig ¶
type ESMDestinationConfig struct {
OnFailure *ESMDestination `json:"OnFailure,omitempty"`
}
ESMDestinationConfig holds on-failure destination for event source mappings.
type EnvironmentConfig ¶
EnvironmentConfig holds Lambda function environment variables.
type EphemeralStorageConfig ¶
type EphemeralStorageConfig struct {
Size int32 `json:"Size"`
}
EphemeralStorageConfig holds the ephemeral storage (/tmp) configuration for a Lambda function.
type EventSourceMapping ¶
type EventSourceMapping struct {
LastModified time.Time `json:"lastModified"`
FilterCriteria *FilterCriteria `json:"filterCriteria,omitempty"`
DestinationConfig *ESMDestinationConfig `json:"destinationConfig,omitempty"`
AmazonManagedKafkaEventSourceConfig *AmazonManagedKafkaEventSourceConfig `json:"mskConfig,omitempty"`
SelfManagedKafkaEventSourceConfig *SelfManagedKafkaEventSourceConfig `json:"selfManagedKafkaConfig,omitempty"`
SelfManagedEventSource *SelfManagedEventSource `json:"selfManagedEventSource,omitempty"`
DocumentDBEventSourceConfig *DocumentDBEventSourceConfig `json:"docdbConfig,omitempty"`
EventSourceARN string `json:"eventSourceARN"`
FunctionARN string `json:"functionARN"`
UUID string `json:"uuid"`
State EventSourceMappingState `json:"state"`
StartingPosition string `json:"startingPosition"`
LastProcessingResult string `json:"lastProcessingResult"`
SourceAccessConfigurations []SourceAccessConfiguration `json:"sourceAccessConfigurations,omitempty"`
Topics []string `json:"topics,omitempty"`
Queues []string `json:"queues,omitempty"`
FunctionResponseTypes []string `json:"functionResponseTypes,omitempty"`
BatchSize int `json:"batchSize"`
MaximumBatchingWindowInSeconds int `json:"maxBatchingWindowSecs,omitempty"`
TumblingWindowInSeconds int `json:"tumblingWindowInSeconds,omitempty"`
MaximumRecordAgeInSeconds int `json:"maximumRecordAgeInSeconds,omitempty"`
MaximumRetryAttempts int `json:"maximumRetryAttempts,omitempty"`
ParallelizationFactor int `json:"parallelizationFactor,omitempty"`
BisectBatchOnFunctionError bool `json:"bisectBatchOnFunctionError,omitempty"`
}
EventSourceMapping represents a Lambda event source mapping.
type EventSourceMappingState ¶
type EventSourceMappingState string
EventSourceMappingState represents the lifecycle state of an event source mapping.
const ( // ESMStateEnabled means the mapping is active and will be invoked. ESMStateEnabled EventSourceMappingState = "Enabled" // ESMStateDisabled means the mapping is paused. ESMStateDisabled EventSourceMappingState = "Disabled" // ESMStateEnabling means the mapping is transitioning to Enabled. ESMStateEnabling EventSourceMappingState = "Enabling" // ESMStateDisabling means the mapping is transitioning to Disabled. ESMStateDisabling EventSourceMappingState = "Disabling" // ESMStateDeleting means the mapping is being deleted. ESMStateDeleting EventSourceMappingState = "Deleting" )
type EventSourcePoller ¶
type EventSourcePoller struct {
// contains filtered or unexported fields
}
EventSourcePoller polls Kinesis streams, SQS queues, and DynamoDB streams for new records and invokes Lambda functions for enabled event source mappings.
func NewEventSourcePoller ¶
func NewEventSourcePoller( lambdaBackend *InMemoryBackend, kinesisReader KinesisReader, ) *EventSourcePoller
NewEventSourcePoller creates a new EventSourcePoller.
func (*EventSourcePoller) Notify ¶
func (p *EventSourcePoller) Notify()
Notify triggers an immediate poll cycle without waiting for the next tick. It is safe to call concurrently. If a notification is already pending, this is a no-op.
func (*EventSourcePoller) RemoveMapping ¶
func (p *EventSourcePoller) RemoveMapping(uuid string)
RemoveMapping removes any per-mapping poller state for the given ESM UUID.
func (*EventSourcePoller) SetDynamoDBStreamsReader ¶
func (p *EventSourcePoller) SetDynamoDBStreamsReader(r DynamoDBStreamsReader)
SetDynamoDBStreamsReader sets the DynamoDB Streams reader used to poll DynamoDB streams for ESM delivery.
func (*EventSourcePoller) SetSQSReader ¶
func (p *EventSourcePoller) SetSQSReader(r SQSReader)
SetSQSReader sets the SQS reader used to poll SQS queues for ESM delivery.
func (*EventSourcePoller) Start ¶
func (p *EventSourcePoller) Start(ctx context.Context)
Start runs the event source poller as a background goroutine. It returns immediately; the goroutine stops when ctx is cancelled.
type FISInvocationFault ¶
FISInvocationFault holds the fault configuration for a Lambda function invocation.
type FileSystemConfig ¶
type FileSystemConfig struct {
Arn string `json:"Arn"`
LocalMountPath string `json:"LocalMountPath"`
}
FileSystemConfig holds an EFS mount configuration for a Lambda function.
type Filter ¶
type Filter struct {
Pattern string `json:"Pattern,omitempty"`
}
Filter is a single filter pattern. Pattern is a serialized JSON document describing the expected event shape (AWS event-pattern matching syntax).
type FilterCriteria ¶
type FilterCriteria struct {
Filters []Filter `json:"Filters,omitempty"`
}
FilterCriteria mirrors the AWS Lambda EventSourceMapping FilterCriteria field. Each filter is a JSON pattern object; AWS allows up to 5 filters per mapping.
type FunctionAlias ¶
type FunctionAlias struct {
RoutingConfig *AliasRoutingConfig `json:"RoutingConfig,omitempty"`
AliasArn string `json:"AliasArn"`
Description string `json:"Description,omitempty"`
FunctionVersion string `json:"FunctionVersion"`
Name string `json:"Name"`
RevisionID string `json:"RevisionId"`
}
FunctionAlias holds an alias mapping (alias name → version number).
type FunctionCode ¶
type FunctionCode struct {
ImageURI string `json:"ImageUri,omitempty"`
S3Bucket string `json:"S3Bucket,omitempty"`
S3Key string `json:"S3Key,omitempty"`
ZipFile []byte `json:"ZipFile,omitempty"`
}
FunctionCode holds the code location for a Lambda function. For Image package type, only ImageUri is used. For Zip package type, either ZipFile (inline base64) or S3Bucket+S3Key is used.
type FunctionCodeLocation ¶
type FunctionCodeLocation struct {
ImageURI string `json:"ImageUri,omitempty"`
RepositoryType string `json:"RepositoryType,omitempty"`
Location string `json:"Location,omitempty"`
}
FunctionCodeLocation describes where the function code is stored.
type FunctionConcurrency ¶
type FunctionConcurrency struct {
ReservedConcurrentExecutions int `json:"ReservedConcurrentExecutions"`
}
FunctionConcurrency holds the reserved concurrency configuration for a Lambda function.
type FunctionConfiguration ¶
type FunctionConfiguration struct {
CreatedAt time.Time `json:"-"`
Environment *EnvironmentConfig `json:"Environment,omitempty"`
EphemeralStorage *EphemeralStorageConfig `json:"EphemeralStorage,omitempty"`
LoggingConfig *LoggingConfig `json:"LoggingConfig,omitempty"`
ReservedConcurrentExecutions *int `json:"ReservedConcurrentExecutions,omitempty"`
VpcConfig *VpcConfig `json:"VpcConfig,omitempty"`
TracingConfig *TracingConfig `json:"TracingConfig,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty"`
ImageConfig *ImageConfig `json:"ImageConfig,omitempty"`
Tags map[string]string `json:"Tags,omitempty"`
SnapStart *SnapStartResponse `json:"SnapStart,omitempty"`
ImageURI string `json:"ImageUri,omitempty"`
LastUpdateStatus LastUpdateStatus `json:"LastUpdateStatus"`
LastUpdateStatusReason string `json:"LastUpdateStatusReason,omitempty"`
// MasterArn is the ARN of the owner function for Lambda@Edge replicas.
// When set, GetFunctionConfiguration returns this field to signal the function is an edge replica.
MasterArn string `json:"MasterArn,omitempty"`
PackageType string `json:"PackageType"`
StateReason string `json:"StateReason,omitempty"`
StateReasonCode string `json:"StateReasonCode,omitempty"`
Role string `json:"Role"`
LastModified string `json:"LastModified"`
Runtime string `json:"Runtime,omitempty"`
RevisionID string `json:"RevisionId"`
Description string `json:"Description"`
FunctionArn string `json:"FunctionArn"`
State FunctionState `json:"State"`
FunctionName string `json:"FunctionName"`
CodeSha256 string `json:"CodeSha256,omitempty"`
S3BucketCode string `json:"-"`
S3KeyCode string `json:"-"`
Handler string `json:"Handler,omitempty"`
Version string `json:"Version,omitempty"`
FileSystemConfigs []*FileSystemConfig `json:"FileSystemConfigs,omitempty"`
ZipData []byte `json:"-"`
Layers []*FunctionLayer `json:"Layers,omitempty"`
Architectures []string `json:"Architectures,omitempty"`
MemorySize int `json:"MemorySize"`
Timeout int `json:"Timeout"`
CodeSize int64 `json:"CodeSize"`
}
type FunctionEventInvokeConfig ¶
type FunctionEventInvokeConfig struct {
LastModified time.Time `json:"LastModified"`
DestinationConfig *DestinationConfig `json:"DestinationConfig,omitempty"`
MaximumEventAgeInSeconds *int `json:"MaximumEventAgeInSeconds,omitempty"`
MaximumRetryAttempts *int `json:"MaximumRetryAttempts,omitempty"`
FunctionArn string `json:"FunctionArn"`
}
FunctionEventInvokeConfig holds the async invocation configuration for a Lambda function.
type FunctionLayer ¶
type FunctionLayer struct {
Arn string `json:"Arn,omitempty"`
CodeSize int64 `json:"CodeSize,omitempty"`
}
FunctionLayer holds a layer reference attached to a Lambda function.
type FunctionPermission ¶
type FunctionPermission struct {
Action string `json:"Action"`
Effect string `json:"Effect"`
FunctionName string `json:"-"`
Qualifier string `json:"-"`
Principal string `json:"Principal"`
SourceAccount string `json:"SourceAccount,omitempty"`
SourceArn string `json:"SourceArn,omitempty"`
EventSourceToken string `json:"EventSourceToken,omitempty"`
PrincipalOrgID string `json:"PrincipalOrgID,omitempty"`
StatementID string `json:"Sid"`
}
FunctionPermission is a single statement in a function resource-based policy. Qualifier records the version/alias this statement is scoped to (empty for the unqualified function-wide policy), matching real AWS per-qualifier policies.
type FunctionRecursionConfig ¶
type FunctionRecursionConfig struct {
RecursiveLoop string `json:"RecursiveLoop"`
}
FunctionRecursionConfig holds the recursion detection configuration for a Lambda function.
type FunctionScalingConfig ¶
type FunctionScalingConfig struct {
MaximumConcurrency *int `json:"MaximumConcurrency,omitempty"`
FunctionArn string `json:"FunctionArn,omitempty"`
}
FunctionScalingConfig holds the scaling configuration for a Lambda function.
type FunctionState ¶
type FunctionState string
FunctionState represents the lifecycle state of a Lambda function.
const ( // FunctionStateActive means the function is ready to be invoked. FunctionStateActive FunctionState = "Active" // FunctionStatePending means the function is being created. FunctionStatePending FunctionState = "Pending" // FunctionStateFailed means the function failed to deploy. FunctionStateFailed FunctionState = "Failed" // FunctionStateInactive means the function has been idle and its execution environment has been reclaimed. FunctionStateInactive FunctionState = "Inactive" )
type FunctionURLConfig ¶
type FunctionURLConfig struct {
Cors *FunctionURLCors `json:"Cors,omitempty"`
FunctionArn string `json:"FunctionArn"`
FunctionURL string `json:"FunctionUrl"`
AuthType string `json:"AuthType"`
InvokeMode string `json:"InvokeMode,omitempty"`
CreationTime string `json:"CreationTime"`
LastModifiedTime string `json:"LastModifiedTime"`
}
FunctionURLConfig holds the configuration for a Lambda function URL.
type FunctionURLCors ¶
type FunctionURLCors struct {
AllowOrigins []string `json:"AllowOrigins,omitempty"`
AllowMethods []string `json:"AllowMethods,omitempty"`
AllowHeaders []string `json:"AllowHeaders,omitempty"`
ExposeHeaders []string `json:"ExposeHeaders,omitempty"`
MaxAge int `json:"MaxAge,omitempty"`
AllowCredentials bool `json:"AllowCredentials,omitempty"`
}
FunctionURLCors holds CORS configuration for a Lambda function URL.
type FunctionVersion ¶
type FunctionVersion struct {
Environment *EnvironmentConfig `json:"Environment,omitempty"`
VpcConfig *VpcConfig `json:"VpcConfig,omitempty"`
TracingConfig *TracingConfig `json:"TracingConfig,omitempty"`
FileSystemConfigs []*FileSystemConfig `json:"FileSystemConfigs,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty"`
ImageConfig *ImageConfig `json:"ImageConfig,omitempty"`
SnapStart *SnapStartResponse `json:"SnapStart,omitempty"`
FunctionArn string `json:"FunctionArn"`
FunctionName string `json:"FunctionName"`
RevisionID string `json:"RevisionId"`
ImageURI string `json:"ImageUri,omitempty"`
PackageType string `json:"PackageType"`
Role string `json:"Role"`
Runtime string `json:"Runtime,omitempty"`
CreatedAt string `json:"LastModified"`
Handler string `json:"Handler,omitempty"`
State FunctionState `json:"State"`
Description string `json:"Description"`
Version string `json:"Version"`
CodeSha256 string `json:"CodeSha256,omitempty"`
Layers []*FunctionLayer `json:"Layers,omitempty"`
MemorySize int `json:"MemorySize"`
Timeout int `json:"Timeout"`
CodeSize int64 `json:"CodeSize"`
}
FunctionVersion holds an immutable snapshot of a Lambda function configuration at publish time.
type GetFunctionCodeSigningConfigOutput ¶
type GetFunctionCodeSigningConfigOutput struct {
CodeSigningConfigArn string `json:"CodeSigningConfigArn"`
FunctionName string `json:"FunctionName"`
}
GetFunctionCodeSigningConfigOutput is the response for GetFunctionCodeSigningConfig.
type GetFunctionOutput ¶
type GetFunctionOutput struct {
Configuration *FunctionConfiguration `json:"Configuration"`
Code *FunctionCodeLocation `json:"Code,omitempty"`
}
GetFunctionOutput is the response for GetFunction.
type GetLayerVersionOutput ¶
type GetLayerVersionOutput struct {
Content *LayerVersionContent `json:"Content"`
LayerVersionArn string `json:"LayerVersionArn"`
LayerArn string `json:"LayerArn"`
Description string `json:"Description,omitempty"`
CreatedDate string `json:"CreatedDate"`
LicenseInfo string `json:"LicenseInfo,omitempty"`
CompatibleRuntimes []string `json:"CompatibleRuntimes,omitempty"`
Version int64 `json:"Version"`
}
GetLayerVersionOutput is the response for GetLayerVersion.
type GetPolicyOutput ¶
type GetPolicyOutput struct {
Policy *string `json:"Policy,omitempty"`
RevisionID *string `json:"RevisionId,omitempty"`
}
GetPolicyOutput is the response for GetPolicy (returns the function resource policy JSON).
type Handler ¶
type Handler struct {
Backend StorageBackend
DefaultRegion string
AccountID string
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for Lambda operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Lambda handler with the given backend.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this Lambda instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExecuteFISAction ¶
ExecuteFISAction executes a FIS action against resolved Lambda function targets.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the Lambda operation name derived from the request method and path.
func (*Handler) ExtractResource ¶
ExtractResource returns the function name from the request path.
func (*Handler) FISActions ¶
func (h *Handler) FISActions() []service.FISActionDefinition
FISActions returns the FIS action definitions that the Lambda service supports.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported Lambda operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for Lambda operations.
func (*Handler) IAMAction ¶
IAMAction returns the IAM action for a Lambda HTTP request. It implements iam.ActionExtractor, providing per-service action extraction for Lambda REST API paths that are not covered by the global action mapper.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for the Lambda handler.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that identifies Lambda requests by path prefix.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend.
func (*Handler) StartWorker ¶
StartWorker starts the Kinesis event source poller and the resource janitor. It implements service.BackgroundWorker.
func (*Handler) TagFunctionByARN ¶
func (h *Handler) TagFunctionByARN(_ context.Context, fnARN string, newTags map[string]string) error
TagFunctionByARN applies tags to the Lambda function identified by its ARN.
func (*Handler) TaggedFunctions ¶
func (h *Handler) TaggedFunctions(_ context.Context) []TaggedFunctionInfo
TaggedFunctions returns a snapshot of all Lambda functions with their ARNs and tags. Intended for use by the Resource Groups Tagging API provider.
type ImageConfig ¶
type ImageConfig struct {
Command []string `json:"Command,omitempty"`
WorkingDirectory string `json:"WorkingDirectory,omitempty"`
EntryPoint []string `json:"EntryPoint,omitempty"`
}
ImageConfig holds optional image command/entrypoint overrides.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is a concurrency-safe in-memory Lambda backend.
func NewInMemoryBackend ¶
func NewInMemoryBackend( dockerClient container.Runtime, portAlloc *portalloc.Allocator, settings Settings, accountID, region string, ) *InMemoryBackend
NewInMemoryBackend creates a new Lambda in-memory backend with a background service context.
func NewInMemoryBackendWithContext ¶
func NewInMemoryBackendWithContext( svcCtx context.Context, dockerClient container.Runtime, portAlloc *portalloc.Allocator, settings Settings, accountID, region string, ) *InMemoryBackend
NewInMemoryBackendWithContext creates a new Lambda in-memory backend whose background goroutines are bounded by svcCtx. If svcCtx is nil, context.Background is used.
func (*InMemoryBackend) AddLayerVersionPermission ¶
func (b *InMemoryBackend) AddLayerVersionPermission( layerName string, version int64, input *AddLayerVersionPermissionInput, ) (*AddLayerVersionPermissionOutput, error)
AddLayerVersionPermission adds a permission statement to a layer version's resource policy.
func (*InMemoryBackend) AddPermission ¶
func (b *InMemoryBackend) AddPermission( functionName, qualifier string, input *AddPermissionInput, ) (*AddPermissionOutput, error)
AddPermission adds a permission statement to a function's resource-based policy. When qualifier is non-empty the statement is scoped to that version/alias, matching real Lambda: the invoker must then use the qualified ARN to invoke.
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close(ctx context.Context)
Close shuts down all active function URL servers and runtime API servers. It is safe to call concurrently and should be called when the backend is no longer needed.
func (*InMemoryBackend) CreateAlias ¶
func (b *InMemoryBackend) CreateAlias( name string, input *CreateAliasInput, ) (*FunctionAlias, error)
CreateAlias creates a new alias for a Lambda function pointing to a version.
func (*InMemoryBackend) CreateCapacityProvider ¶
func (b *InMemoryBackend) CreateCapacityProvider( input *CreateCapacityProviderInput, ) (*CapacityProvider, error)
CreateCapacityProvider creates a new Lambda capacity provider.
func (*InMemoryBackend) CreateCodeSigningConfig ¶
func (b *InMemoryBackend) CreateCodeSigningConfig( input *CreateCodeSigningConfigInput, ) (*CodeSigningConfig, error)
CreateCodeSigningConfig creates a new Lambda code signing configuration.
func (*InMemoryBackend) CreateEventSourceMapping ¶
func (b *InMemoryBackend) CreateEventSourceMapping( input *CreateEventSourceMappingInput, ) (*EventSourceMapping, error)
CreateEventSourceMapping creates a new event source mapping.
func (*InMemoryBackend) CreateFunction ¶
func (b *InMemoryBackend) CreateFunction(fn *FunctionConfiguration) error
func (*InMemoryBackend) CreateFunctionURLConfig ¶
func (b *InMemoryBackend) CreateFunctionURLConfig( ctx context.Context, functionName, authType string, cors *FunctionURLCors, invokeMode string, ) (*FunctionURLConfig, error)
CreateFunctionURLConfig creates a function URL endpoint for the given function. It allocates a port, starts an HTTP listener, registers DNS, and returns the config. The mutex is released before port allocation and listener startup (IO) to avoid holding the lock during potentially slow system calls.
func (*InMemoryBackend) DeleteAlias ¶
func (b *InMemoryBackend) DeleteAlias(name, aliasName string) error
DeleteAlias removes a named alias from a function.
func (*InMemoryBackend) DeleteCapacityProvider ¶
func (b *InMemoryBackend) DeleteCapacityProvider(name string) error
DeleteCapacityProvider removes a capacity provider by name.
func (*InMemoryBackend) DeleteCodeSigningConfig ¶
func (b *InMemoryBackend) DeleteCodeSigningConfig(cscARN string) error
DeleteCodeSigningConfig removes a code signing config by ARN.
func (*InMemoryBackend) DeleteEventSourceMapping ¶
func (b *InMemoryBackend) DeleteEventSourceMapping(id string) (*EventSourceMapping, error)
DeleteEventSourceMapping removes an event source mapping by UUID.
func (*InMemoryBackend) DeleteFunction ¶
func (b *InMemoryBackend) DeleteFunction(name string) error
DeleteFunction removes a Lambda function and cleans up its runtime server.
func (*InMemoryBackend) DeleteFunctionCodeSigningConfig ¶
func (b *InMemoryBackend) DeleteFunctionCodeSigningConfig(functionName string) error
DeleteFunctionCodeSigningConfig removes the code signing config association from a function.
func (*InMemoryBackend) DeleteFunctionConcurrency ¶
func (b *InMemoryBackend) DeleteFunctionConcurrency(name string) error
DeleteFunctionConcurrency removes the reserved concurrency setting for a function, restoring it to the account-level default.
func (*InMemoryBackend) DeleteFunctionEventInvokeConfig ¶
func (b *InMemoryBackend) DeleteFunctionEventInvokeConfig(name string) error
DeleteFunctionEventInvokeConfig removes the event invoke configuration for a function.
func (*InMemoryBackend) DeleteFunctionURLConfig ¶
func (b *InMemoryBackend) DeleteFunctionURLConfig(functionName string) error
DeleteFunctionURLConfig removes the function URL config, stops the listener, and deregisters DNS.
func (*InMemoryBackend) DeleteLayerVersion ¶
func (b *InMemoryBackend) DeleteLayerVersion(layerName string, version int64) error
DeleteLayerVersion removes an immutable layer version.
func (*InMemoryBackend) DeleteProvisionedConcurrencyConfig ¶
func (b *InMemoryBackend) DeleteProvisionedConcurrencyConfig(name, qualifier string) error
DeleteProvisionedConcurrencyConfig removes the provisioned concurrency configuration for a function qualifier.
func (*InMemoryBackend) GetAccountSettings ¶
func (b *InMemoryBackend) GetAccountSettings() *AccountSettingsOutput
GetAccountSettings returns the Lambda account settings for this in-memory backend.
func (*InMemoryBackend) GetAlias ¶
func (b *InMemoryBackend) GetAlias(name, aliasName string) (*FunctionAlias, error)
GetAlias returns a named alias for a function.
func (*InMemoryBackend) GetCapacityProvider ¶
func (b *InMemoryBackend) GetCapacityProvider(name string) (*CapacityProvider, error)
GetCapacityProvider retrieves a capacity provider by name.
func (*InMemoryBackend) GetCodeSigningConfig ¶
func (b *InMemoryBackend) GetCodeSigningConfig(cscARN string) (*CodeSigningConfig, error)
GetCodeSigningConfig retrieves a code signing config by ARN.
func (*InMemoryBackend) GetEventSourceMapping ¶
func (b *InMemoryBackend) GetEventSourceMapping(uuid string) (*EventSourceMapping, error)
GetEventSourceMapping retrieves an event source mapping by UUID.
func (*InMemoryBackend) GetFunction ¶
func (b *InMemoryBackend) GetFunction(name string) (*FunctionConfiguration, error)
GetFunction retrieves a Lambda function configuration by name.
func (*InMemoryBackend) GetFunctionByQualifier ¶
func (b *InMemoryBackend) GetFunctionByQualifier( name, qualifier string, ) (*FunctionConfiguration, error)
GetFunctionByQualifier returns the configuration for a specific qualifier (version number, alias name, "$LATEST", or empty for $LATEST).
Matching real AWS GetFunction/GetFunctionConfiguration behaviour:
- "" or "$LATEST" returns the live function configuration unchanged.
- A numeric version returns the immutable published snapshot, with FunctionArn suffixed ":<version>" and Version set to that number.
- An alias name resolves to the alias's primary target version, but the returned FunctionArn is suffixed with the alias name (":<alias>") — AWS echoes the qualifier you asked for in the ARN while reporting the resolved Version. Weighted routing config does NOT affect GetFunction.
Returns ErrFunctionNotFound when the function does not exist and ErrVersionNotFound when the qualifier resolves to no known version/alias.
func (*InMemoryBackend) GetFunctionCodeSigningConfig ¶
func (b *InMemoryBackend) GetFunctionCodeSigningConfig(functionName string) (string, error)
GetFunctionCodeSigningConfig returns the code signing config ARN associated with a function.
func (*InMemoryBackend) GetFunctionConcurrency ¶
func (b *InMemoryBackend) GetFunctionConcurrency(name string) (*FunctionConcurrency, error)
GetFunctionConcurrency returns the reserved concurrent executions for a function.
func (*InMemoryBackend) GetFunctionEventInvokeConfig ¶
func (b *InMemoryBackend) GetFunctionEventInvokeConfig( name string, ) (*FunctionEventInvokeConfig, error)
GetFunctionEventInvokeConfig returns the event invoke configuration for a function.
func (*InMemoryBackend) GetFunctionRecursionConfig ¶
func (b *InMemoryBackend) GetFunctionRecursionConfig( name string, ) (*FunctionRecursionConfig, error)
GetFunctionRecursionConfig returns the recursion config for a function.
func (*InMemoryBackend) GetFunctionScalingConfig ¶
func (b *InMemoryBackend) GetFunctionScalingConfig(name string) (*FunctionScalingConfig, error)
GetFunctionScalingConfig returns the scaling config for a function.
func (*InMemoryBackend) GetFunctionURLConfig ¶
func (b *InMemoryBackend) GetFunctionURLConfig(functionName string) (*FunctionURLConfig, error)
GetFunctionURLConfig returns the function URL config for a function.
func (*InMemoryBackend) GetLayerVersion ¶
func (b *InMemoryBackend) GetLayerVersion( layerName string, version int64, ) (*GetLayerVersionOutput, error)
GetLayerVersion retrieves metadata for a specific layer version.
func (*InMemoryBackend) GetLayerVersionByArn ¶
func (b *InMemoryBackend) GetLayerVersionByArn( layerVersionARN string, ) (*GetLayerVersionOutput, error)
GetLayerVersionByArn retrieves a layer version by its full ARN.
func (*InMemoryBackend) GetLayerVersionPolicy ¶
func (b *InMemoryBackend) GetLayerVersionPolicy( layerName string, version int64, ) (*LayerVersionPolicy, error)
GetLayerVersionPolicy returns the resource policy for a layer version.
func (*InMemoryBackend) GetPolicy ¶
func (b *InMemoryBackend) GetPolicy(functionName, qualifier string) (*GetPolicyOutput, error)
GetPolicy returns the resource-based policy JSON for a function, scoped to qualifier when non-empty.
func (*InMemoryBackend) GetProvisionedConcurrencyConfig ¶
func (b *InMemoryBackend) GetProvisionedConcurrencyConfig( name, qualifier string, ) (*ProvisionedConcurrencyConfig, error)
GetProvisionedConcurrencyConfig returns the provisioned concurrency configuration for a function qualifier.
func (*InMemoryBackend) GetRuntimeManagementConfig ¶
func (b *InMemoryBackend) GetRuntimeManagementConfig( name string, ) (*RuntimeManagementConfig, error)
GetRuntimeManagementConfig returns the runtime management config for a function.
func (*InMemoryBackend) GetVersion ¶
func (b *InMemoryBackend) GetVersion(name, version string) (*FunctionVersion, error)
GetVersion returns a specific version snapshot of a function. Pass "$LATEST" to get the live function config as a FunctionVersion.
func (*InMemoryBackend) InvokeFunction ¶
func (b *InMemoryBackend) InvokeFunction( ctx context.Context, name string, invocationType InvocationType, payload []byte, ) ([]byte, int, error)
InvokeFunction invokes a Lambda function without a qualifier (equivalent to "$LATEST"). For qualified invocations (alias or version number), use InvokeFunctionWithQualifier.
func (*InMemoryBackend) InvokeFunctionWithQualifier ¶
func (b *InMemoryBackend) InvokeFunctionWithQualifier( ctx context.Context, name, qualifier, clientContext, logType string, invocationType InvocationType, payload []byte, ) ([]byte, string, string, int, error)
InvokeFunctionWithQualifier invokes a Lambda function using an optional qualifier.
func (*InMemoryBackend) ListAliases ¶
func (b *InMemoryBackend) ListAliases( name, functionVersion, marker string, maxItems int, ) (page.Page[*FunctionAlias], error)
ListAliases returns a page of aliases for a function sorted by name. If functionVersion is non-empty, only aliases pointing to that version are returned.
func (*InMemoryBackend) ListCapacityProviders ¶
func (b *InMemoryBackend) ListCapacityProviders() []*CapacityProvider
ListCapacityProviders returns all capacity providers.
func (*InMemoryBackend) ListCodeSigningConfigs ¶
func (b *InMemoryBackend) ListCodeSigningConfigs() []*CodeSigningConfig
ListCodeSigningConfigs returns all code signing configs.
func (*InMemoryBackend) ListEventSourceMappings ¶
func (b *InMemoryBackend) ListEventSourceMappings( functionName, eventSourceARN, marker string, maxItems int, ) page.Page[*EventSourceMapping]
ListEventSourceMappings returns a page of event source mappings, optionally filtered by function name.
func (*InMemoryBackend) ListFunctionEventInvokeConfigs ¶
func (b *InMemoryBackend) ListFunctionEventInvokeConfigs( name, marker string, maxItems int, ) ([]*FunctionEventInvokeConfig, string, error)
ListFunctionEventInvokeConfigs returns a page of event invoke configurations for a function.
func (*InMemoryBackend) ListFunctionURLConfigs ¶
func (b *InMemoryBackend) ListFunctionURLConfigs() []*FunctionURLConfig
ListFunctionURLConfigs returns all function URL configs.
func (*InMemoryBackend) ListFunctionVersionsByCapacityProvider ¶
func (b *InMemoryBackend) ListFunctionVersionsByCapacityProvider( name, marker string, maxItems int, ) (page.Page[string], error)
ListFunctionVersionsByCapacityProvider returns a page of function-version ARNs assigned to the named capacity provider. It returns ErrFunctionNotFound if the provider does not exist. Assignments are populated only via the internal SeedCapacityProviderFunctionVersions helper, since AWS exposes no public assignment API in this emulator's surface.
func (*InMemoryBackend) ListFunctions ¶
func (b *InMemoryBackend) ListFunctions( marker string, maxItems int, ) page.Page[*FunctionConfiguration]
ListFunctions returns a page of Lambda function configurations sorted by name.
func (*InMemoryBackend) ListFunctionsAll ¶
func (b *InMemoryBackend) ListFunctionsAll( marker string, maxItems int, ) page.Page[*FunctionConfiguration]
ListFunctionsAll returns a page of all published versions across all functions, sorted by FunctionName then numerically by version. This is the response for ListFunctions?FunctionVersion=ALL.
func (*InMemoryBackend) ListFunctionsByCodeSigningConfig ¶
func (b *InMemoryBackend) ListFunctionsByCodeSigningConfig(cscARN string) ([]string, error)
ListFunctionsByCodeSigningConfig returns function ARNs associated with a code signing config.
func (*InMemoryBackend) ListLayerVersions ¶
func (b *InMemoryBackend) ListLayerVersions(layerName, compatibleRuntime string) ([]*LayerVersion, error)
ListLayerVersions returns all versions of a specific layer in descending order.
func (*InMemoryBackend) ListLayers ¶
func (b *InMemoryBackend) ListLayers(compatibleRuntime, marker string, maxItems int) page.Page[*Layer]
ListLayers returns a paginated summary of all layers with their latest version. Marker is an opaque cursor; maxItems uses lambdaDefaultMaxItems when zero.
func (*InMemoryBackend) ListProvisionedConcurrencyConfigs ¶
func (b *InMemoryBackend) ListProvisionedConcurrencyConfigs( name string, ) ([]*ProvisionedConcurrencyConfig, error)
ListProvisionedConcurrencyConfigs returns all provisioned concurrency configurations for a function.
func (*InMemoryBackend) ListVersionsByFunction ¶
func (b *InMemoryBackend) ListVersionsByFunction( name, marker string, maxItems int, ) (page.Page[*FunctionVersion], error)
ListVersionsByFunction returns a page of published versions for a function (including $LATEST).
func (*InMemoryBackend) PublishLayerVersion ¶
func (b *InMemoryBackend) PublishLayerVersion( input *PublishLayerVersionInput, ) (*PublishLayerVersionOutput, error)
PublishLayerVersion creates a new immutable version of the named layer.
func (*InMemoryBackend) PublishVersion ¶
func (b *InMemoryBackend) PublishVersion(name, description string) (*FunctionVersion, error)
PublishVersion creates an immutable version snapshot of the current $LATEST function config.
func (*InMemoryBackend) Purge ¶
func (b *InMemoryBackend) Purge(ctx context.Context, cutoff time.Time)
Purge removes all functions older than the given cutoff time.
func (*InMemoryBackend) PutFunctionCodeSigningConfig ¶
func (b *InMemoryBackend) PutFunctionCodeSigningConfig(functionName, cscARN string) error
PutFunctionCodeSigningConfig associates a code signing config with a function.
func (*InMemoryBackend) PutFunctionConcurrency ¶
func (b *InMemoryBackend) PutFunctionConcurrency( name string, reserved int, ) (*FunctionConcurrency, error)
PutFunctionConcurrency sets the reserved concurrent executions for a function. Setting ReservedConcurrentExecutions to 0 disables all invocations of the function.
func (*InMemoryBackend) PutFunctionEventInvokeConfig ¶
func (b *InMemoryBackend) PutFunctionEventInvokeConfig( name string, input *PutFunctionEventInvokeConfigInput, ) (*FunctionEventInvokeConfig, error)
PutFunctionEventInvokeConfig creates or replaces the event invoke configuration for a function.
func (*InMemoryBackend) PutFunctionRecursionConfig ¶
func (b *InMemoryBackend) PutFunctionRecursionConfig( name string, input *PutFunctionRecursionConfigInput, ) (*FunctionRecursionConfig, error)
PutFunctionRecursionConfig sets the recursion config for a function.
func (*InMemoryBackend) PutFunctionScalingConfig ¶
func (b *InMemoryBackend) PutFunctionScalingConfig( name string, input *PutFunctionScalingConfigInput, ) (*FunctionScalingConfig, error)
PutFunctionScalingConfig sets the scaling config for a function.
func (*InMemoryBackend) PutProvisionedConcurrencyConfig ¶
func (b *InMemoryBackend) PutProvisionedConcurrencyConfig( name, qualifier string, requested int, ) (*ProvisionedConcurrencyConfig, error)
PutProvisionedConcurrencyConfig sets the provisioned concurrency configuration for a function qualifier. The qualifier must be a version number or alias name; $LATEST is not supported. Status is returned as READY immediately (stub implementation — no actual pre-warming).
func (*InMemoryBackend) PutRuntimeManagementConfig ¶
func (b *InMemoryBackend) PutRuntimeManagementConfig( name string, input *PutRuntimeManagementConfigInput, ) (*RuntimeManagementConfig, error)
PutRuntimeManagementConfig sets the runtime management config for a function.
func (*InMemoryBackend) RemoveLayerVersionPermission ¶
func (b *InMemoryBackend) RemoveLayerVersionPermission( layerName string, version int64, statementID string, ) error
RemoveLayerVersionPermission removes a permission statement from a layer version's resource policy.
func (*InMemoryBackend) RemovePermission ¶
func (b *InMemoryBackend) RemovePermission(functionName, qualifier, statementID string) error
RemovePermission removes a permission statement from a function's resource-based policy.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development. All active function URL server listeners are shut down before state is cleared so ports are released and stale handlers are removed.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable. Code bytes are not restored — functions must be re-deployed after restore.
func (*InMemoryBackend) SeedCapacityProviderFunctionVersions ¶
func (b *InMemoryBackend) SeedCapacityProviderFunctionVersions( name string, versions ...string, ) error
SeedCapacityProviderFunctionVersions assigns the given function-version ARNs to the named capacity provider. AWS exposes no public assignment API in this emulator's surface, so this internal helper is the only way to populate the assignments observed by ListFunctionVersionsByCapacityProvider (primarily for tests). It returns ErrFunctionNotFound if the provider does not exist.
func (*InMemoryBackend) SetActivationDelay ¶
func (b *InMemoryBackend) SetActivationDelay(d time.Duration)
SetActivationDelay configures how long a newly created function stays in the Pending state before transitioning to Active. Zero (the default) creates functions directly in Active, matching the near-instant activation of ZIP functions; a positive delay reproduces the Pending→Active window AWS exhibits for VPC and container functions.
func (*InMemoryBackend) SetAsyncDestinationDelivery ¶
func (b *InMemoryBackend) SetAsyncDestinationDelivery(d AsyncDestinationDelivery)
SetAsyncDestinationDelivery wires the cross-service delivery implementation used to route DeadLetterConfig and DestinationConfig (OnSuccess/OnFailure) outcomes.
func (*InMemoryBackend) SetCWLogsBackend ¶
func (b *InMemoryBackend) SetCWLogsBackend(cwl CWLogsBackend)
SetCWLogsBackend sets the CloudWatch Logs backend for Lambda log delivery.
func (*InMemoryBackend) SetDNSRegistrar ¶
func (b *InMemoryBackend) SetDNSRegistrar(r DNSRegistrar)
SetDNSRegistrar sets the optional DNS registrar used to register function URL hostnames.
func (*InMemoryBackend) SetDynamoDBStreamsReader ¶
func (b *InMemoryBackend) SetDynamoDBStreamsReader(r DynamoDBStreamsReader)
SetDynamoDBStreamsReader sets the DynamoDB Streams reader on the event source poller so that DynamoDB stream records can trigger Lambda functions via event source mappings.
func (*InMemoryBackend) SetKinesisPoller ¶
func (b *InMemoryBackend) SetKinesisPoller(p *EventSourcePoller)
SetKinesisPoller sets the event source poller for Kinesis stream polling.
func (*InMemoryBackend) SetProvisionedConcurrencyDelay ¶
func (b *InMemoryBackend) SetProvisionedConcurrencyDelay(d time.Duration)
SetProvisionedConcurrencyDelay configures how long a provisioned concurrency config stays IN_PROGRESS before transitioning to READY. Zero (the default) reports READY immediately.
func (*InMemoryBackend) SetS3CodeFetcher ¶
func (b *InMemoryBackend) SetS3CodeFetcher(f S3CodeFetcher)
SetS3CodeFetcher sets the S3CodeFetcher for fetching Zip Lambda code from S3.
func (*InMemoryBackend) SetSQSReader ¶
func (b *InMemoryBackend) SetSQSReader(r SQSReader)
SetSQSReader sets the SQS reader on the event source poller so that SQS queues can trigger Lambda functions via event source mappings.
func (*InMemoryBackend) SetSigV4Secret ¶
func (b *InMemoryBackend) SetSigV4Secret(secret string)
SetSigV4Secret sets the shared secret used to verify SigV4 signatures on AWS_IAM Function URL invocations. When empty the default "test" secret is used.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable. ZipData (code bytes) are not serialised — code must be re-deployed after restore.
func (*InMemoryBackend) StartKinesisPoller ¶
func (b *InMemoryBackend) StartKinesisPoller(ctx context.Context)
StartKinesisPoller starts the Kinesis event source poller if one has been set. It stores a cancel function so Close() can stop the poller gracefully.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(functionName string, tags map[string]string) error
TagResource applies the given tags to the named function, updating FunctionConfiguration.Tags.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(functionName string, tagKeys []string) error
UntagResource removes the specified tag keys from the named function's FunctionConfiguration.Tags.
func (*InMemoryBackend) UpdateAlias ¶
func (b *InMemoryBackend) UpdateAlias( name, aliasName string, input *UpdateAliasInput, ) (*FunctionAlias, error)
UpdateAlias updates an existing alias.
func (*InMemoryBackend) UpdateCapacityProvider ¶
func (b *InMemoryBackend) UpdateCapacityProvider( name string, input *UpdateCapacityProviderInput, ) (*CapacityProvider, error)
UpdateCapacityProvider updates an existing capacity provider.
func (*InMemoryBackend) UpdateCodeSigningConfig ¶
func (b *InMemoryBackend) UpdateCodeSigningConfig( cscARN string, input *UpdateCodeSigningConfigInput, ) (*CodeSigningConfig, error)
UpdateCodeSigningConfig updates an existing code signing config.
func (*InMemoryBackend) UpdateEventSourceMapping ¶
func (b *InMemoryBackend) UpdateEventSourceMapping( id string, input *UpdateEventSourceMappingInput, ) (*EventSourceMapping, error)
UpdateEventSourceMapping updates an existing event source mapping.
func (*InMemoryBackend) UpdateFunction ¶
func (b *InMemoryBackend) UpdateFunction(fn *FunctionConfiguration) error
UpdateFunction replaces a Lambda function's configuration. Any running container is evicted so the next invocation picks up the new code/config.
func (*InMemoryBackend) UpdateFunctionEventInvokeConfig ¶
func (b *InMemoryBackend) UpdateFunctionEventInvokeConfig( name string, input *PutFunctionEventInvokeConfigInput, ) (*FunctionEventInvokeConfig, error)
UpdateFunctionEventInvokeConfig updates the event invoke configuration for a function. It returns ErrEventInvokeConfigNotFound if no config exists yet.
func (*InMemoryBackend) UpdateFunctionURLConfig ¶
func (b *InMemoryBackend) UpdateFunctionURLConfig( functionName, authType string, cors *FunctionURLCors, ) (*FunctionURLConfig, error)
UpdateFunctionURLConfig updates an existing function URL config.
type InvocationType ¶
type InvocationType = string
InvocationType for Lambda invocations. Must remain a type alias (= string) because multiple packages (apigateway, eventbridge, secretsmanager, stepfunctions) define LambdaInvoker interfaces with InvokeFunction(... invocationType string ...). A defined type would prevent *InMemoryBackend from satisfying those interfaces.
const ( // InvocationTypeRequestResponse waits for the function to return. InvocationTypeRequestResponse InvocationType = "RequestResponse" // InvocationTypeEvent fires and forgets. InvocationTypeEvent InvocationType = "Event" // InvocationTypeDryRun validates without executing. InvocationTypeDryRun InvocationType = "DryRun" LogTypeNone = "None" LogTypeTail = "Tail" )
type Janitor ¶
type Janitor struct {
Backend *InMemoryBackend
Interval time.Duration
TaskTimeout time.Duration
}
Janitor is the Lambda background worker that manages resource cleanup. It evicts idle runtimes (containers) and cleans up stale event source mappings.
func NewJanitor ¶
func NewJanitor(backend *InMemoryBackend, _ Settings) *Janitor
NewJanitor creates a new Lambda Janitor for the given backend.
type KinesisReader ¶
type KinesisReader interface {
// GetShardIDs returns the shard IDs for the given stream.
GetShardIDs(streamName string) ([]string, error)
// GetShardIterator returns an iterator token for a shard.
GetShardIterator(streamName, shardID, iteratorType, startingSeqNum string) (string, error)
// GetRecords reads up to limit records from the given iterator, returning records and next iterator.
GetRecords(iteratorToken string, limit int) ([]KinesisRecord, string, error)
}
KinesisReader is the interface for reading Kinesis records. It is implemented by the kinesis backend.
type KinesisRecord ¶
type KinesisRecord struct {
ArrivalTime time.Time
PartitionKey string
SequenceNumber string
Data []byte
}
KinesisRecord is a single record from a Kinesis shard.
type LastUpdateStatus ¶
type LastUpdateStatus string
LastUpdateStatus represents the status of the last update to a Lambda function.
const ( // LastUpdateStatusSuccessful means the last update succeeded. LastUpdateStatusSuccessful LastUpdateStatus = "Successful" // LastUpdateStatusFailed means the last update failed. LastUpdateStatusFailed LastUpdateStatus = "Failed" // LastUpdateStatusInProgress means an update is in progress. LastUpdateStatusInProgress LastUpdateStatus = "InProgress" )
type Layer ¶
type Layer struct {
LatestMatchingVersion *LayerVersion `json:"LatestMatchingVersion,omitempty"`
LayerArn string `json:"LayerArn"`
LayerName string `json:"LayerName"`
}
Layer holds a summary of a layer with its latest version.
type LayerVersion ¶
type LayerVersion struct {
Content *LayerVersionContent `json:"Content,omitempty"`
LayerVersionArn string `json:"LayerVersionArn"`
Description string `json:"Description,omitempty"`
CreatedDate string `json:"CreatedDate"`
LicenseInfo string `json:"LicenseInfo,omitempty"`
CompatibleRuntimes []string `json:"CompatibleRuntimes,omitempty"`
ZipData []byte `json:"-"`
Version int64 `json:"Version"`
}
LayerVersion holds an immutable snapshot of a layer version.
type LayerVersionContent ¶
type LayerVersionContent struct {
CodeSha256 string `json:"CodeSha256,omitempty"`
Location string `json:"Location,omitempty"`
CodeSize int64 `json:"CodeSize"`
}
LayerVersionContent holds the content details for a layer version.
type LayerVersionContentInput ¶
type LayerVersionContentInput struct {
S3Bucket string `json:"S3Bucket,omitempty"`
S3Key string `json:"S3Key,omitempty"`
ZipFile []byte `json:"ZipFile,omitempty"`
}
LayerVersionContentInput holds the zip content for a new layer version.
type LayerVersionPolicy ¶
type LayerVersionPolicy struct {
Policy string `json:"Policy"`
RevisionID string `json:"RevisionId"`
}
LayerVersionPolicy holds the resource policy for a layer version.
type LayerVersionStatement ¶
type LayerVersionStatement struct {
Principal string `json:"Principal"`
Action string `json:"Action"`
StatementID string `json:"StatementId"`
}
LayerVersionStatement is a single statement in a layer version resource policy.
type ListAliasesOutput ¶
type ListAliasesOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
Aliases []*FunctionAlias `json:"Aliases"`
}
ListAliasesOutput is the response for ListAliases.
type ListCapacityProvidersOutput ¶
type ListCapacityProvidersOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
CapacityProviders []*CapacityProvider `json:"CapacityProviders"`
}
ListCapacityProvidersOutput is the response for ListCapacityProviders.
type ListCodeSigningConfigsOutput ¶
type ListCodeSigningConfigsOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
CodeSigningConfigs []*CodeSigningConfig `json:"CodeSigningConfigs"`
}
ListCodeSigningConfigsOutput is the response for ListCodeSigningConfigs.
type ListFunctionEventInvokeConfigsOutput ¶
type ListFunctionEventInvokeConfigsOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
FunctionEventInvokeConfigs []*FunctionEventInvokeConfig `json:"FunctionEventInvokeConfigs"`
}
ListFunctionEventInvokeConfigsOutput is the response for ListFunctionEventInvokeConfigs.
type ListFunctionURLConfigsOutput ¶
type ListFunctionURLConfigsOutput struct {
FunctionURLConfigs []*FunctionURLConfig `json:"FunctionUrlConfigs"`
}
ListFunctionURLConfigsOutput is the response for listing function URL configs.
type ListFunctionsByCodeSigningConfigOutput ¶
type ListFunctionsByCodeSigningConfigOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
FunctionArns []string `json:"FunctionArns"`
}
ListFunctionsByCodeSigningConfigOutput is the response for ListFunctionsByCodeSigningConfig.
type ListFunctionsOutput ¶
type ListFunctionsOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
Functions []*FunctionConfiguration `json:"Functions"`
}
ListFunctionsOutput is the response for ListFunctions.
type ListLayerVersionsOutput ¶
type ListLayerVersionsOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
LayerVersions []*LayerVersion `json:"LayerVersions"`
}
ListLayerVersionsOutput is the response for ListLayerVersions.
type ListLayersOutput ¶
type ListLayersOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
Layers []*Layer `json:"Layers"`
}
ListLayersOutput is the response for ListLayers.
type ListProvisionedConcurrencyConfigsOutput ¶
type ListProvisionedConcurrencyConfigsOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
ProvisionedConcurrencyConfigs []*ProvisionedConcurrencyConfig `json:"ProvisionedConcurrencyConfigs"`
}
ListProvisionedConcurrencyConfigsOutput is the response for ListProvisionedConcurrencyConfigs.
type ListVersionsByFunctionOutput ¶
type ListVersionsByFunctionOutput struct {
NextMarker string `json:"NextMarker,omitempty"`
Versions []*FunctionVersion `json:"Versions"`
}
ListVersionsByFunctionOutput is the response for ListVersionsByFunction.
type LoggingConfig ¶
type LoggingConfig struct {
ApplicationLogLevel string `json:"ApplicationLogLevel,omitempty"`
LogFormat string `json:"LogFormat"`
LogGroup string `json:"LogGroup,omitempty"`
SystemLogLevel string `json:"SystemLogLevel,omitempty"`
}
LoggingConfig holds the function's logging configuration. Real AWS returns this on every GetFunction / GetFunctionConfiguration response.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the Lambda service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Lambda service backend and handler.
type ProvisionedConcurrencyConfig ¶
type ProvisionedConcurrencyConfig struct {
FunctionArn string `json:"FunctionArn,omitempty"`
LastModified string `json:"LastModified"`
Status string `json:"Status"`
StatusReason string `json:"StatusReason,omitempty"`
AllocatedProvisionedConcurrentExecutions int `json:"AllocatedProvisionedConcurrentExecutions"`
AvailableProvisionedConcurrentExecutions int `json:"AvailableProvisionedConcurrentExecutions"`
RequestedProvisionedConcurrentExecutions int `json:"RequestedProvisionedConcurrentExecutions"`
}
ProvisionedConcurrencyConfig holds the provisioned concurrency configuration for a function version or alias.
type PublishLayerVersionInput ¶
type PublishLayerVersionInput struct {
Content *LayerVersionContentInput `json:"Content"`
Description string `json:"Description,omitempty"`
LayerName string `json:"-"`
LicenseInfo string `json:"LicenseInfo,omitempty"`
CompatibleRuntimes []string `json:"CompatibleRuntimes,omitempty"`
}
PublishLayerVersionInput is the request body for PublishLayerVersion.
type PublishLayerVersionOutput ¶
type PublishLayerVersionOutput struct {
Content *LayerVersionContent `json:"Content"`
LayerVersionArn string `json:"LayerVersionArn"`
LayerArn string `json:"LayerArn"`
Description string `json:"Description,omitempty"`
CreatedDate string `json:"CreatedDate"`
LicenseInfo string `json:"LicenseInfo,omitempty"`
CompatibleRuntimes []string `json:"CompatibleRuntimes,omitempty"`
Version int64 `json:"Version"`
}
PublishLayerVersionOutput is the response for PublishLayerVersion.
type PutFunctionCodeSigningConfigInput ¶
type PutFunctionCodeSigningConfigInput struct {
CodeSigningConfigArn string `json:"CodeSigningConfigArn"`
}
PutFunctionCodeSigningConfigInput is the request body for PutFunctionCodeSigningConfig.
type PutFunctionCodeSigningConfigOutput ¶
type PutFunctionCodeSigningConfigOutput struct {
CodeSigningConfigArn string `json:"CodeSigningConfigArn"`
FunctionName string `json:"FunctionName"`
}
PutFunctionCodeSigningConfigOutput is the response for PutFunctionCodeSigningConfig.
type PutFunctionConcurrencyInput ¶
type PutFunctionConcurrencyInput struct {
ReservedConcurrentExecutions int `json:"ReservedConcurrentExecutions"`
}
PutFunctionConcurrencyInput is the request body for PutFunctionConcurrency.
type PutFunctionEventInvokeConfigInput ¶
type PutFunctionEventInvokeConfigInput struct {
DestinationConfig *DestinationConfig `json:"DestinationConfig,omitempty"`
MaximumEventAgeInSeconds *int `json:"MaximumEventAgeInSeconds,omitempty"`
MaximumRetryAttempts *int `json:"MaximumRetryAttempts,omitempty"`
}
PutFunctionEventInvokeConfigInput is the shared request body for Put/Update FunctionEventInvokeConfig.
type PutFunctionRecursionConfigInput ¶
type PutFunctionRecursionConfigInput struct {
RecursiveLoop string `json:"RecursiveLoop"`
}
PutFunctionRecursionConfigInput is the request body for PutFunctionRecursionConfig.
type PutFunctionScalingConfigInput ¶
type PutFunctionScalingConfigInput struct {
MaximumConcurrency *int `json:"MaximumConcurrency,omitempty"`
}
PutFunctionScalingConfigInput is the request body for PutFunctionScalingConfig.
type PutProvisionedConcurrencyConfigInput ¶
type PutProvisionedConcurrencyConfigInput struct {
ProvisionedConcurrentExecutions int `json:"ProvisionedConcurrentExecutions"`
}
PutProvisionedConcurrencyConfigInput is the request body for PutProvisionedConcurrencyConfig.
type PutRuntimeManagementConfigInput ¶
type PutRuntimeManagementConfigInput struct {
RuntimeVersionArn string `json:"RuntimeVersionArn,omitempty"`
UpdateRuntimeOn string `json:"UpdateRuntimeOn"`
}
PutRuntimeManagementConfigInput is the request body for PutRuntimeManagementConfig.
type QualifierInvoker ¶
type QualifierInvoker interface {
InvokeFunctionWithQualifier(
ctx context.Context, name, qualifier, clientContext, logType string, invocationType InvocationType, payload []byte,
) ([]byte, string, string, int, error)
}
QualifierInvoker is an optional extension of StorageBackend that supports qualified invocations. Backends implement this to support ?Qualifier= on Invoke (alias or version qualifier).
type QualifierResolver ¶
type QualifierResolver interface {
GetFunctionByQualifier(name, qualifier string) (*FunctionConfiguration, error)
}
QualifierResolver is an optional extension of StorageBackend that resolves a qualifier (version number or alias name) to a function configuration for GetFunction/GetFunctionConfiguration. Backends implement this to support ?Qualifier= on the read paths.
type RuntimeManagementConfig ¶
type RuntimeManagementConfig struct {
// RuntimeVersionArn is set when UpdateRuntimeOn is "Manual".
RuntimeVersionArn string `json:"RuntimeVersionArn,omitempty"`
// UpdateRuntimeOn controls when the runtime is updated: "Auto", "FunctionUpdate", or "Manual".
UpdateRuntimeOn string `json:"UpdateRuntimeOn"`
FunctionArn string `json:"FunctionArn,omitempty"`
}
RuntimeManagementConfig holds the runtime management configuration for a Lambda function.
type S3CodeFetcher ¶
type S3CodeFetcher interface {
GetObjectBytes(ctx context.Context, bucket, key string) ([]byte, error)
}
S3CodeFetcher can retrieve zip bytes from an S3-compatible store. It is used by InMemoryBackend to pull Zip Lambda code from S3.
type SQSMessage ¶
type SQSMessage struct {
Attributes map[string]string
MessageAttributes map[string]SQSMessageAttribute
MessageID string
ReceiptHandle string
Body string
MD5OfBody string
MD5OfMessageAttributes string
// SentTimestampMillis is the SQS SentTimestamp in Unix milliseconds, used to
// enforce MaximumRecordAgeInSeconds. Zero means unknown (never expired).
SentTimestampMillis int64
}
SQSMessage is a single SQS message delivered to a Lambda function via ESM.
type SQSMessageAttribute ¶
type SQSMessageAttribute struct {
DataType string `json:"dataType"`
StringValue string `json:"stringValue,omitempty"`
BinaryValue []byte `json:"binaryValue,omitempty"`
}
SQSMessageAttribute is a user-supplied SQS message attribute delivered to the Lambda function in the event record's messageAttributes map.
type SQSReader ¶
type SQSReader interface {
// ReceiveMessagesLocal pulls up to maxMessages from the queue identified by queueARN.
ReceiveMessagesLocal(queueARN string, maxMessages int) ([]*SQSMessage, error)
// DeleteMessagesLocal removes the messages identified by receiptHandles from the queue.
DeleteMessagesLocal(queueARN string, receiptHandles []string) error
}
SQSReader is the interface for consuming SQS messages in the ESM poller. It is implemented by the SQS backend adapter in the CLI wiring layer.
type SelfManagedEventSource ¶
SelfManagedEventSource holds the bootstrap broker endpoints for a self-managed Kafka cluster. Endpoints is a map from endpoint type (e.g. "KAFKA_BOOTSTRAP_SERVERS") to list of broker addresses.
type SelfManagedKafkaEventSourceConfig ¶
type SelfManagedKafkaEventSourceConfig struct {
ConsumerGroupID string `json:"ConsumerGroupId,omitempty"`
}
SelfManagedKafkaEventSourceConfig holds configuration for self-managed Apache Kafka event sources.
type Settings ¶
type Settings struct {
// DockerHost is the host/IP that Lambda containers use to reach the runtime API.
// Defaults to "172.17.0.1" (Docker bridge gateway on Linux).
// For Podman rootless on Linux, use the host's routable IP or "host.containers.internal".
DockerHost string `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 169-byte string literal not displayed */
// ContainerRuntime selects the container runtime: docker, podman, or auto.
// Defaults to "docker". Can be overridden via CONTAINER_RUNTIME env var.
ContainerRuntime string `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 162-byte string literal not displayed */
// PoolSize is the max number of warm containers per function.
PoolSize int `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 152-byte string literal not displayed */
// IdleTimeout is how long an idle container is kept before reaping.
IdleTimeout time.Duration `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 135-byte string literal not displayed */
// MaxRuntimes is the maximum number of per-function runtimes kept alive simultaneously.
// When the limit is exceeded, the least-recently-used runtime is stopped and evicted.
// Defaults to defaultMaxRuntimes. Set to 0 to use the default.
MaxRuntimes int `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 172-byte string literal not displayed */
// KeepContainers determines if Lambda containers should be kept alive after execution.
// If true, the containers will not be stopped and removed. Useful for debugging.
KeepContainers bool `` //nolint:lll,golines // config struct tags are intentionally verbose
/* 164-byte string literal not displayed */
}
Settings holds configurable settings for the Lambda service.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns Settings with sensible defaults for use without Kong.
type SettingsProvider ¶
type SettingsProvider interface {
GetLambdaSettings() Settings
}
SettingsProvider is implemented by config objects that supply Lambda settings.
type SnapStart ¶
type SnapStart struct {
ApplyOn string `json:"ApplyOn,omitempty"`
}
SnapStart holds the SnapStart configuration for a Lambda function. ApplyOn can be "PublishedVersions" or "None".
type SnapStartResponse ¶
type SnapStartResponse struct {
ApplyOn string `json:"ApplyOn"`
OptimizationStatus string `json:"OptimizationStatus"`
}
SnapStartResponse is the SnapStart field returned in GetFunction/GetFunctionConfiguration.
type SourceAccessConfiguration ¶
type SourceAccessConfiguration struct {
URI string `json:"URI,omitempty"`
Type string `json:"Type,omitempty"`
}
SourceAccessConfiguration specifies an auth protocol, VPC component, or virtual host used to secure access to an event source.
type StorageBackend ¶
type StorageBackend interface {
CreateFunction(fn *FunctionConfiguration) error
GetFunction(name string) (*FunctionConfiguration, error)
ListFunctions(marker string, maxItems int) page.Page[*FunctionConfiguration]
DeleteFunction(name string) error
UpdateFunction(fn *FunctionConfiguration) error
InvokeFunction(
ctx context.Context,
name string,
invocationType InvocationType,
payload []byte,
) ([]byte, int, error)
Purge(ctx context.Context, cutoff time.Time)
}
StorageBackend defines the interface for Lambda backend operations.
type TaggedFunctionInfo ¶
TaggedFunctionInfo contains a Lambda function's ARN and tag snapshot. Used by the Resource Groups Tagging API cross-service listing.
type TracingConfig ¶
type TracingConfig struct {
Mode string `json:"Mode"`
}
TracingConfig holds the X-Ray tracing configuration for a Lambda function.
type UpdateAliasInput ¶
type UpdateAliasInput struct {
RoutingConfig *AliasRoutingConfig `json:"RoutingConfig,omitempty"`
Description string `json:"Description,omitempty"`
FunctionVersion string `json:"FunctionVersion,omitempty"`
}
UpdateAliasInput holds the request body for UpdateAlias.
type UpdateCapacityProviderInput ¶
type UpdateCapacityProviderInput struct {
TargetOnDemandConcurrency int `json:"TargetOnDemandConcurrency,omitempty"`
}
UpdateCapacityProviderInput is the request body for UpdateCapacityProvider.
type UpdateCapacityProviderOutput ¶
type UpdateCapacityProviderOutput struct {
CapacityProvider *CapacityProvider `json:"CapacityProvider"`
}
UpdateCapacityProviderOutput is the response for UpdateCapacityProvider.
type UpdateCodeSigningConfigInput ¶
type UpdateCodeSigningConfigInput struct {
AllowedPublishers *AllowedPublishers `json:"AllowedPublishers,omitempty"`
CodeSigningPolicies *CodeSigningPolicies `json:"CodeSigningPolicies,omitempty"`
Description string `json:"Description,omitempty"`
}
UpdateCodeSigningConfigInput is the request body for UpdateCodeSigningConfig.
type UpdateCodeSigningConfigOutput ¶
type UpdateCodeSigningConfigOutput struct {
CodeSigningConfig *CodeSigningConfig `json:"CodeSigningConfig"`
}
UpdateCodeSigningConfigOutput is the response for UpdateCodeSigningConfig.
type UpdateEventSourceMappingInput ¶
type UpdateEventSourceMappingInput struct {
Enabled *bool
FilterCriteria *FilterCriteria
DestinationConfig *ESMDestinationConfig
BisectBatchOnFunctionError *bool
UUID string
SourceAccessConfigurations []SourceAccessConfiguration
Topics []string
Queues []string
FunctionResponseTypes []string
BatchSize int
MaximumBatchingWindowInSeconds int
TumblingWindowInSeconds int
MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
}
UpdateEventSourceMappingInput is the input for UpdateEventSourceMapping.
type UpdateFunctionCodeInput ¶
type UpdateFunctionCodeInput struct {
Architectures []string `json:"Architectures,omitempty"`
ImageURI string `json:"ImageUri,omitempty"`
S3Bucket string `json:"S3Bucket,omitempty"`
S3Key string `json:"S3Key,omitempty"`
ZipFile []byte `json:"ZipFile,omitempty"`
// Publish, when true, publishes a new numbered version after the code update.
Publish bool `json:"Publish,omitempty"`
}
UpdateFunctionCodeInput holds the request body for UpdateFunctionCode.
type UpdateFunctionConfigurationInput ¶
type UpdateFunctionConfigurationInput struct {
Environment *EnvironmentConfig `json:"Environment,omitempty"`
VpcConfig *VpcConfig `json:"VpcConfig,omitempty"`
TracingConfig *TracingConfig `json:"TracingConfig,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty"`
EphemeralStorage *EphemeralStorageConfig `json:"EphemeralStorage,omitempty"`
SnapStart *SnapStart `json:"SnapStart,omitempty"`
Description string `json:"Description,omitempty"`
Runtime string `json:"Runtime,omitempty"`
Handler string `json:"Handler,omitempty"`
Role string `json:"Role,omitempty"`
FileSystemConfigs []*FileSystemConfig `json:"FileSystemConfigs,omitempty"`
Layers []string `json:"Layers,omitempty"`
MemorySize int `json:"MemorySize,omitempty"`
Timeout int `json:"Timeout,omitempty"`
}
UpdateFunctionConfigurationInput holds the request body for UpdateFunctionConfiguration.
type UpdateFunctionURLConfigInput ¶
type UpdateFunctionURLConfigInput struct {
Cors *FunctionURLCors `json:"Cors,omitempty"`
AuthType string `json:"AuthType,omitempty"`
}
UpdateFunctionURLConfigInput is the request body for UpdateFunctionUrlConfig.
type VpcConfig ¶
type VpcConfig struct {
Ipv6AllowedForDualStack *bool `json:"Ipv6AllowedForDualStack,omitempty"`
VpcID string `json:"VpcId,omitempty"`
SubnetIDs []string `json:"SubnetIds,omitempty"`
SecurityGroupIDs []string `json:"SecurityGroupIds,omitempty"`
}
VpcConfig holds the VPC configuration for a Lambda function.
Source Files
¶
- account_settings.go
- async_destinations.go
- capacity_providers.go
- code_signing.go
- concurrency.go
- containers.go
- doc.go
- durable_execution.go
- errors.go
- event_filter.go
- event_invoke_config.go
- event_source_filters.go
- event_source_mapping.go
- event_source_poller.go
- fis.go
- function_settings.go
- function_urls.go
- functions.go
- handler.go
- handler_account_settings.go
- handler_capacity_providers.go
- handler_code_signing.go
- handler_concurrency.go
- handler_dispatch.go
- handler_durable_execution.go
- handler_event_invoke_config.go
- handler_event_source_mappings.go
- handler_function_settings.go
- handler_function_urls.go
- handler_functions.go
- handler_invocation.go
- handler_layers.go
- handler_paths.go
- handler_permissions.go
- handler_tags.go
- handler_versions_aliases.go
- invocation.go
- janitor.go
- layers.go
- lifecycle.go
- models.go
- permissions.go
- persistence.go
- provider.go
- qualifiers.go
- runtime_api.go
- settings.go
- store.go
- store_setup.go
- tags.go
- versions_aliases.go