Files
nexus/wiki/sources/ctp-topic-58-aws-ec2-image-builder.md
2026-04-24 00:03:01 +08:00

4.1 KiB
Raw Blame History

title, type, tags, date
title type tags date
CTP Topic 58 AWS EC2 Image Builder source
AWS
EC2
Image-Builder
CTP
AMI
2026-04-14

Source File

Summary用中文描述

  • 核心主题AWS EC2 Image Builder 替代 Packer/Jenkins 实现企业级 AMI 生命周期自动化管理
  • 问题域:当前 AMI 发布流程依赖 GitLab 加固脚本 + Jenkins + Packer存在修改周期长、跨 Landing Zone 兼容性差、手动 Bakery 自动化不足等问题
  • 方法/机制Image Builder 通过 Pipeline流水线/Recipe配方/Component组件/Infrastructure Config 四层抽象,将 CCOE 加固脚本模块化为可复用组件,产品团队通过服务模块向 Golden AMI 添加组件
  • 结论/价值:提升生产力(自动化)、构建时内建测试、合规加固标准、跨账户跨区域分发;与 AWS Organizations/RAM 集成;支持 AWS Inspector Lambda 工作流做 AMI 安全扫描

Key Claims用中文描述

  • Image Builder 通过 Pipeline/Recipe/Component/Infrastructure Config 四层组件实现 AMI 构建全生命周期自动化
  • 当前 AMI 发布流程GitLab + Jenkins + Packer存在修改周期长、跨 LZ 兼容性差、手动 Bakery 自动化不足等缺陷
  • POC 已实现 CentOS 7 和 Ubuntu 18 端到端流水线CCOE 加固脚本转换为独立组件
  • Lambda 工作流触发 AWS Inspector 扫描、邮件通知、S3 报告归档,维护历史 AMI 数据
  • Qualys 扫描集成正在评估中

Key Quotes

"A component is basically just a particular step that you want to execute in order to achieve the output AMI." — Image Builder 组件定义 "Due to these limitations, eventually the product teams try to cater to their requirements by developing some kind of workflow or CI CD pipelines wherein they consume that CCOE AMI and they try to update or install whatever packages they require." — 当前流程的局限性驱动产品团队自建 CI/CD "Product groups can use a service module to add components to the golden AMI. A component is a script, and components should be added in alphabetical order." — 产品团队通过服务模块添加组件的机制

Key Concepts

  • Golden-AMI:由 CCOE 维护的标准化基础镜像,产品团队在其上添加自定义组件
  • CCOECloud Center of Excellence云卓越中心负责维护 Golden AMI 和加固脚本
  • Image-Pipeline:定义 AMI 发布时间线、安装步骤、安全加固和分发策略
  • Image-RecipeYAML 格式定义源 AMI 到输出 AMI 的转换规则
  • Image-Component:在源 AMI 内执行的具体步骤(安装包、运行脚本)
  • Infrastructure-Configuration:定义构建 AMI 所需的 EC2 实例属性(类型/VPC/子网/安全组)
  • Distribution-Settings:管理 AMI 跨区域跨账户的分发配置
  • AWS-InspectorAWS 原生 AMI 安全扫描工具

Key Entities

  • AWSImage Builder 服务的云提供商

Connections

Contradictions

  • ctp-topic-26-standard-ami-build-publish-share-processes
    • 冲突点:当前 AMI 流程GitLab + Jenkins + Packervs Image Builder 自动化流程
    • 当前观点Packer/Jenkins 流程是现状,存在修改周期长、跨 LZ 兼容性差等问题
    • 对方观点Jenkins 多分支流水线 + 机器人框架验证已将验证周期从 3-4 天缩短至 60 分钟
    • 说明两者并非完全矛盾——Image Builder 替代 Packer 作为镜像构建工具,而 Jenkins 流水线可能继续用于 Terraform 部署触发