Getting the account id in an s3 variable

I have a situation where in an s3 bucket I have prefixes of several accounts and within those prefixes, I have files that contain arns that I need to use in my serverless file.

However, I’m stumped when it comes to how to use the current account in the s3 variable.

For example, how would I do something like:
Resource:
- ${s3:/<account_id>/<filename}

Is there anyway I can do this?

Thanks!