Skip to content

How to use with AWS CLI v2 #15

@ches

Description

@ches

I'll send a PR for the README if I have a few more minutes, but thought I'd share how to get the plugin working in the v2 CLI for others that may see it here—it took finding separate answers for a couple of issues:

  • Use the CLI's bundled Python with pip install --no-deps awscli-plugin-endpoint. (This will mean something like /usr/local/opt/awscli/libexec/bin/pip depending on installation).

  • Add the new cli_legacy_plugin_path setting in ~/.aws/config—see [v2] Support cli_legacy_plugin_path aws/aws-cli#4854:

    [plugins]
    cli_legacy_plugin_path = /usr/local/opt/awscli/libexec/lib/python3.8/site-packages
    endpoint = awscli_plugin_endpoint

They don't want to release v2 on PyPI. So without --no-deps I was getting:

$ /usr/local/opt/awscli/libexec/bin/pip install awscli-plugin-endpoint
[snip]
Requirement already satisfied: awscli>=1.11.0 in /usr/local/Cellar/awscli/2.0.0_1/libexec/lib/python3.8/site-packages (from awscli-plugin-endpoint) (2.0.0)
ERROR: No matching distribution found for botocore==2.0.0dev4 (from awscli>=1.11.0->awscli-plugin-endpoint)

It looks like the plugin's awscli>=1.11.0 dependency triggers pip to try to resolve deps including the CLI's, and fails because botocore v2 releases aren't published to PyPI either.

After these two steps, the plugin is working for me. Thanks for making it!

$ aws --version
aws-cli/2.0.0 Python/3.8.2 Darwin/18.7.0 botocore/2.0.0dev7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions