Soru

Zorluk: ZorAutomating Deployment and Configuration Management

An enterprise manages its multi-account environment using AWS Organizations. The central platform team uses AWS CloudFormation StackSets to deploy standardized security groups and Amazon EC2 instances from a central administrative account into multiple member accounts. The deployment artifacts and templates are stored in an Amazon S3 bucket within the administrative account.

A security audit identifies two main issues:
1. Authorized users in member accounts are manually modifying the security group rules and disabling mandatory OS-level security agents on the EC2 instances, creating configuration drift.
2. Attempts to update the StackSet to deploy new versions fail in several member accounts because the member accounts' CloudFormation execution roles are denied access to the S3 bucket and cannot decrypt the deployment artifacts.

The solutions architect must implement an automated configuration management strategy that remediates drift on security groups and EC2 instances, and ensures that cross-account StackSet updates succeed.

Which combination of actions should the solutions architect take to meet these requirements?

  1. Configure AWS Config in the member accounts with a managed rule to monitor the security groups, and associate an AWS Systems Manager (SSM) Automation document to automatically revert unauthorized modifications. Set up an SSM State Manager association targeting the EC2 instances to continuously enforce the OS-level security agent configuration. Update the S3 bucket policy in the administrative account to allow read access from the member accounts, and encrypt the bucket using a KMS Customer Managed Key (CMK) with a key policy that grants the member accounts' roles permission to use the key.Cevap
  2. B
    Enable AWS CloudFormation drift detection on the StackSets, and configure an Amazon EventBridge rule that triggers an AWS Lambda function to redeploy the drifted stacks in the target accounts. Enable default S3 encryption on the administrative account's S3 bucket using the AWS managed key (aws/s3), and attach a Service Control Policy (SCP) at the Organization root that allows the member account roles to perform KMS decryption operations on the AWS managed key.
  3. C
    Configure an AWS Systems Manager State Manager association to run an Ansible playbook every hour that directly overwrites both the security group rules and the OS-level EC2 configurations. To resolve the cross-account deployment failures, use AWS Resource Access Manager (RAM) to share the administrative S3 bucket with the organization, and configure CloudFormation to use the default AWS managed S3 key for object decryption during stack execution.
  4. D
    Attach a Service Control Policy (SCP) to the member accounts' Organizational Unit (OU) that explicitly denies member account IAM roles the ability to modify security groups or EC2 settings, assuming this provides the necessary permissions to secure the configurations. To resolve the deployment issues, create a cross-account IAM role in the administrative account that the member accounts' CloudFormation service roles can assume to download and decrypt the templates.

Cevap

The correct configuration uses AWS Config and Systems Manager State Manager to remediate drift on resources and instances, combined with a KMS Customer Managed Key (CMK) and S3 bucket policy updates to enable cross-account CloudFormation StackSet deployments.
The correct option correctly identifies the need for AWS Config to detect and automatically remediate security group modifications, and AWS Systems Manager State Manager to enforce OS-level agent compliance on EC2 instances. It also correctly specifies using a Customer Managed Key (CMK) in AWS KMS to allow cross-account decryption, as AWS managed KMS keys cannot be shared across accounts.

Adım Adım Çözüm

1
Define configuration management for OS-level and resource-level requirements.
AWS Config and Systems Manager State Manager are selected as the appropriate tools.
Systems Manager State Manager enforces OS-level configuration (e.g., security agents) continuously, while AWS Config with automated SSM Automation remediation reverts resource-level changes (e.g., security group rules) to prevent out-of-band updates.
2
Address cross-account access and decryption for the S3 deployment artifacts.
A Customer Managed Key (CMK) is chosen over the AWS managed key.
AWS managed keys (aws/s3) cannot have their key policies modified to allow cross-account access. A Customer Managed Key (CMK) is required to grant decryption rights to target member accounts.
3
Verify the configuration and policy scope.
The S3 bucket policy and KMS key policy are updated to allow access to member account roles.
CloudFormation StackSets requires the execution role in the target accounts to have read access to the S3 bucket and decrypt permissions on the KMS key encrypting the template.

Anahtar Kavram

Continuous configuration enforcement and cross-account CI/CD permissions
Tahmini Süre:3m 0s
Bu soruyu puanla