amazon-web-services - 如何在 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
有两个原因,我希望它在没有凭据的情况下工作:
- 我不希望我组织中的每个人都安装 AWS 客户端。
- 我托管的第三方系统不允许我安装 AWS 客户端 - 它允许我提供替代索引或指定 requirements.txt,我也可以在其中添加其他索引。
因此我的问题是: 如何在 VPC(虚拟私有云)中公开/公开访问 AWS CodeArtifact 存储库,而不需要凭证?
用户(通过 VPN)和第 3 方应用程序都已配置为在同一个 VPC 中。
解决方案
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:
推荐阅读
- c++ - 从静态成员函数推断类模板参数的模式
- asp.net-core - 如何获取 AD 访问令牌并将其传递给 Web api 控制器?
- python - 将多嵌套字典值读入 Pandas 的列
- r - R:取消堆叠带有日期的列
- c++ - 多个静态链接 dll 的 DLL 重定向
- shopify - 将产品限制为每位客户仅一件
- arrays - 从 foreach 循环中的爆炸数组字段获取数组对象数据
- android - 从位图创建 Exifinterface
- node.js - 用于 Google Cloud Functions 身份验证重定向的 gitHubAutoDeployer
- android - 当我在 JNI 中拼接字符串时“检测到堆损坏”