@bugcrowd/ecs-service-image-updater

中文文档
0.3.4发布于 2025/11/25MITCommonJS近 30 天下载 2891

Update an ECS service with a new Docker image

原始使用文档
文档目录3 节
  1. CLI Usage
  2. Examples
  3. Module Usage

ECS Service Image Updater

ECS Service Image Updater assists with updating an ECS Service to use a new Docker image. If all you are changing is the image (eg new version of your application) it can be cumbersome to create a new Task Definition. It will copy the current running Task Definition in the Service, update the image, publish the new Task Definition and update the Service to use the new Task Definition.

NOTE: We have moved the package under our bugcrowd NPM organization - this will be the only package location maintained going forward.

CLI Usage

Options:
  --help                    Show help                                  [boolean]
  --version                 Show version number                        [boolean]
  --image                   Docker image and tag                      [required]
  --container-name          Container to update in the ECS Task Definition.
                            Conflicts with container-names.
  --container-names         List of containers to update in the ECS Task
                            Definition. Comma separated. Conflicts with
                            container-name.
  --service-name            ECS Service to update
  --task-definition-family  Task Definition Family create the new Task
                            Definition in
  --cluster-arn             Arn of the ECS Cluster for which the Service exists
                            on. Used in conjunction with service-name
  --output-arn-only         Output the new Task Definition Arn only

Examples

Update an ECS Service to use a new image

$ ecs-service-image-updater --cluster-arn arn:aws:ecs:us-east-1:123456789:cluster/cluster --image image:tag --container-name app --service-name app

Create new Task Definition from latest Task Definition in a Task Definition Family

$ ecs-service-image-updater --image image:tag --container-name app --task-definition-family app

Module Usage

const updater = require('ecs-service-image-updater');

const options = {
  clusterArn: 'clusterArn',
  serviceName: 'serviceName',
  containerNames: ['containerName'],
  image: 'image:tag'
}

updater(options)
  .then((taskDefinitionArn) => {
    console.log(`Done. New task definition: ${taskDefinitionArn}`);
  })
  .catch((err) => {
    console.log(err);
  });

版本与发布记录

@bugcrowd/ecs-service-image-updater 共发布 17 个版本,首次发布于 2021/08/25;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.3.4latest2025/11/2511 个月前
0.3.32024/11/291.9 年前
0.3.22024/08/122 年前
0.3.12024/07/312 年前
0.3.02023/11/242 年前
0.2.02023/11/232 年前

关于 @bugcrowd/ecs-service-image-updater 的常见问题

@bugcrowd/ecs-service-image-updater 是什么?

Update an ECS service with a new Docker image

如何安装 @bugcrowd/ecs-service-image-updater?

在项目目录运行 npm install @bugcrowd/ecs-service-image-updater,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ecs-service-image-updater,可以用 npx ecs-service-image-updater 直接运行。

@bugcrowd/ecs-service-image-updater 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bugcrowd__ecs-service-image-updater 是否存在。

@bugcrowd/ecs-service-image-updater 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bugcrowd/ecs-service-image-updater 可以商用吗?

@bugcrowd/ecs-service-image-updater 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bugcrowd/ecs-service-image-updater 的下载量有多少?

根据 npm 官方下载统计,@bugcrowd/ecs-service-image-updater 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,891 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bugcrowd/ecs-service-image-updater 还在维护吗?

最新版本 0.3.4 发布于 2025/11/25(11 个月前);至今共发布 17 个版本,其中过去 12 个月发布了 1 个;首次发布于 2021/08/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。