Until a few days ago, I used CloudFormation Export to transfer values between templates.
I got the error "Cannot update an export variable as it is in use by another stack." and started Googling and found
https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-systems-manager-parameter/
Of course, I had to try that myself.
The subnet id's below are from one of my training accounts ..
awsume iam
awsume training
aws cloudformation create-stack --stack-name parameter-1 --template-body file://ssm-write-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=subnet-6d00db36\\,subnet-19138c7e\\,subnet-a73e58ee
aws cloudformation create-stack --stack-name parameter-2 --template-body file://ssm-write-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=subnet-6d00db36\\,subnet-19138c7e
aws cloudformation create-stack --stack-name read-parameter --template-body file://ssm-read-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=parameter-1-SubnetIDs
aws cloudformation update-stack --stack-name read-parameter --template-body file://ssm-read-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=parameter-2-SubnetIDs
aws cloudformation update-stack --stack-name parameter-2 --template-body file://ssm-write-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=subnet-6d00db36\\,subnet-19138c7e\\,subnet-a73e58ee
update the stack that uses the parameter, so that it uses the updated parameter from the previous step
aws cloudformation update-stack --stack-name read-parameter --template-body file://ssm-read-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=parameter-2-SubnetIDs
aws cloudformation delete-stack --stack-name parameter-2
aws cloudformation update-stack --stack-name read-parameter --template-body file://ssm-read-parameter.yaml --parameters ParameterKey=mySubnetIDs,ParameterValue=parameter-1-SubnetIDs
>> An error occurred (ValidationError) when calling the UpdateStack operation: No updates are to be performed.
.. this operation can be done from the console, though .. might be a fluke
aws cloudformation delete-stack --stack-name parameter-1
aws cloudformation delete-stack --stack-name read-parameter