I want to restrict commands in aws session manager

Viewed 630

I am trying to access mongo shell of document db from one instance in session manager mode but while working on session manager .I want to restrict all other commands ok my instance except command mongo.

I went through some aws documentation where I think session document should help me to achieve the goal but I couldn't find any syntax for enabling command mongo only .

1 Answers

You can limit access to a specific command by creating your own Session document.

You can restrict the commands a user can run in a Session Manager session by creating a custom Session type SSM document. In the document content, you define which command is run when the user starts a session and what parameters they can provide to the command.

There is more information regarding this feature within the AWS documentation: Step 5: (Optional) Restrict access to commands in a session - AWS Systems Manager

Related