简体   繁体   English

AWS SAM 和每次部署的资源 ARN 变化

[英]AWS SAM and the changes in resource ARNs with each deployment

I see that one SAM deployment over another, that the previous resources are deleted, and new resources are created.我看到一个 SAM 部署在另一个之上,之前的资源被删除,并创建了新资源。 Now, the new resources that are created are actually not the same resources, and have a different ARN than before.现在,创建的新资源实际上不是相同的资源,并且具有与以前不同的 ARN。

This causes some problems that I am facing right now.这导致了我现在面临的一些问题。 Say that we have non SAM resources which require set for for the SAM resources.假设我们有非 SAM 资源,需要为 SAM 资源设置。

Like for example, we have an SNS which is subscribed by our API gateway.例如,我们有一个由我们的 API 网关订阅的 SNS。 Now after the deployment the ARN of the API gateway changes, and we'd require to subscribe again.现在部署后 API 网关的 ARN 发生变化,我们需要重新订阅。

There are more problems like this that I am facing, but this is the gist of it.我面临着更多这样的问题,但这就是它的要点。

Any help appreciated!任何帮助表示赞赏!

The ARN of the resource can remain same if the name of the resource is specified in the template.如果在模板中指定了资源名称,则资源的 ARN 可以保持不变。 Since the name now remains the same, the ARN too will remain the same, even after multiple deployments.由于名称现在保持不变,因此 ARN 也将保持不变,即使在多次部署之后也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM