There's no easy way to go from a full S3 path to the isolated bucket and key path, so I created the below snippet to do this.
bucket = split("/", split("//", var.s3_path_to_lambda_zip)[1])[0]
key = join("/", slice(
split("/", split("//", var.s3_path_to_lambda_zip)[1]),
1,
length(split("/", split("//", var.s3_path_to_lambda_zip)[1]))
))