Q46 — AWS SAA-C03 第3章

第 46/65 题 | ← 返回第3章

Q176.一家公司正在构建一个解决方案,该解决方案将跨 AWS 账户中的所有应用程序报告 Amazon EC2 Auto Scaling 事件.该公司需要使用无服务器解决方案将 EC2 Auto Scaling 状态数据存储在 Amazon S3 中.然后,该公司将使用 Amazon S3 中的数据在仪表板中提供近乎实时的更新.该解决方案不得影响 EC2 实例的启动速度.公司应如何将数据移动到 Amazon S3 以满足这些要求?

正确答案: A. 使用 Amazon CloudWatch 指标流将 EC2 Auto Scaling 状态数据发送到 Amazon Kinesis Data Firehose.将数据存储在 Amazon S3 中

解析

To report Amazon EC2 Auto Scaling events across all the applications in an AWS account, and store the EC2 Auto Scaling status data in Amazon S3 using a serverless solution that does not affect the speed of EC2 instance launches, a solutions architect should use an Amazon CloudWatch metric stream to send the EC2 Auto Scaling status data to Amazon Kinesis Data Firehose. The data can then be stored in Amazon S3. Therefore, option A is the correct answer.Option C suggests creating an Amazon EventBridge (Amazon CloudWatch Events) rule to invoke an AWS Lambda function on a schedule to send the EC2 Auto Scaling status data directly to Amazon S3. While this approach could work, it may add unnecessary complexity compared to using Amazon CloudWatch metric streams and Amazon Kinesis Data Firehose.Option B suggests launching an Amazon EMR cluster to collect the EC2 Auto Scaling status data and send the data to Amazon Kinesis Data Firehose for storage in Amazon S3. This approach may be more complex than necessary and may not provide the desired near-real-time updates required by the dashboard.Option D suggests using a bootstrap script during the launch of an EC2 instance to install Amazon Kinesis Agent. Configure Kinesis Agent to collect the EC2 Auto Scaling status data and send the data to Amazon Kinesis Data Firehose to store the data in Amazon S3. This approach requires modifying the EC2 instance launch configuration, which may not meet the requirement of not affecting the speed of EC2 instance launches.Using an Amazon CloudWatch metric stream to send the EC2 Auto Scaling status data to Amazon Kinesis Data Firehose provides a simple, scalable, and cost-effective solution for reporting Amazon EC2 Auto Scaling events across all the applications in an AWS account and storing the data in Amazon S3. Once the data is stored in Amazon S3, it can be used to provide near-real-time updates in a dashboard. This approach meets the requirements and does not affect the speed of EC2 instance launches. 为了报告AWS账户中所有应用程序的Amazon EC2 Auto Scaling事件,并使用不影响EC2实例启动速度的无服务器解决方案将EC2 Auto Scaling状态数据存储在Amazon S3中,解决方案架构师应该使用Amazon CloudWatch度量流将EC2 Auto Scaling状态数据发送到Amazon Kinesis data Firehose。然后可以将数据存储在Amazon S3中。因此,选项A是正确答案。选项C建议创建一个Amazon EventBridge (Amazon CloudWatch Events)规则来调用一个AWS Lambda函数,以便将EC2自动缩放状态数据直接发送到Amazon S3。虽然这种方法可行,但与使用Amazon CloudWatch度量流和Amazon Kinesis Data Firehose相比,它可能会增加不必要的复杂性。选项B建议启动一个Amazon EMR集群来收集EC2 Auto Scaling状态数据,并将这些数据发送到Amazon Kinesis data Firehose以存储在Amazon S3中。这种方法可能比必要的更复杂,并且可能无法提供仪表板所需的所需的近实时更新。选项D建议在启动EC2实例期间使用引导脚本来安装Amazon Kinesis Agent。配置Kinesis Agent收集EC2的Auto Scaling状态数据,并将数据发送给Amazon Kinesis data Firehose保存在Amazon S3中。这种方法需要修改EC2实例启动配置,这可能无法满足不影响EC2实例启动速度的要求。使用Amazon CloudWatch度量流将EC2 Auto Scaling状态数据发送到Amazon Kinesis data Firehose提供了一个简单、可扩展且经济高效的解决方案,可以跨AWS帐户中的所有应用程序报告Amazon EC2 Auto Scaling事件,并将数据存储在Amazon S3中。一旦数据存储在Amazon S3中,就可以使用它在仪表板中提供近乎实时的更新。这种方法满足需求,并且不会影响EC2实例启动的速度。