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

'InstanceIds' is a required property #82

Open
VihangaHeshan opened this issue Sep 22, 2019 · 6 comments
Open

'InstanceIds' is a required property #82

VihangaHeshan opened this issue Sep 22, 2019 · 6 comments

Comments

@VihangaHeshan
Copy link

I faced this below error, even though I properly included the AWS access Key.
AWS Error
I managed to get all available ec2 instances. But when I issue the command stop or start the EC2 instance, it gives me this error.
Please help me to resolve this issue ASAP.

@punkrokk
Copy link
Contributor

@VihangaHeshan can you share your command you are running, removing any actual instance Ids or other sensitive info?

@VihangaHeshan
Copy link
Author

Hi @punkrokk ,
Thank you for your reply.
This my action yaml file.
image

This is the alias file to start EC2 instance.
image

This is the command that I execute in the Slack with my Bot.
image

@punkrokk
Copy link
Contributor

@VihangaHeshan A quick peek makes me wonder two things:

  1. Can you run this at the CLI? st2 run aws.ec2_start_instances InstanceID=i-13221321312...
  2. Is your Jinja command format backwards? In your command you do state - id.
  3. Is the dash being read in from the instance?

I am not a chatops expert but may be able to help more after you answer these questions.

@VihangaHeshan
Copy link
Author

Hi @punkrokk,

  1. Still the same issue when I run the command at the CLI
    image
  2. State - id, that is when showing the result back to screen.
  3. I tried without the dash even. Still the same issue.
    image
    **I directly taken this code from Github stackstorm/ AWS page.
    As far as I know it says the error is in
    "Back
    {
    "stdout": "",
    "stderr": "Traceback (most recent call last):\n File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 333, in \n obj.run()\n File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 192, in run\n output = action.run(**self._parameters)\n File "/opt/stackstorm/packs/aws/actions/run.py", line 36, in run\n return self.do_method(module_path, cls, aws_action, **kwargs)\n File "/opt/stackstorm/packs/aws/actions/lib/action.py", line 158, in do_method\n for k, v in kwargs.copy(): #I removed items() and added copy()\nValueError: too many values to unpack (expected 2)\n",
    "exit_code": 1,
    "result": "None"
    }"

I am not sure whether this error occurred due to Python version mismatch.

By the way this is nothing to do with chatops, seems simple coding error or syntax error.
Please help me!

@punkrokk
Copy link
Contributor

punkrokk commented Oct 22, 2019 via email

@VihangaHeshan
Copy link
Author

Still same :(
image

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

2 participants