aws / aws/aws-codebuild-docker-images

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

Open
#758 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
1.2k
Forks
971
Avg merge
2h 47m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.