aws / aws/aws-sam-cli

Build failed - Error: PythonPipBuilder:ResolveDependencies

Open
#1,840 43 comments 3 reactions 0 assignees View on GitHub
maintainer/need-followup stage/needs-investigation
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Description

Trying to create Python Lambda function from PyCharm not working

### Steps to reproduce

Invoke Lambda creation using "Create new AWS Lambda..."
Runtime: Python 3.7
requirements.txt: https://pastebin.com/HpU1it63
Run using strict template file:
template.yml:
```
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
test3:
Type: 'AWS::Serverless::Function'
Properties:
Handler: order.create_order
Runtime: python3.7
CodeUri: .
Description: ''
MemorySize: 128
Timeout: 300
Role: 'arn:aws:iam::123456789:role/service-role/test-role'
VpcConfig:
SecurityGroupIds:
- sg-62e1c42f
SubnetIds:
- subnet-26e9c26e
- subnet-68a3c632
- subnet-b8edb5de
```

### Observed result

Used graphical create, not CLI, error:
```
Build Failed
Error: PythonPipBuilder:ResolveDependencies - {msgpack-python==0.5.6(sdist), pyrsistent==0.15.7(sdist), simplejson==3.17.0(wheel), pyyaml==5.3(sdist)}
```
Full log: https://pastebin.com/asgCa9D4

### Expected result

Successful build

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

OS: macOS Mojave 10.14.6
SAM: SAM CLI, version 0.43.0
P: Python 3.7.6
IDE: PyCharm 2019.3
AWS: aws-cli/2.0.1 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0dev5
used wheel: wheel 0.34.2
used pip: pip 19.0.3

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.