Ir para o conteúdo

botcity.plugins.aws.lambda_functions.BotAWSLambdaPlugin

lambda_client property

Returns the aws client instance.

Returns:

Name Type Description
boto3_instance

The aws client instance.

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

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(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:

Name Type Description
future Future

The future instance.

get_alias(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:

Name Type Description
info

The alias info.

get_function(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:

Name Type Description
function_info Dict[str, str]

The function info.

invoke_function(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:

Name Type Description
response

The response of lambda execution.

list_aliases(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:

Name Type Description
aliases List[Dict]

A list of aliases for a Lambda function.

list_functions(**kwargs)

List all functions.

See Documentation

Returns:

Name Type Description
functions List[Dict]

The list of functions.