Ir para o conteúdo

botcity.plugins.aws.lambda_functions.plugin.BotAWSLambdaPlugin

lambda_client property readonly

Returns the aws client instance.

Returns:

Type Description
boto3_instance

The aws client instance.

__init__(self, region_name='us-east-1', use_credentials_file=True, access_key_id=None, secret_access_key=None) special

BotAWSLambdaPlugin

Parameters:

Name Type Description Default
region_name str

Default region when creating new connections.

'us-east-1'
use_credentials_file bool

If set to True will make authentication via AWS credentials file.

True
access_key_id str

AWS access key ID.

None
secret_access_key str

AWS secret access key.

None

future_invoke_function(self, function_name, payload=None, **kwargs)

Running lambda function and getting response in the future.

See Documentation

Parameters:

Name Type Description Default
function_name str

The function name-only or name with alias. my-function (name-only), my-function:v1 (with alias).

required
payload Dict

The JSON that you want to provide to your Lambda function as input.

None

Returns:

Type Description
future

The future instance.

get_alias(self, function_name, alias_name, **kwargs)

Get alias info.

See Documentation

Parameters:

Name Type Description Default
function_name str

The function name-only.

required
alias_name str

The name of the alias.

required

Returns:

Type Description
info

The alias info.

get_function(self, function_name, **kwargs)

Get function info.

See Documentation

Parameters:

Name Type Description Default
function_name str

The function name-only or name with alias. my-function (name-only), my-function:v1 (with alias).

required

Returns:

Type Description
function_info

The function info.

invoke_function(self, function_name, payload=None, **kwargs)

Invoke lambda function.

See Documentation

Parameters:

Name Type Description Default
function_name str

The function name-only or name with alias. my-function (name-only), my-function:v1 (with alias).

required
payload Dict

The JSON that you want to provide to your Lambda function as input.

None

Returns:

Type Description
response

The response of lambda execution.

list_aliases(self, function_name, **kwargs)

Returns a list of aliases for a Lambda function.

See Documentation

Parameters:

Name Type Description Default
function_name str

The function name-only.

required

Returns:

Type Description
aliases

A list of aliases for a Lambda function.

list_functions(self, **kwargs)

List all functions.

See Documentation

Returns:

Type Description
functions

The list of functions.