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

Exception if _resources_ is missing #72

Closed
justcallmegreg opened this issue Jun 17, 2016 · 1 comment
Closed

Exception if _resources_ is missing #72

justcallmegreg opened this issue Jun 17, 2016 · 1 comment

Comments

@justcallmegreg
Copy link

If statements is used instead of resources, kappa throws a KeyError.

Stacktrace:

deploying
...deploying policy ses_send_mail_dev
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin//kappa", line 9, in <module>
    load_entry_point('kappa==0.3.1', 'console_scripts', 'kappa')()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kappa/scripts/cli.py", line 58, in deploy
    ctx.deploy()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kappa/context.py", line 222, in deploy
    self.policy.deploy()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kappa/policy.py", line 138, in deploy
    document = self.document()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kappa/policy.py", line 52, in document
    for resource in self.config['policy']['resources']:
KeyError: 'resources'

Kappa config:

 dev:
    profile: default
    region: eu-west-1
    policy:
        statements:
            - Effect: Allow
              Resource: "*"
              Action:
                - "logs:*"
            - Effect: Allow
              Resource: "*"
              Action:
                - "ses:Send*"
@justcallmegreg
Copy link
Author

I see it has been just fixed :)

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

1 participant