先决条件
开始之前,请设置以下各项:
-
一个 Amazon 账户:如果您还没有,请从设置新 Amazon 账户 开始。
-
一个有权获得 DataBrew 所需权限的 Amazon Identity and Access Management(IAM)用户:有关更多信息,请参阅添加具有 DataBrew 权限的用户或组。
-
一个要在 DataBrew 操作中使用的 IAM 角色:您可以使用默认角色(如果已配置
AwsGlueDataBrewDataAccessRole)。要设置其他 IAM 角色,请参阅添加具有数据资源权限的 IAM 角色。 -
安装 JupyterLab(版本 2.2.6 或更高版本):有关更多信息,请参阅 JupyterLab 文档
中的以下主题: -
安装 JupyterLab
:建议使用 pip install jupyterlab。
-
安装 Node.js(版本 12.0 或更高版本)。
-
安装 Amazon Command Line Interface(Amazon CLI):有关更多信息,请参阅设置 Amazon CLI。
-
安装 Amazon Jupyter 代理(
pip install aws-jupyter-proxy):此扩展与 Amazon 服务端点结合使用,可安全地传递您的 Amazon 凭证。有关更多信息,请参阅 GitHub 上的 aws-jupyter-proxy。
要验证是否已安装必备组件,可以在命令行运行与下面类似的测试,如以下示例所示。
echo " AWS CLI:" which aws aws --version aws configure list aws sts get-caller-identity echo " Python (current environment):" which python python --version echo " Node.JS:" which node node --version echo " Jupyter:" where jupyter jupyter --version jupyter serverextension list pip3 freeze | grep jupyter
输出应与以下内容类似。目录因操作系统和配置而异。
AWS CLI: /usr/local/bin/aws aws-cli/2.1.2 Python/3.7.4 Darwin/19.6.0 exe/x86_64 Name Value Type Location ---- ----- ---- -------- profile <not set> None None access_key ****************VXW4 shared-credentials-file secret_key ****************MRJN shared-credentials-file region us-east-1 config-file ~/.aws/config { "UserId": "", "Account": "111122223333", "Arn": "arn:aws:iam::111122223333:user/user2" } Python (current environment): /usr/local/opt/python /libexec/bin/python Python 3.8.5 Node.JS: /usr/local/bin/node v15.0.1 Jupyter: /usr/local/bin/jupyter jupyter core : 4.6.3 jupyter-notebook : 6.0.3 qtconsole : 4.7.5 ipython : 7.16.1 ipykernel : 5.3.2 jupyter client : 6.1.6 jupyter lab : 2.2.9 nbconvert : 5.6.1 ipywidgets : 7.5.1 nbformat : 5.0.7 traitlets : 4.3.3 config dir: /usr/local/etc/jupyter aws_jupyter_proxy enabled - Validating... aws_jupyter_proxy OK jupyterlab enabled - Validating... jupyterlab 2.2.9 OK aws-jupyter-proxy==0.1.0 jupyter-client==6.1.7 jupyter-core==4.7.0 jupyterlab==2.2.9 jupyterlab-pygments==0.1.2 jupyterlab-server==1.2.0