如何拥有 public AWS CodeArtifact 存储库策略

How to have a public AWS CodeArtifact Repository policy

是否可以在 AWS CodeArtifact public 中创建存储库而不需要任何凭据?

我试过这个存储库策略,但没有用:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "codeartifact:DescribePackageVersion",
                "codeartifact:DescribeRepository",
                "codeartifact:GetPackageVersionReadme",
                "codeartifact:GetRepositoryEndpoint",
                "codeartifact:ListPackageVersionAssets",
                "codeartifact:ListPackageVersionDependencies",
                "codeartifact:ListPackageVersions",
                "codeartifact:ListPackages",
                "codeartifact:ReadFromRepository"
            ],
            "Resource": "*"
        }
    ]
}

后来我找到了这个答案:

上面写着:

Unfortunately, this doesn't seem to be possible at the time of the writing.

此外,只有一个 Gradle 插件允许生成令牌,我们无法在 Android 项目中使用它。 https://github.com/clarityai-eng/codeartifact-gradle-plugin

对于我们的特定用例,我们切换到 GitHub 包。