You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If the path to the aws credentials contains a space then then when the container executes an aws command (e.g. accessing the parameter store) the console presents the following error:
MissingRegion: could not find region configuration
To Reproduce
Following the official documentation here to create the env:
./codebuild_build.sh -i public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0 -a artifacts -m -c
This produces the following error:
Phase complete: DOWNLOAD_SOURCE State: FAILED
Phase context status code: Decrypted Variables Error Message: MissingRegion: could not find region configuration
Runtime error (*clienterr.PhaseContextError: MissingRegion: could not find region configuration)
See the Environment tab in the docker container created by the above command to see that the following environment variable was created:
Expected behavior
The container should be able to find the aws credentials even if the environment variable generated as part of the docker run command contains a space.
Platform (please complete the following information):
Windows 10.19044
Git 2.35.0.windows.1
Docker 20.10.17
Logs
$ ./codebuild_build.sh -i public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0 -a artifacts -m -c
Build Command:
winpty docker run -it -v //var/run/docker.sock:/var/run/docker.sock -e "IMAGE_NAME=public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0" -e "ARTIFACTS=//Artifacts" -e "SOURCE=//C/Users/Joe Blogs/Documents/GitHub/My.Project" -e "AWS_CONFIGURATION=//C/Users/Joe Blogs/.aws" -e "MOUNT_SOURCE_DIRECTORY=TRUE" -e "INITIATOR=Joe Blogsl" public.ecr.aws/codebuild/local-builds:latest
Removing agent-resources_build_1 ... done
Removing agent-resources_agent_1 ... done
Removing network agent-resources_default
Removing volume agent-resources_source_volume
Removing volume agent-resources_user_volume
Creating network "agent-resources_default" with the default driver
Creating volume "agent-resources_source_volume" with local driver
Creating volume "agent-resources_user_volume" with local driver
Creating agent-resources_agent_1 ... done
Creating agent-resources_build_1 ... done
Attaching to agent-resources_agent_1, agent-resources_build_1
agent_1 | [Container] 2022/07/07 16:24:57 Waiting for agent ping
agent_1 | [Container] 2022/07/07 16:24:58 Waiting for DOWNLOAD_SOURCE
agent_1 | [Container] 2022/07/07 16:24:59 Phase is DOWNLOAD_SOURCE
agent_1 | [Container] 2022/07/07 16:24:59 CODEBUILD_SRC_DIR=/codebuild/output/src814819326/src
agent_1 | [Container] 2022/07/07 16:24:59 YAML location is /codebuild/output/srcDownload/src/buildspec.yml
agent_1 | [Container] 2022/07/07 16:24:59 Processing environment variables
agent_1 | [Container] 2022/07/07 16:24:59 Decrypting parameter store environment variables
agent_1 | [Container] 2022/07/07 16:24:59 Phase complete: DOWNLOAD_SOURCE State: FAILED
agent_1 | [Container] 2022/07/07 16:24:59 Phase context status code: Decrypted Variables Error Message: MissingRegion: could not fin
d region configuration
agent_1 | [Container] 2022/07/07 16:24:59 Runtime error (*clienterr.PhaseContextError: MissingRegion: could not find region configur
ation)
Additional context
Copying the .aws folder to the C; drive and modifying line 154 of the script to the following value allows the container to find the credentials and confirms this bug is related to spaces in the path.
Describe the bug
If the path to the aws credentials contains a space then then when the container executes an aws command (e.g. accessing the parameter store) the console presents the following error:
To Reproduce
Following the official documentation here to create the env:
Local Config:
Local buildspec.yml:
Running the script with the following parameters:
This produces the following error:
See the Environment tab in the docker container created by the above command to see that the following environment variable was created:
Expected behavior
The container should be able to find the aws credentials even if the environment variable generated as part of the docker run command contains a space.
Platform (please complete the following information):
Windows 10.19044
Git 2.35.0.windows.1
Docker 20.10.17
Logs
Additional context
Copying the .aws folder to the C; drive and modifying line 154 of the script to the following value allows the container to find the credentials and confirms this bug is related to spaces in the path.
The text was updated successfully, but these errors were encountered: