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

Trying to use zappa with api gateway. the below error. #570

Closed
chaithuam opened this issue Dec 27, 2016 · 4 comments

Comments

@chaithuam
Copy link

@chaithuam chaithuam commented Dec 27, 2016

my zappa_settings.json

{
"dev": {
"app_function": "app.app",
"role_name": "zappa_test",
"s3_bucket": "zappa.dev.xyz",
"aws_region": "us-east-1",
"debug": true
}
}

calling update for environment dev..
Downloading and installing dependencies..
100%|████████████████████████████████████████████| 44/44 [00:05<00:00, 7.92pkg/s]
Packaging project as zip..
Uploading zappa-dev-dev-1482817370.zip (8.8MiB)..
100%|█████████████████████████████████████████| 9.22M/9.22M [00:17<00:00, 527KB/s]
Updating Lambda function code..
Updating Lambda function configuration..
Uploading zappa-dev-dev-template-1482817403.json (1.5KiB)..
100%|████████████████████████████████████████| 1.56K/1.56K [00:00<00:00, 6.56KB/s]
CloudFormation stack missing, re-deploy to enable updates
ERROR:Could not get API ID.
Traceback (most recent call last):
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/zappa.py", line 1328, in get_api_id
LogicalResourceId='Api')
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/client.py", line 251, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/client.py", line 537, in _make_api_call
raise ClientError(parsed_response, operation_name)
ClientError: An error occurred (ValidationError) when calling the DescribeStackResource operation: Stack 'zappa-dev-dev' does not exist
Deploying API Gateway..
Oh no! An error occurred! :(

==============

Traceback (most recent call last):
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/cli.py", line 1847, in handle
sys.exit(cli.handle())
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/cli.py", line 345, in handle
self.dispatch_command(self.command, environment)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/cli.py", line 379, in dispatch_command
self.update()
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/cli.py", line 605, in update
endpoint_url = self.deploy_api_gateway(api_id)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/cli.py", line 1816, in deploy_api_gateway
cloudwatch_metrics_enabled=self.zappa_settings[self.api_stage].get('cloudwatch_metrics_enabled', False),
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/zappa/zappa.py", line 1014, in deploy_api_gateway
variables=variables or {}
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/client.py", line 251, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/client.py", line 513, in _make_api_call
api_params, operation_model, context=request_context)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/client.py", line 566, in _convert_to_request_dict
api_params, operation_model)
File "/Users/chaithanya/zappa_dev/venv/lib/python2.7/site-packages/botocore/validate.py", line 270, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
ParamValidationError: Parameter validation failed:
Invalid type for parameter restApiId, value: None, type: <type 'NoneType'>, valid types: <type 'basestring'>

==============

Need help? Found a bug? Let us know! :D
File bug reports on GitHub here: https://github.com/Miserlou/Zappa
And join our Slack channel here: https://slack.zappa.io
Love!,
~ Team Zappa!

@sammy-SC

This comment has been minimized.

Copy link

@sammy-SC sammy-SC commented Dec 27, 2016

Hello @chaithuam,

I believe I had got same error when I was setting up zappa. I think you might have to add permission to your AWS user in IAM. The permission you need is cloudformation:DescribeStackResource.

I hope it helps. If not, somebody else will have to you help you.

@chaithuam

This comment has been minimized.

Copy link
Author

@chaithuam chaithuam commented Dec 29, 2016

Thanks @sammy-SC . I used permissions from #241 and I undeployed and deployed, it worked.

@Miserlou Miserlou closed this Feb 21, 2017
@jbohart

This comment has been minimized.

Copy link

@jbohart jbohart commented Apr 8, 2017

I was doing the Hello world example and undeploy, deploy fix this problem. I was already using the correct permissions, looks like just needed to do clean redeploy. thanks chaithuam.

@alexvaa

This comment has been minimized.

Copy link

@alexvaa alexvaa commented Apr 2, 2019

clean redeploy worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.