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

Failed iam role creation #632

Closed
wants to merge 10 commits into from
Closed

Failed iam role creation #632

wants to merge 10 commits into from

Conversation

nplutt
Copy link
Contributor

@nplutt nplutt commented Dec 6, 2017

Fixes bug #565.

So there ended up being a couple issue that I fixed here, first being bug #565 which was fixed by making a change to the awsclient.py file.

The second issue that I discovered while working on this bug was the following. If you do:

$ chalice new-project muck
$ cd muck
$ chalice deploy --no-autogen-policy

The same bug happens because the policy-env.json file does not exist. This results in a policy document of:

"Version": "2012-10-17",		
"Statement": []

being uploaded which throws a MalformedPolicyDocument error. In order to fix this issue I made changes to the deployer.py file. I removed the default policy and now raise a RuntimeError and alert the user to the fact that they do not have a policy-env.json file.

The last change that I made was to handle malformed json by adding nicer logging modeled after the config file loader.

Thanks!

@@ -732,8 +732,10 @@ def test_can_create_app_packager_with_no_autogen(tmpdir):
appdir = _create_app_structure(tmpdir)
Copy link
Contributor Author

@nplutt nplutt Dec 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I could tell it doesn't look like this test test_can_create_app_packager_with_no_autogen has anything to do with the deploy --no-autogen-policy command so I changed it to create the policy automatically so as not to trigger the RuntimeError. If it does let me know and I can make whatever changes are needed.

@nplutt nplutt closed this Dec 9, 2017
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.

1 participant