aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

"sam build" feedback: Don't fail if dependency manifest (requirements.txt) is not found

Open sanathkr opened this issue 8 years ago • 4 comments

Description: sam build always looks for the presence of a dependency manifest like requirements.txt. If it is not present, the command fails. Customers without any dependencies might not have a manifest.

One recommendation was to resolve dependencies if a manifest is present, if not skip. This will create false-positives where customers can sam build and it didn't resolve dependencies because it was looking for manifest in the wrong location. We can print a warning if we did not find any dependency manifest so customers will know what is happening.

As a workaround, customers can always create an empty manifest - requirements.txt so SAM CLI continues to work.

sanathkr avatar Nov 20 '18 15:11 sanathkr

I just hit this too testing out sam build. It shouldn't be assumed that every Lambda will have a requirements.txt file.

brysontyrrell avatar Nov 26 '18 18:11 brysontyrrell

especially if the function refers to external sources

MyLambda:
    Type: AWS::Serverless::Function
    Properties:
      Handler: requeue.handler
      Runtime: python2.7
      CodeUri:
        Bucket: !Ref 'SharedSourcesBucket'
        Key: 'sqs/requeue.zip'

superwese avatar Jan 06 '21 12:01 superwese

Any updates on this?

JaGarRod avatar Feb 03 '21 09:02 JaGarRod

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Aug 03 '21 05:08 github-actions[bot]