basti-app / basti

✨ Securely connect to RDS, Elasticache, and other AWS resources in VPCs with no idle cost
https://www.basti.app
MIT License
351 stars 18 forks source link

fix(basti-cdk): use correct (global) port forwarding document arn #74

Closed BohdanPetryshyn closed 1 year ago

BohdanPetryshyn commented 1 year ago

Proposed Changes

This PR fixes the problem with using the permissions granted with the BastionInstnace#grantBastiCliConnect method. When the account ID is specified for the document ARN, IAM produces the following error:

An error occurred (AccessDeniedException) when calling the StartSession operation: User: arn:aws:sts::507082836245:assumed-role/cdk-test-basti-instance-grant-connect/BohdanMac is not authorized to perform: ssm:StartSession on resource: arn:aws:ssm:us-east-1::document/AWS-StartPortForwardingSessionToRemoteHost because no identity-based policy allows the ssm:StartSession action

Related Issues/PRs

48

Checklist