Dagger
Search

lambda

No long description provided.

Installation

dagger install github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8

Entrypoint

Return Type
Lambda !
Arguments
NameTypeDescription
sdkString Which SDK is in use: 'python' or 'node'
sourceDirDirectory The module's source directory: location of 'pyproject.toml' or 'package.json'
awsAccessKeyIdSecret AWS_ACCESS_KEY_ID
awsSecretAccessKeySecret AWS_SECRET_ACCESS_KEY
awsSessionTokenSecret AWS_SESSION_TOKEN
regionString AWS_REGION
accountString The AWS Account ID
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
func (m *myModule) example() *Lambda  {
	return dag.
			Lambda()
}
@function
def example() -> dag.Lambda:
	return (
		dag.lambda()
	)
@func()
example(): Lambda {
	return dag
		.lambda()
}

Types

Lambda 🔗

Nodejs and Python Lambda ZIP file builder

withCredentials() 🔗

Set AWS credentials for operations that require them.

Return Type
Lambda !
Arguments
NameTypeDefault ValueDescription
accessKeySecret !-A reference to a secret value, which can be handled more safely than the value itself.
secretKeySecret !-A reference to a secret value, which can be handled more safely than the value itself.
sesTokenSecret nullNo description provided
regionString !"eu-west-1"No description provided
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 with-credentials --access-key env:MYSECRET --secret-key env:MYSECRET --region string
func (m *myModule) example(accessKey *Secret, secretKey *Secret, region string) *Lambda  {
	return dag.
			Lambda().
			WithCredentials(accessKey, secretKey, region)
}
@function
def example(access_key: dagger.Secret, secret_key: dagger.Secret, region: str) -> dag.Lambda:
	return (
		dag.lambda()
		.with_credentials(access_key, secret_key, region)
	)
@func()
example(accessKey: Secret, secretKey: Secret, region: string): Lambda {
	return dag
		.lambda()
		.withCredentials(accessKey, secretKey, region)
}

withSdk() 🔗

Set the SDK: ‘node’ or ‘python’.

Return Type
Lambda !
Arguments
NameTypeDefault ValueDescription
sdkString !-No description provided
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 with-sdk --sdk string
func (m *myModule) example(sdk string) *Lambda  {
	return dag.
			Lambda().
			WithSdk(sdk)
}
@function
def example(sdk: str) -> dag.Lambda:
	return (
		dag.lambda()
		.with_sdk(sdk)
	)
@func()
example(sdk: string): Lambda {
	return dag
		.lambda()
		.withSdk(sdk)
}

withSource() 🔗

Provide a source directory relative to current directory

Return Type
Lambda !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-A directory.
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 with-source --source DIR_PATH
func (m *myModule) example(source *Directory) *Lambda  {
	return dag.
			Lambda().
			WithSource(source)
}
@function
def example(source: dagger.Directory) -> dag.Lambda:
	return (
		dag.lambda()
		.with_source(source)
	)
@func()
example(source: Directory): Lambda {
	return dag
		.lambda()
		.withSource(source)
}

build() 🔗

Build the package and it’s dependencies

Return Type
Container !
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 build
func (m *myModule) example() *Container  {
	return dag.
			Lambda().
			Build()
}
@function
def example() -> dagger.Container:
	return (
		dag.lambda()
		.build()
	)
@func()
example(): Container {
	return dag
		.lambda()
		.build()
}

export() 🔗

Export the built ZIP file

Return Type
File !
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 export
func (m *myModule) example() *File  {
	return dag.
			Lambda().
			Export()
}
@function
def example() -> dagger.File:
	return (
		dag.lambda()
		.export()
	)
@func()
example(): File {
	return dag
		.lambda()
		.export()
}

publish() 🔗

Publish the built ZIP file to Amazon S3. Requires AWS Credentials.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
bucketNameString !-No description provided
objectKeyString !-No description provided
Example
dagger -m github.com/mjb141/daggerverse/lambda@42bdc54988c302f6b0dc876d8423dfdc505904b8 call \
 publish --bucket-name string --object-key string
func (m *myModule) example(bucketName string, objectKey string) *Container  {
	return dag.
			Lambda().
			Publish(bucketName, objectKey)
}
@function
def example(bucket_name: str, object_key: str) -> dagger.Container:
	return (
		dag.lambda()
		.publish(bucket_name, object_key)
	)
@func()
example(bucketName: string, objectKey: string): Container {
	return dag
		.lambda()
		.publish(bucketName, objectKey)
}