question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeArtifact Role Assumption not producing correct workflow

See original GitHub issue

When attempting to use a CodeArtifact NPM registry and assume a role, the generated release workflow still tries to use the Access key ID / Secret access key:

      - name: Release
        run: npx -p publib@latest publib-npm
        env:
          NPM_DIST_TAG: latest
          NPM_REGISTRY: my-domain.d.codeartifact.us-east-2.amazonaws.com/npm/npm/
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Here is the projen config being used:

import { cdk8s } from "projen";
const project = new cdk8s.ConstructLibraryCdk8s({
  ...
  codeArtifactOptions: {
    roleToAssume: "arn:aws:fake"
  },
  npmRegistryUrl: "https://my-domain.d.codeartifact.us-east-2.amazonaws.com/npm/npm/",

I tried to look in the code to see why this might be happening, but couldn’t immediately identify any problem.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jessebyecommented, May 12, 2022

@Chriscbr would you be able to reopen this issue? #1846 is only a partial fix for this issue.

0reactions
AminFazlMondocommented, May 12, 2022

Potential fix for the first issue: https://github.com/projen/projen/pull/1846

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secure AWS CodeArtifact access for isolated Amazon ...
AWS CodeArtifact is a powerful addition to CI/CD workflows on AWS, but it is similarly effective for code-bases hosted on a Jupyter notebook....
Read more >
aws codeartifact login fails in CircleCI pipeline #6197 - GitHub
I was looking at the customization for this command (specifically parse_source_name ) and it looks like the line argument is in a different ......
Read more >
Publishing Python Packages to AWS CodeArtifact Using ...
No other branch will be able to trigger an action that can assume this role and gain these permissions. Deploy the template below...
Read more >
Using AWS CodeArtifact with Python and Github Actions | Sufle
There is no need to worry about infrastructure as it is a fully ... function that returns "Hello world, AWS CodeArtifact is very...
Read more >
Private packages with CodeArtifact and Poetry, a ... - Jason Stitt
AWS CodeArtifact acts as a private package repository for several ... mkdir sample-lib cd sample-lib poetry init --no-interaction mkdir ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found