首页 > 解决方案 > 如何在 VPC 中公开/公开访问 AWS CodeArtifact 存储库,而不需要凭证?

问题描述

我需要一个用于我公司 Python 包的包存储库。我已经设置了一个 AWS CodeArtifact 存储库并设法发布和安装我的包。

要使pip能够使用此存储库,AWS 建议使用以下方法之一:

aws codeartifact login --tool pip | twine --domain my-domain --domain-owner domain-owner-id --repository my-repo

这很有效,因为我已经使用我的凭证配置了我的 AWS 客户端。不过,我更愿意像这样安装:他们应该能够轻松安装这些软件包,例如通过

pip install --extra-index-url https://repository-name.d.codeartifact.eu-west-1.amazonaws.com/pypi/repository/ package_name   

有两个原因,我希望它在没有凭据的情况下工作:

因此我的问题是: 如何在 VPC(虚拟私有云)中公开/公开访问 AWS CodeArtifact 存储库,而不需要凭证?

用户(通过 VPN)和第 3 方应用程序都已配置为在同一个 VPC 中。

标签: amazon-web-servicespipaws-codeartifact

解决方案


Two alternatives to Kasia Gogolek's answer:

Run a proxy in front of aws-codeartifact that handles the authentication:

https://github.com/Polymathian/aws-codeartifact-python-proxy

pypicloud instead of s3pypi:

https://github.com/stevearc/pypicloud-docker


推荐阅读