# Question - return proxy id from RDS proxy ARN

**URL:** <https://discuss.hashicorp.com/t/question-return-proxy-id-from-rds-proxy-arn/39117>\
**Category:** AWS\
**Created:** [May 5, 2022, 1:11pm UTC](https://discuss.hashicorp.com/t/question-return-proxy-id-from-rds-proxy-arn/39117 "2022-05-05T13:11:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![data](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/data/32/24956_2.png) [@data](https://discuss.hashicorp.com/u/data)\
**Post date:** [May 5, 2022, 1:11pm UTC](https://discuss.hashicorp.com/t/question-return-proxy-id-from-rds-proxy-arn/39117/1 "2022-05-05T13:11:36Z")

</div>

When using the official aws terraform module, for aws\_db\_proxy resources, how would I be able to retrieve the end portion of the ARN? I need to create a policy which allows database connections, where the proxy id is specified.

For example: arn:aws:rds:us-east-1:1234567890:db-proxy:prx-xxxxxxxxxxxxxx/\*

I would like the: prx-xxxxxxxxxxxxxx portion.  
I can’t seem to get that from any of the attributes provided.
