SOA-C03 练习题

SOA-C03 题目讲解:AMI ID 是区域标识

SOA-C03 练习题讲解。答案 D。同一个 AMI ID 不会自动在所有 Region 存在。

SOA-C03 免费试练题 · 考证匠讲解

题目

A SysOps administrator is troubleshooting an AWS CloudFormation template whereby multiple Amazon EC2 instances are being created. The template is working in us-east-1, but it is failing in us-west-2 with the error code: AMI [ami-12345678] does not exist How should the Administrator ensure that the AWS CloudFormation template is working in every region?

A. Copy the source region's Amazon Machine Image (AMI) to the destination region and assign it the same ID.
B. Edit the AWS CloudFormation template to specify the region code as part of the fully qualified AMI ID.
C. Edit the AWS CloudFormation template to offer a drop-down list of all AMIs to the user by using the AWS::EC2::AMI::ImageID control.
D. Modify the AWS CloudFormation template by including the AMI IDs in the ג€Mappingsג€ section. Refer to the proper mapping within the template for the proper AMI ID.

答案

答案 D。同一个 AMI ID 不会自动在所有 Region 存在。

拆题

  • 同一个 AMI ID 不会自动在所有 Region 存在。
  • Mappings 可按 AWS::Region 查相应 image ID,减少模板区域硬编码。
  • 复制 AMI 后会得到新的 ID;当前也可用受支持 SSM public parameter 路径,但需核对架构和发行版。

每个选项为什么对、为什么错

  • A:复制镜像可得到目标区域镜像,但不能强行赋予与源相同 ID。
  • B:AMI ID 没有加 region 前缀就变全局的语法。
  • C:参数类型能校验输入,但不会自动替用户枚举并选每区域镜像映射。
  • D(正确):在 Mappings 列出各区域 image ID 并 FindInMap,直接解决区域差异。原选项乱码保留,解析使用正常术语。

放到具体场景里

教学例子:us-east-1→ami-east、us-west-2→ami-west,ImageId 根据 AWS::Region 取值。每个值都要验证镜像可见、CPU 架构与实例类型一致。不要把题目里的标识直接复制为真实 AMI ID,也要为未支持 Region 设置清晰失败条件。

检查对象本例条件或动作结果与边界
标识AMI ID 区域化不能复用源 ID
选择Region mapping查目标镜像
验证权限与 CPU 架构避免另类启动失败

遇到同类题的判断顺序

  1. 确认区域:读取部署目标。
  2. 查找映射:获取该区有效 image ID。
  3. 验证兼容:镜像权限与实例架构。
  4. 启动测试:检查健康和预期系统版本。
结论:镜像内容可复制,镜像 ID 不会成为全局标识。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。