aws-serverless-data-lake-framework icon indicating copy to clipboard operation
aws-serverless-data-lake-framework copied to clipboard

Pulling all ssm parameters rather than checking to see if it exist.

Open chamiles opened this issue 7 months ago • 0 comments

https://github.com/awslabs/aws-serverless-data-lake-framework/blob/19fb396208f2f5d759432126095b62f3d85c60c6/sdlf-team/lambda/pipelines-dynamodb/src/lambda_function.py#L46

This doesn't seem to be the most efficient way to tackle this task.

Currently it pulls all the SSM parameters for the team then checks to see if the pipeline exist, if not then create.

is there a reason the function isn't grabbing the parameters directly to see if they exist, if not then create?

for example

def exist_ssm_param(param_name: str) -> bool: ssm = boto3.client('ssm', region_name='us-east-1') try: response = ssm.get_parameter( Name=param_name ) return True except ssm.exceptions.ParameterNotFound: return False

chamiles avatar Jul 01 '24 14:07 chamiles