【问题标题】:How can I create an AWS EMR security configuration using a custom resource with CloudFormation?如何使用 CloudFormation 的自定义资源创建 AWS EMR 安全配置?
【发布时间】:2017-05-18 04:12:46
【问题描述】:

如何通过 CloudFormation 使用自定义资源创建 AWS EMR 安全配置?

"EMRConfig": 
      "Type": "Custom::EMRConfig",
      "Properties": 
        "ServiceToken": "Fn::GetAtt" : ["EMRConfigFunction", "Arn"]
        "clusterId" :  "Ref" : "EMRC522DV" 

【问题讨论】:

  • 想知道,在上面的语法中,我们可以在哪里设置像 In-Transit 和 at-Rest 这样的安全配置。我发现很难从 Cloudformation 将安全配置应用于 EMR 集群。

标签: amazon-web-services aws-lambda emr amazon-cloudformation


【解决方案1】:

假设 EMRConfigFunction 是您计划编写的 Lambda 函数的逻辑名称,您就走在了正确的轨道上。当您将 sn-p 放入 CloudFormation 模板并更新堆栈时,CloudFormation 将触发 EMRConfigFunction 并向其传递一些参数(例如 RequestType = 'Create'、clusterId = <your-cluster-id>,您从CF 模板等)。然后EMRConfigFunction 必须继续并使用 AWS 开发工具包根据可用参数创建安全配置(例如boto3,如果 Lambda 函数是用 Python 编写的),在CF 期望的特定格式并在预签名 URL 中写入响应(该位置可作为 Lambda 函数中的 ResponseURL 参数访问)。我建议阅读 Lambda backed custom resource 的 AWS 文档(以及同一页面上的教程)以了解更多详细信息,以及 creating a security configuration 的文档。

【讨论】:

    猜你喜欢
    • 2017-05-11
    • 2021-04-06
    • 1970-01-01
    • 1970-01-01
    • 2019-10-02
    • 1970-01-01
    • 2020-01-06
    • 2021-10-27
    • 1970-01-01
    相关资源
    最近更新 更多