AwsLambdaApi

org.encalmo.aws.AwsLambdaApi
object AwsLambdaApi

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

inline def createFunction(name: String, architecture: Architecture, awsRuntime: Runtime, handler: String, role: String, code: FunctionCode)(using aws: AwsClient): CreateFunctionResponse

Creates a Lambda function

Creates a Lambda function

Attributes

inline def getFunctionAliases(lambdaArn: String)(using aws: AwsClient): Seq[AliasConfiguration]

Returns a list of aliases for a Lambda function.

Returns a list of aliases for a Lambda function.

Attributes

inline def getFunctionCodeLocation(name: String)(using aws: AwsClient): FunctionCodeLocation

Returns the deployment package of the function or version.

Returns the deployment package of the function or version.

Attributes

inline def getFunctionConfiguration(name: String)(using aws: AwsClient): FunctionConfiguration

Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

Value parameters

name

The name of the Lambda function, version, or alias. Name formats:

  • Function name – my-function (name-only), my-function:v1 (with alias).
  • Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function.
  • Partial ARN – 123456789012:function:my-function. You can append a version number or alias to any of the formats.

Attributes

Returns

The configuration of the function or version.

inline def getFunctionEnvironmentVariables(lambdaArn: String)(using aws: AwsClient): Map[String, String]

Returns a function's environment variables.

Returns a function's environment variables.

Attributes

inline def getFunctionVersions(lambdaArn: String)(using aws: AwsClient): Seq[FunctionConfiguration]

Returns a list of versions, with the version-specific configuration of each. Lambda returns up to 50 versions per call.

Returns a list of versions, with the version-specific configuration of each. Lambda returns up to 50 versions per call.

Attributes

inline def invokeLambda(name: String, invocationType: InvocationType, payload: String)(using aws: AwsClient): InvokeResponse

Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function synchronously (i.e. theInvocationType is RequestResponse). To invoke a function asynchronously, set InvocationType to Event. Lambda passes the ClientContext object to your function for synchronous invocations only.

Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function synchronously (i.e. theInvocationType is RequestResponse). To invoke a function asynchronously, set InvocationType to Event. Lambda passes the ClientContext object to your function for synchronous invocations only.

Attributes

inline def listFunctions()(using aws: AwsClient): Seq[FunctionConfiguration]

Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

Attributes

inline def listLambdaTags(lambdaArn: String)(using aws: AwsClient): Seq[(String, String)]

Returns a function's tags.

Returns a function's tags.

Attributes

inline def publishNewVersion(lambdaArn: String, description: String)(using aws: AwsClient): String

Creates a version from the current code and configuration of a function.

Creates a version from the current code and configuration of a function.

Attributes

inline def tagLambda(lambdaArn: String, tags: Map[String, String])(using aws: AwsClient): Unit

Add tags to lambda.

Add tags to lambda.

Attributes

inline def updateAlias(lambdaArn: String, aliasName: String, version: String)(using aws: AwsClient): String

Updates the configuration of a Lambda function alias.

Updates the configuration of a Lambda function alias.

Attributes

inline def updateFunctionCode(lambdaArn: String, architecture: String, zipFile: SdkBytes, publish: Boolean)(using aws: AwsClient): (String, String)

Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher.

Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher.

Value parameters

architecture

The instruction set architecture that the function supports, arm64 or x86_64

publish

Set to true to publish a new version of the function after updating the code. This has the same effect as calling PublishVersion separately.

Attributes

inline def updateFunctionCodeUsingS3Object(lambdaArn: String, architecture: String, bucketName: String, objectKey: String, publish: Boolean)(using aws: AwsClient): (String, String)
inline def updateFunctionConfiguration(lambdaArn: String, runtime: Option[Runtime], handler: Option[String], memorySize: Option[Int], timeout: Option[Int], snapStart: Option[SnapStart])(using aws: AwsClient): (String, String)

Modify the version-specific settings of a Lambda function.

Modify the version-specific settings of a Lambda function.

When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it.

Value parameters

handler

The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime

memorySize

The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.

runtime

The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

snapStart

The function's SnapStart setting.

timeout

The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.

Attributes

inline def updateFunctionEnvironmentVariables(lambdaArn: String, variables: Map[String, String])(using aws: AwsClient): String

Modify the version-specific environment of a Lambda function.

Modify the version-specific environment of a Lambda function.

Attributes