Netflix / metaflow-tools

:rocket: Deployment tools/scripts for Metaflow!
http://www.metaflow.org
Apache License 2.0
52 stars 47 forks source link

CFN template fails in China regions #16

Open Chen188 opened 4 years ago

Chen188 commented 4 years ago

Issues desc: For China regions:

  1. apigw do not support Edge-optimized endpoint configuration, which will cause error Endpoint Configuration type EDGE is not supported in this region: cn-northeast-1
  2. for new AWS account, the default allowed notebook instance types are ml.t2.medium and ml.t3.medium, thus this template will failed due to notebook instance limitation.
  3. wrong endpoint url formats of apigw and sagemaker notebook

Solutions:

  1. specify the EndpointConfiguration under Api / Properties section:
  Api:
    DependsOn: VpcLink
    Type: 'AWS::ApiGateway::RestApi'
    Properties:
      EndpointConfiguration:
        Types:
        - REGIONAL
  1. update instance types:
Parameters:
  SagemakerInstance: 
    Type: String
    Default: ml.t3.medium
    AllowedValues: ['ml.t3.medium','ml.t2.medium']
    Description: 'Instance type for Sagemaker Notebook.'
  1. endpoint url formats
    • apigw: https://${Api}.execute-api.${AWS::Region}.amazonaws.com.cn/api/
    • sagemaker notebook: https://${SageMakerNotebookInstance.NotebookInstanceName}.notebook.${AWS::Region}.sagemaker.com.cn/tree
joe153 commented 4 years ago

This also applies to govcloud. The resources need to use the dynamic partition name: arn:${AWS::Partition}: instead of the hard coded arn:aws:.