AWS and severless use the same default syntax for their variables so when serverless processes an AWS variable it gets an error. The syntax conflict is with AWS policy variables.
By the time your YAML get loaded up to AWS all of the serverless syntax is gone.
If you really, really want them to keep using the same variable syntax you could teach serverless about all of the possible AWS variables so that it won’t declare them errors. But that set of variables changes as AWS evolves. Plus I suspect it will be very confusing for users if you do this, some variables will evaluate locally and others would evaluate in the cloud. Much better to simply change the SLS variable syntax to not conflict.
With the current scheme the first time you try and use an AWS policy variable you will get an error from SLS about an undefined variable. You will stare at that error for a while and swear that your syntax is correct – and it is. After a while you will start asking on the forum and searching in Google. Sooner or later you will find something that explains this problem and which recommends changing your SLS variable syntax – like in the first post in this thread. After you change the SLS syntax you will then have to go back through all of your YAML files and edit them to use the alternative syntax.