Interface GoFunctionProps
- All Superinterfaces:
EventInvokeConfigOptions
,FunctionOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
GoFunctionProps.Jsii$Proxy
Example:
GoFunction.Builder.create(this, "handler") .entry("app/cmd/api") .bundling(BundlingOptions.builder() .dockerImage(DockerImage.fromBuild("/path/to/Dockerfile")) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forGoFunctionProps
static final class
An implementation forGoFunctionProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic GoFunctionProps.Builder
builder()
default BundlingOptions
(experimental) Bundling options.getEntry()
(experimental) The path to the folder or file that contains the main application entry point files for the project.default String
(experimental) Directory containing your go.mod file.default Runtime
(experimental) The runtime environment.Methods inherited from interface software.amazon.awscdk.services.lambda.EventInvokeConfigOptions
getMaxEventAge, getOnFailure, getOnSuccess, getRetryAttempts
Methods inherited from interface software.amazon.awscdk.services.lambda.FunctionOptions
getAdotInstrumentation, getAllowAllIpv6Outbound, getAllowAllOutbound, getAllowPublicSubnet, getApplicationLogLevel, getApplicationLogLevelV2, getArchitecture, getCodeSigningConfig, getCurrentVersionOptions, getDeadLetterQueue, getDeadLetterQueueEnabled, getDeadLetterTopic, getDescription, getEnvironment, getEnvironmentEncryption, getEphemeralStorageSize, getEvents, getFilesystem, getFunctionName, getInitialPolicy, getInsightsVersion, getIpv6AllowedForDualStack, getLayers, getLogFormat, getLoggingFormat, getLogGroup, getLogRetention, getLogRetentionRetryOptions, getLogRetentionRole, getMemorySize, getParamsAndSecrets, getProfiling, getProfilingGroup, getRecursiveLoop, getReservedConcurrentExecutions, getRole, getRuntimeManagementMode, getSecurityGroups, getSnapStart, getSystemLogLevel, getSystemLogLevelV2, getTimeout, getTracing, getVpc, getVpcSubnets
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEntry
(experimental) The path to the folder or file that contains the main application entry point files for the project.This accepts either a path to a directory or file.
If a directory path is provided then it will assume there is a Go entry file (i.e.
main.go
) and will construct the build command using the directory path.For example, if you provide the entry as:
entry: 'my-lambda-app/cmd/api'
Then the
go build
command would be:`go build ./cmd/api`
If a path to a file is provided then it will use the filepath in the build command.
For example, if you provide the entry as:
entry: 'my-lambda-app/cmd/api/main.go'
Then the
go build
command would be:`go build ./cmd/api/main.go`
-
getBundling
(experimental) Bundling options.Default: - use default bundling options
-
getModuleDir
(experimental) Directory containing your go.mod file.This will accept either a directory path containing a
go.mod
file or a filepath to yourgo.mod
file (i.e.path/to/go.mod
).This will be used as the source of the volume mounted in the Docker container and will be the directory where it will run
go build
from.Default: - the path is found by walking up parent directories searching for a `go.mod` file from the location of `entry`
-
getRuntime
(experimental) The runtime environment.Only runtimes of the Golang family and provided family are supported.
Default: lambda.Runtime.PROVIDED_AL2
-
builder
- Returns:
- a
GoFunctionProps.Builder
ofGoFunctionProps
-