简体   繁体   English

如何在运行时动态解析 AWS 资源?

[英]How to resolve AWS resources dynamically at runtime?

Until now I stored ARNs for different environments in config files, now I want to resolve the ARNs dynamically at runtime, but I'm not able to find any "best practices" for this.到目前为止,我将不同环境的 ARN 存储在配置文件中,现在我想在运行时动态解析 ARN,但我无法为此找到任何“最佳实践”。

The resources are managed with AWS CDK so I have multiple options to store/retrieve the ARNs at runtime:资源使用 AWS CDK 进行管理,因此我有多个选项可以在运行时存储/检索 ARN:

  • create and query Parameter Store entries创建和查询 Parameter Store 条目
  • create and query Stack outputs for each resource为每个资源创建和查询堆栈输出
  • query the resources of the Stack查询Stack的资源
  • query the resources by using the SDK for specific services使用SDK查询资源获取特定服务

What would you recommend?你会推荐什么?

Regards, Patrick问候,帕特里克

Since my application needs access to the parameter store anyway, I decided to store the ARNs there.由于我的应用程序无论如何都需要访问参数存储,因此我决定将 ARN 存储在那里。

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

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