CDK CLI errors when run as a non-existent user
See original GitHub issueA regression in 1.37 means that the CDK CLI will error out if it is run by a user not in /etc/passwd
Reproduction Steps
npx cdk init app --language=typescript
npm install
docker run -u 502:502 -v $(pwd):/app -w /app node ./node_modules/.bin/cdk list
Error Log
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
at Object.userInfo (os.js:268:11)
at cdkHomeDir (/app/node_modules/aws-cdk/lib/util/directories.ts:7:21)
at Object.cdkCacheDir (/app/node_modules/aws-cdk/lib/util/directories.ts:11:20)
at new AccountAccessKeyCache (/app/node_modules/aws-cdk/lib/api/aws-auth/account-cache.ts:25:44)
at Object.<anonymous> (/app/node_modules/aws-cdk/lib/api/aws-auth/sdk.ts:38:42)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
Environment
- CLI Version : >= 1.37
- Framework Version:
- OS : Tested in Docker on MacOS
- Language : Typescript
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >awslabs/aws-cdk - Gitter
Because I this looks like the toolkit is trying to bootstrap the same account/region multiple times (I'm assuming all your XXXXXXXXXXXX are the...
Read more >[Solved] AWS DynamoDB errors ResourceNotFoundException
Solution. DynamoDB responds with this error when you're trying to run an operation against non-existent or not active table. Troubleshooting steps:.
Read more >aws/aws-cdk v2.32.0 on GitHub - NewReleases.io
New release aws/aws-cdk version v2.32.0 on GitHub. ... cli: CLI errors when run as a non-existent user (#21018) (e6015a9), closes #7937; core: entrypoint ......
Read more >Cdk use existing vpc - cattolimonica.it
The CDK CLI will search for the specified VPC in the the stack's region and account, and import the subnet configuration. aws vpc...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The error goes away if you mount an /etc/passwd containing a user with UID 502
or if you provide a CDK_HOME env var
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.