API Gateway REST -> HTTP Migration
HTTP API migration
Duplicate the current stage config and rename the stage, and add the below extra config to support HTTP API, we'll use this new stage for HTTP deployment testing.
{
"dev_http": {
...
"project_name": "project_name_http",
"api_name": "api_name_http", # Only If this key present
"use_http_api": true,
...
}
}
Update the env variables of the new lambda function deployed above.
Update domain mapping to newly deployed API. See Change Custom domain to regional endpoint
Wait for some time to reflect the above API mapping changes (~2 min)
check whether the new HTTP API deployment is working properly, if you're unable to access the API try it in an incognito window.
Optional: remove
domain
fromzappa_settings.json
in the original stage and undeploy the original/old REST API deployment using Zappa (zappa undeploy <stage>
).
Change Custom domain to regional endpoint
Choose the custom domain name you want in the API gateway console.
update TLS version to 1.2
Now click on the configurations tab -> Edit -> add regional endpoint with your ACM certificate.
update route53 record to "A type record" and point to above created regional endpoint API gateway domain name
Delete the
Endpoint configuration (edge-optimized)
in the Configuration tab.Delete rest API mapping.
Add mapping with newly deployed HTTP API
Test the API again after sometime
Last updated