jimjkelly / lambda-deploy Goto Github PK
View Code? Open in Web Editor NEWEasily Deploy Code to AWS Lambda
License: MIT License
Easily Deploy Code to AWS Lambda
License: MIT License
As requested in issue #1, it might make more sense that the default deploy action is to deploy the current directory as a single Lambda, and only search for multiple Lambdas if the -d
option is given. Some things to consider:
Having issues deploying, getting NoRegionError even though region is specified
2016-12-26 22:28:33:INFO:botocore.vendored.requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 169.254.169.254
Traceback (most recent call last):
File "/usr/local/bin/lambda-deploy", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/lambda_deploy/lambda_deploy.py", line 360, in main
name=options.name
File "/usr/local/lib/python2.7/dist-packages/lambda_deploy/lambda_deploy.py", line 75, in __init__
self.client = boto3.client('lambda')
File "/usr/local/lib/python2.7/dist-packages/boto3/__init__.py", line 83, in client
return _get_default_session().client(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 828, in create_client
client_config=config, api_version=api_version)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 69, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 222, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/dist-packages/botocore/args.py", line 44, in get_client_args
endpoint_url, is_secure, scoped_config)
File "/usr/local/lib/python2.7/dist-packages/botocore/args.py", line 101, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 295, in resolve
service_name, region_name)
File "/usr/local/lib/python2.7/dist-packages/botocore/regions.py", line 122, in construct_endpoint
partition, service_name, region_name)
File "/usr/local/lib/python2.7/dist-packages/botocore/regions.py", line 135, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
In my .env.lambda
:
AWS_DEFAULT_REGION = us-east-1
I even hard coded region into regions.py still doesn't work
As is referenced here there is a way to directly solve the Homebrew pip install bug in our codebase, so do that instead of showing the link in the error message.
Trying to get this going on Windows, but running into an error:
2016-04-18 11:38:33:INFO:botocore.credentials: Found credentials in environment variables.
2016-04-18 11:38:33:INFO:lambda_deploy: Packaging lambda .env
Traceback (most recent call last):
File "C:\Users\Joe\appdata\local\scoop\apps\python27\2.7.10\scripts\lambda-deploy-script.py", line 9, in <module>
load_entry_point('lambda-deploy==0.0.1', 'console_scripts', 'lambda-deploy')()
File "C:\Users\Joe\appdata\local\scoop\apps\python27\2.7.10\lib\site-packages\lambda_deploy\lambda_deploy.py", line 321, in main
method()
File "C:\Users\Joe\appdata\local\scoop\apps\python27\2.7.10\lib\site-packages\lambda_deploy\lambda_deploy.py", line 133, in deploy
zfh = self.package(lambda_name)
File "C:\Users\Joe\appdata\local\scoop\apps\python27\2.7.10\lib\site-packages\lambda_deploy\lambda_deploy.py", line 98, in package
if 'requirements.txt' in os.listdir(src_dir):
WindowsError: [Error 267] The directory name is invalid: 'C:\\Dev\\python\\kodi-alexa-master\\.env/*.*'
This is my .env file:
AWS_ACCESS_KEY_ID=***********
AWS_SECRET_ACCESS_KEY=*****************
LAMBDA_ROLE=lambda_basic_execution
LAMBDA_TIMEOUT=30
It looks like it's trying to use .env
as a directory that everything is in. Anything I can try?
And related... for example
{
'jti': jti,
}
If only we had that sweet JavaScript { jti }
syntax. :)
I've followed all the steps detailed in this read me; https://github.com/m0ngr31/kodi-alexa#aws-lambda. I'm having some issues deploying to AWS - it hangs for quite some time while deploying then comes up with the following message.
Can you suggest where I am going wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.