Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sam local update #1134

Closed
AggarwalKunal opened this issue Apr 17, 2019 · 17 comments
Closed

sam local update #1134

AggarwalKunal opened this issue Apr 17, 2019 · 17 comments

Comments

@AggarwalKunal
Copy link

sam --version
A newer version of the AWS SAM CLI is available!
Your version: 0.2.11
Latest version: 0.15.0
See https://github.com/awslabs/aws-sam-local for upgrade instructions

i am getting this link to upgrade the sam cli version but i am unable to find the instructions. When i try to install it with pip, i face difficulties. Please help!!

@AggarwalKunal
Copy link
Author

@thesriram https://github.com/awslabs/aws-sam-cli/releases please tell me how to update via npm. or how to update via these files.

@mikhama
Copy link

mikhama commented Apr 17, 2019

@AggarwalKunal you can install new version using brew for MacOS/Linux, or download MSI-package for Windows, or install it using pip. Instructions and links are available here.
However there are not version for npm. I think npm is not supported anymore.

@AggarwalKunal
Copy link
Author

but when i tried to install it with pip, sam local start-api doesn't worked.

@mikhama
Copy link

mikhama commented Apr 17, 2019

You should add it into your $PATH variable. You could find it by following path:
C:\Users\<Your_Username>\AppData\Roaming\Python\Python37\Scripts

@AggarwalKunal
Copy link
Author

currently i am working in ubuntu.

@mikhama
Copy link

mikhama commented Apr 17, 2019

Ok, try to find out where are placed scripts installed by pip. I don't have a computer with Linux installed, and can't do it. But I also have installed this version by pip, added it into $PATH, and it works for me.
Maybe it helps. Run in terminal, and command shows you where sam is placed:
pip show aws-sam-cli

@AggarwalKunal
Copy link
Author

AggarwalKunal commented Apr 17, 2019

python user base path : /home/force-laptop-13/.local/bin

@mikhama
Copy link

mikhama commented Apr 17, 2019

Have you sam-command in this directory?
If answer is true, add it into your $PATH variable.
Maybe this this topic will help you make it.

@AggarwalKunal
Copy link
Author

i will see it and respond to you tomorrow.

@jfuss
Copy link
Contributor

jfuss commented Apr 17, 2019

@AggarwalKunal It is kind of hidden in the Update section here.

You will need to uninstall the npm version.

npm uninstall -g aws-sam-local

You should then be able to follow the your OS Installation instructions

@AggarwalKunal
Copy link
Author

@jfuss yup, you are right but npm doesn't have the latest verion of aws-sam-cli and pip doesn't start aws-sam-cli properly.
when we type : sam local start-api, it gives:
Error:

@jfuss
Copy link
Contributor

jfuss commented Apr 18, 2019

@AggarwalKunal We don't publish to npm anymore (and haven't for about a year).

Looks like you are installing into Python2.7. If you instead install into Python3.6+, you should see what is going on (there is a bug with some of our output in Python2.7). It is probably something with your template, if I remember how this occurs.

@sriram-mv
Copy link
Contributor

Brew is the go to method on mac to install aws-sam-cli and MSI for windows. Unistall the npm based install of aws-sam-cli, its really old and is not going to be updated going forward.

@AggarwalKunal
Copy link
Author

sam local start-api
Error: [InvalidResourceException('lambdasrc', 'property timeout not defined for resource of type AWS::Serverless::Function'), InvalidResourceException('apartmentsrc', 'property timeout not defined for resource of type AWS::Serverless::Function')] ('apartmentsrc', 'property timeout not defined for resource of type AWS::Serverless::Function') ('lambdasrc', 'property timeout not defined for resource of type AWS::Serverless::Function')

@AggarwalKunal
Copy link
Author

installed through pip3

@AggarwalKunal
Copy link
Author

Thanks all.....

@PavleNeskovic
Copy link

sudo -H pip install aws-sam-cli to install sam globally using pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants