Installing Agent on Elasticbean Stalk on creation of new application

1

Hi, I would like to install the SSM Agent on my ec2 server when I create a new elastic beanstalk environment, I've researched and saw that you need to create an .ebextension and config file.What commands I should have in the config file specifically for SSM Agent? I have found for the ec2 instance ( https://docs.aws.amazon.com/systems-manager/latest/userguide/agent-install-al2.html ) however it seems that EBS needs to be configured after the application is created and not before creation. Any help?

1 回答
0
已接受的回答

Hey,

The SSM agent comes installed on all Amazon Linux 2 AMI's now so it should be on Beanstalk AMI's as they are based on normal AL2 AMI's.

By default, SSM Agent is installed on Amazon Linux Base Amazon Machine Images (AMIs) dated 2017.09 and later.  [1]

You can connect to your instance via SSH and confirm its running, checkout these commands. [2]

If you are modifying the agent / EC2 Instance in anyway it should be done via ebextensions only and not on the instance via SSH. [3]

profile picture
已回答 2 年前
  • Hello Cormac, Thanks so much for your reply! I have a question with regards to using the .ebextensions to modify the agent, I'm not sure what exactly i need to write on the conf files to edit or modify the SSM agent, do you have a snippet or example you could show me ?

  • @AWS-User-6424256 - this depends on what you want to configure, you will need to provide more info on your use case. Are you using the agent so you can access the instance via Session Manager? If so then all you should need to do is add permissions to the default Beanstalk instance profile "aws-elasticbeanstalk-ec2-role" https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-add-permissions-to-existing-profile.html

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则