我正在寻找有关如何配置 AWS Config 的文档利用对流层。不幸的是,我很难找到针对这个特殊情况的有用文档。我查看了 GitHub 上的对流层文档但似乎找不到任何相关的东西。任何指导将不胜感激。
最佳答案
我自己并不了解 AWS Config,因此无法提供太多帮助,但以下是所有可用 AWS Config 资源的 Cloudformation 文档:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-reference-config.html
这里是相应的对流层天体:
https://github.com/cloudtools/troposphere/blob/master/troposphere/config.py
需要注意的一件事是,对流层试图成为 CF 模板规范的 1:1 翻译,因此您通常可以使用现有的 Cloudformation 文档/示例,但将它们转换为对流层/python 语法。一个例子:
在 Cloudformation 中,要创建存储桶,您可以使用以下命令:
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: my-bucket
这样转换成对流层:
from troposphere import s3, Template
t = Template()
my_s3_bucket = t.add_resource(
s3.Bucket(
"MyBucket",
BucketName="my-bucket",
)
)
希望有所帮助,抱歉,我不太了解 AWS Config!
关于amazon-web-services - AWS Config 和对流层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54256048/