SAP-C02 学习助手

SAP-C02 第 321 题

Lambda EC2 IAM CloudTrail Config Secrets Manager Systems Manager

题目

A research company is running daily simulations in the AWS Cloud to meet high demand. The simulations run on several hundred Amazon EC2 instances that are based on Amazon Linux 2. Occasionally, a simulation gets stuck and requires a cloud operations engineer to solve the problem by connecting to an EC2 instance through SSH. Company policy states that no EC2 instance can use the same SSH key and that all connections must be logged in AWS CloudTrail. How can a solutions architect meet these requirements?

中文翻译:
一家研究公司正在 AWS 云中运行日常模拟以满足高需求。模拟在数百个基于 Amazon Linux 2 的 Amazon EC2 实例上运行。偶尔,模拟会陷入困境,需要云运维工程师通过 SSH 连接到 EC2 实例来解决问题。公司政策规定,任何 EC2 实例都不能使用相同的 SSH 密钥,并且所有连接都必须记录在 AWS CloudTrail 中。解决方案架构师如何满足这些要求?

选项

A. Launch new EC2 instances, and generate an individual SSH key for each instance. Store the SSH key in AWS Secrets Manager. Create a new IAM policy, and attach it to the engineers’ IAM role with an Allow statement for the GetSecretValue action. Instruct the engineers to fetch the SSH key from Secrets Manager when they connect through any SSH client.

中文翻译:
启动新的 EC2 实例,并为每个实例生成单独的 SSH 密钥。将 SSH 密钥存储在 AWS Secrets Manager 中。创建新的 IAM 策略,并使用 GetSecretValue 操作的允许语句将其附加到工程师的 IAM 角色。指示工程师在通过任何 SSH 客户端连接时从 Secrets Manager 获取 SSH 密钥。

B. Create an AWS Systems Manager document to run commands on EC2 instances to set a new unique SSH key. Create a new IAM policy, and attach it to the engineers’ IAM role with an Allow statement to run Systems Manager documents. Instruct the engineers to run the document to set an SSH key and to connect through any SSH client.

中文翻译:
创建 AWS Systems Manager 文档以在 EC2 实例上运行命令以设置新的唯一 SSH 密钥。创建新的 IAM 策略,并使用允许语句将其附加到工程师的 IAM 角色以运行 Systems Manager 文档。指导工程师运行该文档来设置 SSH 密钥并通过任何 SSH 客户端进行连接。

C. Launch new EC2 instances without setting up any SSH key for the instances. Set up EC2 Instance Connect on each instance. Create a new IAM policy, and attach it to the engineers’ IAM role with an Allow statement for the SendSSHPublicKey action. Instruct the engineers to connect to the instance by using a browser-based SSH client from the EC2 console.

中文翻译:
启动新的 EC2 实例,无需为实例设置任何 SSH 密钥。在每个实例上设置 EC2 Instance Connect。创建新的 IAM 策略,并使用 SendSSHPublicKey 操作的允许语句将其附加到工程师的 IAM 角色。指导工程师通过 EC2 控制台使用基于浏览器的 SSH 客户端连接到实例。

D. Set up AWS Secrets Manager to store the EC2 SSH key. Create a new AWS Lambda function to create a new SSH key and to call AWS Systems Manager Session Manager to set the SSH key on the EC2 instance. Configure Secrets Manager to use the Lambda function for automatic rotation once daily. Instruct the engineers to fetch the SSH key from Secrets Manager when they connect through any SSH client.

中文翻译:
设置 AWS Secrets Manager 以存储 EC2 SSH 密钥。创建新的 AWS Lambda 函数以创建新的 SSH 密钥并调用 AWS Systems Manager 会话管理器以在 EC2 实例上设置 SSH 密钥。配置 Secrets Manager 以使用 Lambda 函数每天自动轮换一次。指示工程师在通过任何 SSH 客户端连接时从 Secrets Manager 获取 SSH 密钥。

答案

C

解析

正确答案:C 解析: 本题应选择 C。 正确选项: C. 启动新的 EC2 实例,无需为实例设置任何 SSH 密钥。在每个实例上设置 EC2 Instance Connect。创建新的 IAM 策略,并使用 SendSSHPublicKey 操作的允许语句将其附加到工程师的 IAM 角色。指导工程师通过 EC2 控制台使用基于浏览器的 SSH 客户端连接到实例。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时...

登录后查看完整解析