GithubHelp home page GithubHelp logo

AWS deployment fails about invokust HOT 8 CLOSED

futuresharks avatar futuresharks commented on June 10, 2024
AWS deployment fails

from invokust.

Comments (8)

csillab avatar csillab commented on June 10, 2024

Can you please share the following:

  • which version of invokust you're using?
  • the code where you called create_settings

Thanks.

from invokust.

asantoz avatar asantoz commented on June 10, 2024

Hi @csillab ,

I'm using the latest version on pip (0.73) and I'm using the same files locustfile_example.py and lambda_locust.py that are on the repository.
The create_settingsinvocation is here

When in search in python-packages folder seems pip is pulling to me locust dependency version 0.13.5 it's correct?

Thanks 🙏

from invokust.

csillab avatar csillab commented on June 10, 2024

I'll try to reproduce it tomorrow. I am unsure at the moment where the num_requests param is coming from. :)

There has been some changes in the code and in the example between invokust version 0.73 and 1.0 which is the current master now. Are you using the example in the master or from the 0.73 tagged version?

from invokust.

asantoz avatar asantoz commented on June 10, 2024

Nice @csillab :) I'm using master version.

from invokust.

csillab avatar csillab commented on June 10, 2024

Can you try select the right tag (0.73) and see if that example works for you? If that does not work, still happy to take a look tomorrow.

from invokust.

asantoz avatar asantoz commented on June 10, 2024

With tag 0.73 example works well 🎉

Some things I have to diverge from the documentation examples, let's take a look 😃

Invoke command

The only thing that doesn't work, is this command 👇

aws lambda invoke --function-name lambda_locust --invocation-type RequestResponse --payload '{"locustfile": "locustfile_example.py", "host":"https://example.com", "num_requests":"20", "num_clients": "1", "hatch_rate": "1", "run_time":"3m"}' output.txt

Which gave me this error 💥

Invalid base64: "{"locustfile": "locustfile_example.py", "host":"https://example.com", "num_requests":"20", "num_clients": "1", "hatch_rate": "1", "run_time":"3m
"}"

I used this argument to workaround that --cli-binary-format raw-in-base64-out.

Invoke Payload

It seems the payload has some incompatibilities on number_request field returning the error

Locust exception TypeError("create_settings() got an unexpected keyword argument 'num_requests'",)

but remove them it works like a charm 😄

Make sense to create a PR to edit these "possible" issues on documentation?
About version 1.0a is already advisable to use?

Thanks a lot for your attention @csillab

from invokust.

csillab avatar csillab commented on June 10, 2024

Nice, thanks for the detailed info :) I am glad you could make it work.

I'd love for someone to test 1.0a0 "live". That's compatible with the new major release of locust. Please report any issues with it and happy to take a look in my free time :)

That num_requests is definitely wrong there. A PR is welcome to fix it up for master, seems to be wrong there too. :)

from invokust.

FutureSharks avatar FutureSharks commented on June 10, 2024

I will close this now 🙂

from invokust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.