-
Notifications
You must be signed in to change notification settings - Fork 1k
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
After fail to create IAM role, cannot deploy anymore. #565
Comments
Thanks for reporting, this is a bug. We'll get this fixed. |
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.
Fixed via #636 |
I have started the app using chalice and stucked, the steps that i did on EC2 ubuntu instance were following:
|
I am still experiencing the same issue when deploying:
I don't understand why Chalice is still trying to delete the role on deployment...? I cannot seem to be able to fix this, since the role doesn't exist in AWS. Therefore I cannot even remove it with the console... |
I'm getting the same error using the latest version. |
A quick workaround is to manually create the inline policy using the name from the error message. |
FWIW I receive the same error as well. |
Fixing this error is important to me. |
Is there still no fix? |
This issue is what I was open, and I have confirmed that the phenomenon I reported was fixed via #636. Under what situation do you still encounter the same error ? |
I still see this in chalice 1.1.0, and I can't upgrade to 1.3.0 since it requires an older version of pip. pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found and is required by the application A reminder on the workaround in case anyone else stumbles across this: there should be a role called {your-app-name} with a policy under it called {your-app-name}. If they don't exist, create them. It doesn't matter what the policy does, since chalice will delete it. |
This is not fixed. Another way this happens is if chalice SUCCESSFULLY deletes the role, but does so when deploying in an environment that does not update the stored (in github, outside a docker container, etc) Then, the metadata in the file doesn't match reality and it attempts to delete every time you deploy. |
Hello.
When I execute
chalice deploy
, faced error of IAM role.$ chalice deploy --no-autogen-policy Creating role: sample-chalice ERROR - While deploying your chalice application, received the following error: An error occurred (MalformedPolicyDocument) when calling the PutRolePolicy operation: Syntax errors in policy.
and I have fixed syntax error, deploy again.
However, the IAM role had been made incompletely by the last deploy, so the deploy failed with another error.
If I wanted deploy to succeed, I had to delete incomplete IAM role once with AWS console or AWS CLI.
chalice delete
command was useless in this case.Is this as you expected ?
environment
The text was updated successfully, but these errors were encountered: