Help with creating CF template to deploy SSM Distributor Package

0

I need help creating a CF template to create a SSM distributor package and create an association to deploy it to all instances in my account. I have already manually created the distributor package which is just installing elastic agents. I have looked though AWS documentation and there are really no good examples on how to achieve this.

I know I could just manually run it from the console with the association but I want to be able to scale this up to an organization which I think CloudFormation could help do.

Does anyone have any ideas or ever done something like this?

Rpope
질문됨 5달 전298회 조회
1개 답변
0

Hi there,

The mechanism for creating a Distributor package programmatically is described in the documentation here:

Adding a package (AWS CLI)

We see here that this involves creating an SSM document, since Distributor package details are stored in SSM documents with the document type 'Package'. Although the documentation refers to the AWS CLI specifically, the same principle applies for invoking the API via CloudFormation.

You can create SSM documents in CloudFormation with the AWS::SSM::Document resource type.

After creating your package, you can create an Association programmatically to run AWS-ConfigureAWSPackage to install your Distributor package.

Scheduling a package installation (AWS CLI)

The Association can also be created via CloudFormation, using the AWS::SSM::Association resource type.

Although I don't have a CloudFormation template at hand I can provide, you can start off by building a template using these CloudFormation resources to create the Document and Association (once the document has been created). If this suits your needs, you can then deploy the CloudFormation template to each region you need the Distributor package and Association to be created in.

Note that Quick Setup supports Distributor only for the EC2Launch v2 agent, Amazon Elastic File System (Amazon EFS) utilities and Amazon CloudWatch agent, but not for custom packages at this time.

Hopefully this information is helpful to you.

Many Thanks!

AWS
Jason D
답변함 5달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠