使用Redshift Spectrum和Cloud Formation

时间:2017-09-01 20:52:36

标签: amazon-cloudformation amazon-redshift-spectrum

我想使用Cloud Formation模板配置RedShift Spectrum资源。这样做的CF模板参数是什么?

例如,正常的RedShift可以是templated

myCluster: 
  Type: "AWS::Redshift::Cluster"
  Properties:
    DBName: "mydb"
    MasterUsername: "master"
    MasterUserPassword: 
      Ref: "MasterUserPassword"
    NodeType: "dw.hs1.xlarge"
    ClusterType: "single-node"
    Tags:
      - Key: foo
        Value: bar

什么是Spectrum等价物?

2 个答案:

答案 0 :(得分:3)

您的模板看起来没问题,但还有一件事要考虑哪个是IAM角色(IAMRoles数组),CF文档将其列为附加参数。

myCluster: 
  Type: "AWS::Redshift::Cluster"
  Properties:
    DBName: "mydb"
    MasterUsername: "master"
    MasterUserPassword: 
      Ref: "MasterUserPassword"
    NodeType: "dw.hs1.xlarge"
    ClusterType: "single-node"
    IamRoles:
      - "arn:aws:iam::123456789012:role/S3Access"
    Tags:
      - Key: foo
        Value: bar

需要IAM角色与Glue / Athena目录对话,并根据S3对您的数据进行身份验证。

答案 1 :(得分:1)

Amazon Redshift Spectrum is a feature of Amazon Redshift.

Simply launch a normal Amazon Redshift cluster and the features of Amazon Redshift Spectrum are available to you.

From Getting Started with Amazon Redshift Spectrum:

To use Redshift Spectrum, you need an Amazon Redshift cluster and a SQL client that's connected to your cluster so that you can execute SQL commands.