Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to share Parameter Store keys in another AWS Account for same region?

The use case: The database credentials are stored in Parameter Store for an AWS source Account and we need to share such credentials with other AWS Account.

I know the recommendation is to use System Manager, but that is not a valid option for custom reasons.

We won't access Parameter Store from a Lambda inside another AWS Account/VPC. Instead, we need to access such keys from the AWS CLI to fill in the application environment variables at build time - again, it's not ideal. 🤷‍♂️

In summary, we have an AWS Cross-Account / Same region / IAM user (another account) scenario to access the Parameter Store keys from the source AWS Account.

Thanks in advance for any kind of guidance/direction 👊

like image 679
Richard Lee Avatar asked Jan 23 '26 15:01

Richard Lee


1 Answers

I think you could create an IAM Role in the account with parameter store, give that Role permission to access parameter store, and configure it to let the IAM user you created in the other account to assume that Role and do what it needs.

Something like aws sts assume-role --role-arn "arn:aws:iam::123456789012:role/example-role" --role-session-name AWSCLI-Session and then aws ssm get-parameter --name "MyStringParameter"

like image 74
pearm Avatar answered Jan 26 '26 07:01

pearm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!