Open
Description
Description:
With pip configured to search codeartifact, running sam build on the simple Hello World application waits indefinitely without prompting the user to enter codeartifact credentials.
Steps to reproduce the issue:
- Create a codeartifact domain and repository.
- Create domain
- Create repository and select pypi as an external resource
- Choose "View connection instruction", choose pip, copy the instructions to clipboard
- On development system, before running copied command, modify the expiration to 15 minutes
- paste the copied command into a terminal window/shell
- add '--duration-seconds 900' to the pasted command
- run the command
- Wait 15 minutes for credentials to expire.
- sam init --name demo-hang --runtime python3.8 --dependency-manager pip --app-template hello-world
- cd demo-hang
- sam build
Observed result:
$sam build
Building function 'HelloWorldFunction'
Running PythonPipBuilder:ResolveDependencies
<waits here until hit 'Enter'>
Build Failed
Error: PythonPipBuilder:ResolveDependencies - Could not satisfy the requirement: requests
$
- Command waits for unidentified user input.
- Press 'Enter' and the command completes with 'Build Failed', etc, with no indication of underlying codeartifact failure.
Expected result:
Expected either an error or a message as to what sam build is waiting for.
Additional information:
- Running 'sam build --debug' reveals that the hang is waiting for credentials for codeartifact.
- Work around is to login using "aws codeartifact login ..." and then run "sam build"
- Work around requires knowing the codeartifact domain (most people will have only one domain)
- The system being tested has both Python3.7 and 3.8 installed.