Soru

Zorluk: OrtaAWS Systems Manager Configuration and Run Command Automation

A SysOps Administrator needs to execute an AWS Systems Manager Run Command document on a fleet of Amazon EC2 instances. The administrator wants to store the execution command output in an Amazon S3 bucket and ensure the log files are encrypted using a customer managed AWS KMS key.

Arrange the configuration steps in the correct order to set up secure command execution logging.

  1. 1Create an Amazon S3 bucket to serve as the destination for Systems Manager Run Command output logs.
  2. 2Configure the customer managed KMS key policy to permit the EC2 instance IAM role to perform cryptographic operations.
  3. 3Attach an IAM policy to the EC2 instance profile granting permissions for S3 bucket access (s3:PutObject) and KMS key usage (kms:GenerateDataKey).
  4. 4Execute the SSM document using Run Command, specifying the S3 bucket name and the customer managed KMS key ID in the Output Options.

Cevap

To set up secure execution logging, first create the S3 bucket. Second, configure the KMS key policy to allow the EC2 role access. Third, attach an IAM policy to the EC2 instance profile granting s3:PutObject and kms:GenerateDataKey permissions. Finally, execute the Run Command, specifying the S3 bucket and KMS key ID.
Secure Run Command logging requires setting up the target S3 bucket and KMS key, granting the EC2 instance profile permissions to write to S3 and use the KMS key, and then executing the command with these parameters.

Adım Adım Çözüm

1
Create S3 bucket.
S3 bucket is created.
Establishes the storage location for the logs.
2
Configure KMS key policy.
KMS key policy allows the EC2 role access.
Allows the EC2 instance role to perform cryptographic operations.
3
Attach IAM policy to the EC2 instance profile.
EC2 instance has permissions to write to S3 and use the KMS key.
Gives the agent running on the EC2 instance the credentials to write the logs and encrypt them.
4
Run the command with S3 and KMS options.
Command execution logs are securely stored in S3.
Initiates the task and directs the output to the secure repository.

Anahtar Kavram

Systems Manager Run Command S3 logging with KMS encryption
Bu soruyu puanla