How to split an SSM string list into its parts

I am using environment variables stored in a string list that I need to populate a few different properties with. I am aware that CloudFormation has a fn::split and fn::select but how would I use both of those at the same time to select a value from a string list

EDIT: My environment variable can be referenced like this, for example: variable: ${env:MY_VARIABLE}
But in this case, my variable is a string list, that is formatted like this: apples,oranges,bananas

So I need to split the variable on commas into a list, and then assign a certain index of that list to another property in my YAML file. So I know that I need to use some combination of Fn::Split and Fn::Select I just don’t know how to format it correctly, everything I’ve tried has given me errors.

EDIT2: The most recent errors I am getting is that my variables are not valid as they are being interpreted as strings and not as a series of functions. This is what I have currently:

serviceName: Fn::Select ['0', Fn::Split [",", ${env:${env:ENVIRONMENT}_SERVERLESS_PARAMS}]]

In this case I am trying to select the first value in the list.

@OmniPotent42 I don’t quite understand your issue here. Could you add some examples – what environment variable(s), and how you want them injected into your function?

I have the same problem here.
I don’t believe CloudFormation is the way to go within Serverless variable syntax.
It’s almost like we need a parsable argument to the ssm: syntax to split(’,’) if the type is StringList… much like you can pass ~true at the end of the param name for decryption.