# AWS rolePermissionsBoundary: how to get account ID

**URL:** <https://forum.serverless.com/t/aws-rolepermissionsboundary-how-to-get-account-id/12873>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [October 15, 2020, 8:58pm UTC](https://forum.serverless.com/t/aws-rolepermissionsboundary-how-to-get-account-id/12873 "2020-10-15T20:58:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robeden](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/robeden/32/4623_2.png) [@robeden](https://forum.serverless.com/u/robeden)\
**Post date:** [October 15, 2020, 8:58pm UTC](https://forum.serverless.com/t/aws-rolepermissionsboundary-how-to-get-account-id/12873/1 "2020-10-15T20:58:25Z")

</div>

I’m trying to use `rolePermissionsBoundary`, but I’m not sure how to use it without hardcoding the account ID (because there’s a different boundary in dev/test/prod accounts).

I know you can get the account in CloudFormation pieces with `#{AWS::AccountId}`, but that doesn’t seem to work in the non-CF portions such as `rolePermissionsBoundary`. Is there a way to reference the account ID there?

I tried (with and without quotes):

```auto
rolePermissionsBoundary: "arn:aws:iam::#{AWS::AccountId}:policy/dev_boundary"

```

---

<div class="post-metadata">

**Author:** ![robeden](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/robeden/32/4623_2.png) [@robeden](https://forum.serverless.com/u/robeden)\
**Post date:** [October 15, 2020, 9:47pm UTC](https://forum.serverless.com/t/aws-rolepermissionsboundary-how-to-get-account-id/12873/2 "2020-10-15T21:47:59Z")

</div>

Got it working with the serverless-pseudo-parameters plugin. That’s not supposed to be required anymore, but using it made it work properly.
