aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

pwsh: Permission denied with amazonlinux2-aarch64-standard:3.0 on CodeBuild

Open JuanZamudioGBM opened this issue 10 months ago • 0 comments

We have some lambdas in dotnet arm and we are using amazonlinux2-aarch64-standard:3.0 as the Image in the code build project. We use some powershell scripts to modify some csprojs and run some code coverage validations.

We deployed on Thursday 13 2025 with no problems, but on Friday 14 2025 executing the powershell script we received the error Permission denied.

We are able to reproduce the error just with pwsh -- version in the buldspec of the pull request.

[Container] 2025/02/18 22:03:47.560685 Running command pwsh --version
/codebuild/output/tmp/script.sh: line 4: /usr/bin/pwsh: Permission denied

Expected behavior See the version of powershell installed

Platform (please complete the following information): amazonlinux2-aarch64-standard:3.0

Additional context We tried to manually install another version of powershell (7.5.0) but we get the same error, also we have other lambdas in the same account running on aws/codebuild/standard:7.0 that where the codebuild runs just fine

Dis something change and have to do another thing to run powershell scripts on arm64?

--edit: I jus changed the installation folder to /usr/bin/pwsh2 and I can run my powershell scripts again using a custom installation

JuanZamudioGBM avatar Feb 18 '25 22:02 JuanZamudioGBM