diff --git a/CHANGELOG.md b/CHANGELOG.md index 53119b5..4ea3992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] + +### Fixed + +- Falling back to config file defaults when using executor via instantiation of executor class + ### Docs - Updated docs to include more information about required/optional config values, and provide information about each cloud resource that needs to be provisioned. + ## [0.11.0] - 2022-10-03 diff --git a/covalent_awslambda_plugin/awslambda.py b/covalent_awslambda_plugin/awslambda.py index 615b1f7..9adcab7 100644 --- a/covalent_awslambda_plugin/awslambda.py +++ b/covalent_awslambda_plugin/awslambda.py @@ -151,11 +151,11 @@ class AWSLambdaExecutor(AWSExecutor): def __init__( self, - credentials_file: str, - profile: str, - region: str, s3_bucket_name: str, execution_role: str, + credentials_file: str = None, + profile: str = None, + region: str = None, poll_freq: int = None, timeout: int = None, memory_size: int = None, @@ -164,11 +164,12 @@ def __init__( # AWSExecutor parameters required_attrs = { - "credentials_file": credentials_file, - "profile": profile, - "region": region, - "s3_bucket_name": s3_bucket_name, - "execution_role": execution_role, + "credentials_file": credentials_file + or get_config("executors.awslambda.credentials_file"), + "profile": profile or get_config("executors.awslambda.profile"), + "region": region or get_config("executors.awslambda.region"), + "s3_bucket_name": s3_bucket_name or get_config("executors.awslambda.s3_bucket_name"), + "execution_role": execution_role or get_config("executors.awslambda.execution_role"), } super().__init__(**required_attrs)