Skip to content

Conversation

@SimplyAhmazing
Copy link
Contributor

We use this package to deploy lambda functions for an in-house project. As of today we got the following error,

Starting new HTTPS connection (1): lambda.us-west-2.amazonaws.com
Updating your Lambda function
Starting new HTTPS connection (1): sts.amazonaws.com
Starting new HTTPS connection (1): lambda.us-west-2.amazonaws.com
Traceback (most recent call last):
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/bin/lambda", line 53, in <module>
    cli()
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/bin/lambda", line 39, in deploy
    aws_lambda.deploy(CURRENT_DIR, local_package)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/aws_lambda/aws_lambda.py", line 86, in deploy
    update_function(cfg, path_to_zip_file)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/aws_lambda/aws_lambda.py", line 336, in update_function
    MemorySize=cfg.get('memory_size', 512)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/botocore/client.py", line 159, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/travis/build/OpenTrons/foo-bar/lambdas/data-upload/venv/lib/python2.7/site-packages/botocore/client.py", line 494, in _make_api_call
    raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterValueException) when calling the UpdateFunctionConfiguration operation: SubnetIds and SecurityIds must coexist or be both empty list.

There's an active discussion on the error on the AWS Forums here: https://forums.aws.amazon.com/thread.jspa?threadID=246719

To fix this error I updated the lambda update configuration function to take empty lists or read lists from the configuration.

@nficano nficano merged commit fc32da5 into nficano:master Jan 30, 2017
@weilu
Copy link

weilu commented Apr 24, 2017

@SimplyAhmazing Thanks for making this change! I need the exact same thing :D

@nficano can we have this released please?

@nficano
Copy link
Owner

nficano commented Apr 24, 2017

will update today, sorry for the delay

@weilu
Copy link

weilu commented Apr 25, 2017

Thanks!

@nficano
Copy link
Owner

nficano commented Apr 27, 2017

@weilu sorry for the delay! work amirite? 👍

@weilu
Copy link

weilu commented Apr 27, 2017

@nficano hmmm I'm not able to install the new version. It complains about missing requirements.txt:

pip install python-lambda
Collecting python-lambda
  Using cached python-lambda-0.7.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/k7/txyxgc9d7s1flbyz07kp7b388zbqvn/T/pip-build-QtGkx4/python-lambda/setup.py", line 16, in <module>
        pip_requirements = [str(r.req) for r in requirements]
      File "/Library/Python/2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements
        filename, comes_from=comes_from, session=session
      File "/Library/Python/2.7/site-packages/pip/download.py", line 417, in get_file_content
        'Could not open requirements file: %s' % str(exc)
    pip.exceptions.InstallationError: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
    
    ----------------------------------------

@nficano
Copy link
Owner

nficano commented Apr 27, 2017

@weilu ok reverted to 0.5.1, let me know if that fixes it

@weilu
Copy link

weilu commented Apr 27, 2017

@nficano same issue of missing requirements.txt for 0.5.1 unfortunately =/

@weilu
Copy link

weilu commented May 8, 2017

@nficano I see you removed the broken 0.5.1, so.. Any idea when this feature will be release again? I'm happy to help test it. Currently I'm just installing the SHA directly off github.

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

Successfully merging this pull request may close these issues.

3 participants