def METHOD_NAME(ver):
    client = boto3.client("cloudformation", region_name=REGION_NAME)
    response = client.describe_stacks(
        StackName=IAMBIC_CF_LAMBDA_STACK_NAME,
    )
    existing_parameters = response["Stacks"][0]["Parameters"]
    new_parameters = []
    image_uri = None
    for param in existing_parameters:
        if param["ParameterKey"] != "ImageUri":
            new_parameters.append(
                {"ParameterKey": param["ParameterKey"], "UsePreviousValue": True}
            )
        else:
            image_uri = param["ParameterValue"]
    assert image_uri
    base_uri, current_ver = image_uri.split(":")
    assert base_uri
    assert current_ver
    new_image_uri = f"{base_uri}:{ver}"
    print(f"new image uri: {new_image_uri}")
    new_parameters.append({"ParameterKey": "ImageUri", "ParameterValue": new_image_uri})
    response = client.update_stack(
        StackName=IAMBIC_CF_LAMBDA_STACK_NAME,
        UsePreviousTemplate=True,
        Parameters=new_parameters,
    )
    for _ in range(6):
        response = client.describe_stacks(
            StackName=IAMBIC_CF_LAMBDA_STACK_NAME,
        )
        stack_status = response["Stacks"][0]["StackStatus"]
        if stack_status != "UPDATE_IN_PROGRESS":
            print(f"stack status: {stack_status}")
            break
        else:
            print("waiting for stack to finish updating")
            time.sleep(60)