AWS SSM is a nice feature if you don’t wanna deal with majority of the SSH issues along the way. Today’s topic is all about resolving the:
SessionId: devcoops-<some_string>: Plugin with name Standard_Stream not found. Step name: Standard_Stream issue.
- AWS SSM
Most of the time the
Standard_stream issue is related to not having enough disk space left on the server.
Step 1. First thing you must do is expand the EBS root volume, and there are a lot of different ways. You could you the Management Console GUI approach, AWS CLI, AWS SDK, or the most popular one, CloudFormation or Terraform known as the IaC approach.
Step 2. Once you increase the EBS volume size and restart the instance, login to the instance.
aws ssm start-session --target <instance_id>
Step 3. Try to restart the amazon ssm agent service.
systemctl restart amazon-ssm-agent
Step 4. Check the default value for maximum number of inotify watches, which helps with tracking of the file and directory changes.
Note: 8192 is the default value.
Step 5. Increase the inotify watches limit.
echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
Step 6. Apply the changes, by loading the sysctl settings from /etc/sysctl.conf.
Step 7. Exit the server and try to login again using AWS SSM (take a look at Step 2).
Starting session with SessionId: devcoops-<some_string> sh-4.2$
Regarding if it’s safe to raise the value and the following consequences, it’s worth noting that:
- Each used inotify watch consumes up to 1kB of memory.
- The memory itself is unswappable (kernel memory).
- Which leads to, If you set the value up to 524288 (take a look at Step 5.) you’ll be using 512MB of kernel memory.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.