# Cloud-SQL-Proxy -  Error 403: boss::NOT\_AUTHORIZED:

**URL:** <https://discuss.google.dev/t/cloud-sql-proxy-error-403-boss/153817>\
**Category:** Database\
**Tags:** cloud-sql-for-postgres\
**Created:** [May 8, 2024, 3:54pm UTC](https://discuss.google.dev/t/cloud-sql-proxy-error-403-boss/153817 "2024-05-08T15:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eli-icog](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/eli-icog/32/5248_2.png) [@eli-icog](https://discuss.google.dev/u/eli-icog)\
**Post date:** [May 8, 2024, 3:54pm UTC](https://discuss.google.dev/t/cloud-sql-proxy-error-403-boss/153817/1 "2024-05-08T15:54:03Z")

</div>

I need help connecting into a Postgres SQL via Cloud-SQL-Proxy.

Here is what I have:

1. I created SQL instance, and created a DB and a user on the instance itself. I added the user and DB from the web console.

2. I am able to log into the DB using Cloud SQL Studio, but I need to access the DB from my local. So, I tried Cloud-SQL-Proxy.

3. I initiate the proxy with “./cloud-sql-proxy --port 5225 CONNECTION-NAME”. It’s start fine. But when I tried to connect to it with the username and password that work on Cloud SQL Studio, I am getting this error: failed to connect to instance: failed to get instance: Refresh error: failed to get instance metadata (connection name = “stg-icognition:us-central1:psql-icog-stg”): googleapi: Error 403: boss::NOT\_AUTHORIZED: Not authorized to access resource. Possibly missing permission cloudsql.instances.get on resource instances/psql-icog-stg., forbidden

I am assuming that I am missing something in the configuration, but I couldn’t find difference between my set-up in the docs - [https://cloud.google.com/sql/docs/postgres/connect-auth-proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy).

---

<div class="post-metadata">

**Author:** ![eli-icog](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/eli-icog/32/5248_2.png) [@eli-icog](https://discuss.google.dev/u/eli-icog)\
**Post date:** [May 8, 2024, 6:53pm UTC](https://discuss.google.dev/t/cloud-sql-proxy-error-403-boss/153817/2 "2024-05-08T18:53:57Z")

</div>

I was able to solve this problem by downloading the JSON key from the service account and used when starting the proxy.

Here is an example: ./cloud-sql-proxy --credentials-file stg-icognition-b1a2c25b03fd.json --port 5223 [INSTENCE\_CONNECTION\_NAME]
