aws cli的端点插件
awscli-plugin-endpoint的Python项目详细描述
awscli plugin endpoint
==
此awscli plugin在配置文件上为每个服务**提供服务端点配置**。
----
安装
-
安装awscli plugin endpoint的最简单方法是使用“pip”:
$pip安装awscli plugin endpoint
如果通过捆绑自身python的Homebrew安装“awscli”,请按如下方式安装:
$/usr/local/opt/awscli/libexec/bin/pip在使用awscli插件终结点插件之前安装awscli插件终结点首先需要[配置aws cli](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)。
**必须**:完成后,要启用“awscli plugin endpoint”插件,您可以运行:
$aws configure set plugins.endpoint awscli_plugin_endpoint
上述命令将以下部分添加到您的aws配置文件中。您也可以使用下面的配置直接编辑`~/.aws/config`。
[插件]
endpoint=awscli_plugin_endpoint
将endpoint configure添加到配置文件(假设您有一个**本地**配置文件)。您可以运行:
$aws configure--profile local set dynamodb.endpoint_url http://localhost:8000
上面的命令将下面的部分添加到您的配置文件:
[profile local]
dynamodb=
endpoint_url=http://localhost:8000
$aws dynamodb列表——profile local
=
端点URL=https://s3.wasabisys.com
以s3为例,上面的s3配置不适用于s3低级cli“aws s3api”。若要使“s3api”与此终结点一起工作,还应将终结点添加到此子命令:
[profile wasabi]
region=us-east-1
s3=
endpoint url=https://s3.wasabisys.com
s3api=
endpoint url=https://s3.wasabisys.com
以下是:
$aws s3api--profile wasabi list bucket
使用安全连接
----
默认情况下,awscli会验证为所有https请求提供的证书。
使用自签名或其他不受信任的证书有两个选项:
*`ca-bundle`
如果证书是长寿命的,或者任何新证书都将由长寿命证书颁发机构颁发,则您可能需要提供一组具有“ca_bundle”的可替换的受信任证书。这相当于
`--ca bundle`命令行选项,并且可以按配置文件
或子命令指定:
[profile local1]
ca_bundle=/path/to/bundle.crt
s3=
endpoint_url=https://localhost:8000
[profile local2]
ec2=
ca_bundle=/path/to/another bundle.crt
endpoint_url=https://localhost:8888
*`verify_ssl`
如果证书将频繁刷新,您可能只需要使用“verify_ssl=false”禁用验证。这与
`--no verify ssl`命令行选项类似:
[profile local]
dynamodb=
verify ssl=false
endpoint url=https://localhost:8000
==
此awscli plugin在配置文件上为每个服务**提供服务端点配置**。
----
安装
-
安装awscli plugin endpoint的最简单方法是使用“pip”:
$pip安装awscli plugin endpoint
如果通过捆绑自身python的Homebrew安装“awscli”,请按如下方式安装:
$/usr/local/opt/awscli/libexec/bin/pip在使用awscli插件终结点插件之前安装awscli插件终结点首先需要[配置aws cli](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)。
**必须**:完成后,要启用“awscli plugin endpoint”插件,您可以运行:
$aws configure set plugins.endpoint awscli_plugin_endpoint
上述命令将以下部分添加到您的aws配置文件中。您也可以使用下面的配置直接编辑`~/.aws/config`。
[插件]
endpoint=awscli_plugin_endpoint
将endpoint configure添加到配置文件(假设您有一个**本地**配置文件)。您可以运行:
$aws configure--profile local set dynamodb.endpoint_url http://localhost:8000
上面的命令将下面的部分添加到您的配置文件:
[profile local]
dynamodb=
endpoint_url=http://localhost:8000
$aws dynamodb列表——profile local
=
端点URL=https://s3.wasabisys.com
以s3为例,上面的s3配置不适用于s3低级cli“aws s3api”。若要使“s3api”与此终结点一起工作,还应将终结点添加到此子命令:
[profile wasabi]
region=us-east-1
s3=
endpoint url=https://s3.wasabisys.com
s3api=
endpoint url=https://s3.wasabisys.com
以下是:
$aws s3api--profile wasabi list bucket
使用安全连接
----
默认情况下,awscli会验证为所有https请求提供的证书。
使用自签名或其他不受信任的证书有两个选项:
*`ca-bundle`
如果证书是长寿命的,或者任何新证书都将由长寿命证书颁发机构颁发,则您可能需要提供一组具有“ca_bundle”的可替换的受信任证书。这相当于
`--ca bundle`命令行选项,并且可以按配置文件
或子命令指定:
[profile local1]
ca_bundle=/path/to/bundle.crt
s3=
endpoint_url=https://localhost:8000
[profile local2]
ec2=
ca_bundle=/path/to/another bundle.crt
endpoint_url=https://localhost:8888
*`verify_ssl`
如果证书将频繁刷新,您可能只需要使用“verify_ssl=false”禁用验证。这与
`--no verify ssl`命令行选项类似:
[profile local]
dynamodb=
verify ssl=false
endpoint url=https://localhost:8000