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
demandé il y a 6 mois308 vues
1 réponse
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
répondu il y a 5 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions