amazon-web-services - 如何将 AWS::ECS::Service 更新为 Fargate 启动类型
问题描述
我有一个当前在 ECS 中运行的应用程序,并且正在尝试升级它以使用 Fargate 启动类型。
更新我的 cloudformation 模板并尝试更新堆栈后,我收到一个错误,表明该服务已存在。
资源处理程序返回消息:“具有标识符‘redacted-app-name’的‘AWS::ECS::Service’类型的资源已经存在。” (RequestToken:50118296-f55c-11eb-a6e3-b31cdb2b43da,HandlerErrorCode:已经存在)
我假设通过向我的服务添加LaunchType
或NetworkConfiguration
键,ECS 认为这是一项不同的服务。
关于如何在不删除 ECS 服务或 Cloudformation Stack 的情况下最好地前进的任何想法?我正在寻找停机时间最短的解决方案。
谢谢!
解决方案
Sadly chancing LaunchType requires replacement of the services. So you will have downtime.
The only way around this is to do blue/green type of deployment, where you deploy new service in Fargate, and perform redirection of traffic through R53 from old service to new one.
Similarly, changes to ServiceName
require replacement.
推荐阅读
- haskell - 表征可以接受 `()` 作为输入的函数类型(不进行单态化)
- c# - ASP.NET Core 5:外键将唯一约束添加到依赖表作为阴影属性
- python - 将 OpenCV GPUMat 作为张量输入 PyTorch 网络
- pandas - 如何根据自定义顺序对 pandas 多索引数据框的索引进行排序
- ios - Swift 等待异步回调完成以进行清理
- javascript - 两个图表的弹性框溢出屏幕
- kiwi-tcms - 是否可以对 kiwi-tcms 表执行查询?
- json - 使用 JSON_QUERY 提取
- node.js - 从 NodeJS 连接和访问 Microsoft Dynamics NAV Web 服务中的功能?
- c# - Azure AD 异常:Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler
.HandleRequestAsync()