问题标签 [amazon-cloudformation]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
185 浏览

wcf - AWS 上的自动升级/更新服务

我有一堆部署在 AWS 上的服务。

每次我必须更改服务中的某些内容时,我都必须从我的构建服务器(由 Jenkins 创建的构建)手动下载我的 WCF 文件。修改 web.configs,创建一个 zip 文件,然后从我的实例拉取的位置上传到 S3启动期间的文件 (CloudFormation)。

自动化此过程的最佳方法是什么?詹金斯可以帮忙吗?还是我应该研究另一种工具?还是我应该使用 AWS SDK 编写一个简单的工具?

0 投票
1 回答
2349 浏览

amazon-web-services - 如何在 CloudFormation 模板中禁用对 Auto Scaling 组中实例的详细监控?

我正在使用 CloudFormation 来启动 Auto Scaling 组中的一些服务器,并且我希望它们都使用基本监控。我尝试Monitoringfalse属性AWS::AutoScaling::AutoScalingGroup和 中设置AWS::AutoScaling::LaunchConfiguration,但堆栈无法启动;我看到CREATE_FAILED错误消息:Encountered unsupported property Monitoring.

0 投票
12 回答
53692 浏览

amazon-web-services - 如何快速有效地调试 CloudFormation 模板?

CloudFormation 是一种强大的 AWS 产品,允许通过单个 API 调用以编程方式创建 AWS 资源堆栈,例如应用程序的Web层、高性能计算集群整个应用程序堆栈。它非常强大。使用它肯定被认为是一种良好的 AWS 实践,尤其是当它与Chef、 Puppetcloud-init 结合使用时。调试它使我陷入困境。

举一个生产示例:库存的mongodb 集群模板对我不起作用。我特别不知道为什么。我确信这很简单,因为它几乎总是如此。我的问题不在于我无法弄清楚出了什么问题。假设堆栈完全正确地删除了资源,堆栈需要 20 到 30 分钟才能失败,然后再删除 3 到 4 分钟。

我错过了什么?我知道--disable-rollback国旗,并像氧气一样使用它。我很久以前就学会了用包裹退出消息cfn-signal并将它们像压舱物一样扔下沉船。我怎样才能使模板调试过程更快,或者在我犯错半小时后我会永远卡住我的错误?

0 投票
2 回答
15280 浏览

amazon-ec2 - 如何从 cloudformation 中的快照创建 EC2 实例?

我想指定用于为使用 cloudformation 创建的 EC2 实例创建根设备映像的快照 ID。我怎么做?

我只能找到一种从快照制作卷的方法,但无法在实例中使用它。

0 投票
2 回答
8269 浏览

amazon-web-services - 如何使用 IAM 角色使用临时凭证访问资源?

我正在使用 AWS IAM 角色,该角色允许实例使用临时 API 凭证(访问密钥、秘密密钥和安全令牌)访问某些资源。

当我使用这个 ruby​​ 脚本测试临时凭证时,它运行没有任何问题:

但是当使用命令行运行 cfn-describe-stacks 我得到一个错误:

这是我的 aws_credentials.cfg :

那么我在这里缺少什么?谢谢!

0 投票
4 回答
10810 浏览

php - 使用 PHP 创建 AWS 签名

我正在尝试使用 AWS API 在 AWS CloudFormation 中创建堆栈,但他们返回错误消息“我们计算的签名与您提供的签名不匹配

以下是我用来生成签名的代码

0 投票
1 回答
1443 浏览

amazon-web-services - How to allow an instance to delete old snapshots of an attached volume?

I'm trying to create a cloudformation template that would create a EC2 instance, mount a 2GB volume and do periodic snapshots, while also deleting the ones that are say a week or more old.

While I could get and integrate the access and secret keys, it seems that a signing certificate is required to delete snapshots. I could not find a way to create a new certificate with cloudformation, so it seems like I should create a new user and certificate manually and put that to the template parameters? In this case, is it correct that the user would be able to delete all the snapshots, including the ones that are not from that instance?

Is there a way to restrict snapshot deleting to only the ones with matching description? Or what's the proper way to handle deleting old snapshots?

0 投票
1 回答
172 浏览

ssh - EC2:如何将 ssh 私钥捆绑到私有 AMI 中?

我在 cloudformation 模板中使用私有 AMI,该模板还将 Route53 记录分配给新实例。每次我连接到该主机名时,我都会收到“远程主机标识已更改”,并且需要删除有问题的密钥。

启动实例时似乎主机密钥已更改,但由于 AMI 只能由我访问,我想以允许主机密钥保持不变的方式设置实例创建(并摆脱该警告)。

那可能吗?

0 投票
1 回答
135 浏览

amazon-web-services - 无法更改现有 AWS::AutoScaling::Trigger 的任何属性

我有点困惑;我似乎无法更改与现有 AWS::AutoScaling::Trigger 关联的任何属性。

这似乎是您在完成设置后想要做的一件非常基本的事情。可能会调整期限、违反持续时间、增量、上限+下限。

如果我使用我的模板,只需更改“UpperThreshold”属性,并尝试用它更新我现有的堆栈,我会收到此错误并且更新失败:

建议?

谢谢...

0 投票
3 回答
2191 浏览

bootstrapping - cfn-init 在使用 Cloud Formation 的 VPC 中不起作用

这是我第一次尝试使用 VPC。

我刚刚更改了我的模板以使用 VPC。当堆栈在 VPC 之外启动时一切都很好,但现在它们在 VPC 内部,我无法在使用 cfn-init (Ec2Config) 包启动实例期间从 S3 下载我的文件。它是一个 Windows 盒子。

我在 cfn-init 日志中看到以下日志:

我在 cfn-hup 日志中看到以下日志:

从实例中,我可以通过 Web 浏览器访问 Internet。