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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ