# Getting the account id in an s3 variable

**URL:** <https://forum.serverless.com/t/getting-the-account-id-in-an-s3-variable/12529>\
**Category:** Serverless Framework\
**Created:** [September 12, 2020, 6:40pm UTC](https://forum.serverless.com/t/getting-the-account-id-in-an-s3-variable/12529 "2020-09-12T18:40:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDrakeTaylor](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@TheDrakeTaylor](https://forum.serverless.com/u/TheDrakeTaylor)\
**Post date:** [September 12, 2020, 6:40pm UTC](https://forum.serverless.com/t/getting-the-account-id-in-an-s3-variable/12529/1 "2020-09-12T18:40:43Z")

</div>

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!
