

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Neptune ML Amazon CloudFormation 用于在新数据库集群中快速入门的模板
<a name="machine-learning-quick-start"></a>

要开始使用 Neptune ML，最简单的方法就是使用 Amazon CloudFormation 快速入门模板。此模板安装了所有必需的组件，包括新的 Neptune 数据库集群、所有必要的 IAM 角色和新的 Neptune 图形笔记本，以便更轻松地使用 Neptune ML。

**创建 Neptune ML 快速入门堆栈**

1. 要在 Amazon CloudFormation 主机上启动 Amazon CloudFormation 堆栈，请选择下表中的 “**启动堆栈**” 按钮之一：    
[See the AWS documentation website for more details](http://docs.amazonaws.cn/neptune/latest/userguide/machine-learning-quick-start.html)

1.  在 **Select Template** 页面上，选择 **Next**。

1. 在**指定详细信息**页面上，选择**下一步**。

1. 在**选项**页面上，选择**下一步**。

1. 在**审核**页面上，您需要勾选两个复选框：
   + 第一个承认这 Amazon CloudFormation 可能会创建带有自定义名称的 IAM 资源。
   + 第二个承认这 Amazon CloudFormation 可能需要新堆栈的`CAPABILITY_AUTO_EXPAND`功能。 `CAPABILITY_AUTO_EXPAND`明确 Amazon CloudFormation 允许在创建堆栈时自动扩展宏，无需事先审查。

     客户通常从处理的模板创建更改集，以便在实际创建堆栈之前对宏所做的更改进行审核。有关更多信息，请参阅 Amazon CloudFormation [CreateStack](https://docs.amazonaws.cn/AWSCloudFormation/latest/APIReference/API_CreateStack.html) API。

   然后选择**创建**。

快速入门模板创建和设置以下内容：
+ Neptune 数据库集群。
+ 所需的 IAM 角色（并附加它们）。
+ 所需的 Amazon EC2 安全组。
+ 必要的 SageMaker AI VPC 终端节点。
+ Neptune ML 的数据库集群参数组。
+ 该参数组中的所需参数。
+ 该 Neptune-Export 服务。

您也可以使用以下 Amazon CLI 命令来运行快速入门 Amazon CloudFormation 模板：

```
aws cloudformation create-stack \
  --stack-name neptune-ml-fullstack-$(date '+%Y-%m-%d-%H-%M') \
  --template-url https://aws-neptune-customer-samples.s3.amazonaws.com/v2/cloudformation-templates/neptune-ml-nested-stack.json \
  --parameters ParameterKey=EnableIAMAuthOnExportAPI,ParameterValue={{(true if you have IAM auth enabled, or false otherwise)}} \
               ParameterKey=Env,ParameterValue=test$(date '+%H%M')\
  --capabilities CAPABILITY_IAM \
  --region {{(the Amazon region, like us-east-1)}} \
  --disable-rollback \
  --profile {{(optionally, a named CLI profile of yours)}}
```