[
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "<!--- Provide a general summary of the issue in the Title above -->\n## Context\n<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->\n<!--- Also, please make sure that you are running Zappa _from a virtual environment_ and are using Python 3.6/3.7/3.8 -->\n\n## Expected Behavior\n<!--- Tell us what should happen -->\n\n## Actual Behavior\n<!--- Tell us what happens instead -->\n\n## Possible Fix\n<!--- Not obligatory, but suggest a fix or reason for the bug -->\n\n## Steps to Reproduce\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\n<!--- reproduce this bug include code to reproduce, if relevant -->\n1.\n2.\n3.\n\n## Your Environment\n<!--- Include as many relevant details about the environment you experienced the bug in -->\n* Zappa version used:\n* Operating System and Python version:\n* The output of `pip freeze`:\n* Link to your project (optional):\n* Your `zappa_settings.json`: \n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!--\n\nBefore you submit this PR, please make sure that you meet these criteria:\n\n* Did you read the [contributing guide](https://github.com/Miserlou/Zappa/#contributing)?\n\n* If this is a non-trivial commit, did you **open a ticket** for discussion?\n\n* Did you **put the URL for that ticket in a comment** in the code?\n\n* If you made a new function, did you **write a good docstring** for it?\n\n* Did you avoid putting \"_\" in front of your new function for no reason?\n\n* Did you write a test for your new code?\n\n* Did the Travis build pass?\n\n* Did you improve (or at least not significantly reduce)  the amount of code test coverage?\n\n* Did you **make sure this code actually works on Lambda**, as well as locally?\n\n* Did you test this code with all of **Python 3.6**, **Python 3.7** and **Python 3.8** ? \n\n* Does this commit ONLY relate to the issue at hand and have your linter shit all over the code?\n\nIf so, awesome! If not, please try to fix those issues before submitting your Pull Request.\n\nThank you for your contribution!\n\n-->\n\n## Description\n<!-- Please describe the changes included in this PR --> \n\n## GitHub Issues\n<!-- Proposed changes should be discussed in an issue before submitting a PR. -->\n<!-- Link to relevant tickets here. -->\n\n"
  },
  {
    "path": ".gitignore",
    "content": "*~\n*.zip\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coveragerc\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*,cover\n.hypothesis/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# pyenv\n.python-version\n\n# PyCharm\n#  Project settings from the PyCharm IDE are stored in the .idea folder\n.idea/\n\n# Apple OS X specific files are put into the .DS_Store file\n.DS_Store\n\n# Vim stuff:\n*.swp\n*.swo\n*~\ntests/zappa_settings.json\ntests/example_template_outputs\n\n# Locally generated settings file\nzappa_settings.json\n\n# Sublime Text stuff\n*.sublime-project\n*.sublime-workspace\n\nREADME.test.md\n.vscode\n\n.mypy_cache\n.pytest_cache\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: python\npython:\n  - \"3.6\"\n  - \"3.7\"\n  - \"3.8\"\ndist: xenial\n# command to install dependencies\ncache:\n  - pip\ninstall:\n  - \"pip install --upgrade pip; pip install --upgrade setuptools; pip install -r test_requirements.txt; pip install -e git+https://github.com/django/django-contrib-comments.git#egg=django-contrib-comments; python setup.py install\"\n# command to run tests\nenv:\n  - TESTCASE=tests/tests_docs.py\n  - TESTCASE=tests/test_handler.py\n  - TESTCASE=tests/tests_middleware.py\n  - TESTCASE=tests/tests_placebo.py\n  - TESTCASE=tests/tests_async.py\n  - TESTCASE=tests/tests.py\nbefore_script:\n  # stop the build if there are Python syntax errors or undefined names\n  - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics\n  # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide\n  - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics\nscript:\n  - nosetests $TESTCASE --with-coverage --cover-package=zappa --with-timer\n    #  - coverage combine --append\nafter_success:\n  coveralls\nnotifications:\n  slack: zappateam:TTJ0mfHunDK0IBweKkEXjGpR\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Zappa Changelog\n\n## 0.52.0\n* Remove dateutil version restriction\n* Fix failed downloads of wheel packages with non-alphanumeric characters\n* Last release from Miserlou/Zappa\n* Removed references to zappa.io\n\n## 0.51.0\n* Lambda Layers\n* Cognito support\n* Skip venv check if --no_venv argument is passed\n* Fix for abi3 filename matching\n* Wait for the Load Balancer to become active before proceeding\n* Add option 'Scheme' for alb config\n* Allow full path exclusions while packaging\n* Workaround for werkzeug incompatibility\n* And assorted fixes\n\n## 0.50.0\n* Updated manylinux to support manylinux1/manylinux2010/manylinux2014 packages\n* Fixed issue with duplicated cookie headers in API Gateway\n* Various maintenance updates to the README file\n* Remove old python 2.7 code (not all yet)\n* Use pip-tools to manage dependencies (and remove pinned dependencies from the package)\n* Add option for concurrency limit\n* Use safe_load with YAML\n* Support for ABI3 binary packages (particularly cryptography)\n* Remove dependency on lambda-packages\n\n## 0.49.0\n* Added support for Python 3.8\n* Fixed boto3 reporting of long names\n* Added support for new AWS Regions\n* Minor bug and README fixes\n\n## 0.48.2\n* Last version with Python 2.7 support.\n* Fix for invalid values of HTTP_HOST and others (introduced in 0.48.0)\n\n## 0.48.1\n* Fix for an issue where you couldn't update a function if it had been deployed with a version prior to 0.48.0\n* Support for private (VPC-only) API Gateway endpoints\n\n## 0.48.0\n* Deprecation of zappa.async because async is a reserved word in 3.7, please use zappa.asynchronous\n* Support for Application Load Balancer as an alternative to API Gateway\n* Improvements in manylinux wheel downloads\n* Support for multi-value query strings\n* Python 3.7 support\n* Support for multi-value headers\n* Support for the new 256kB async limit\n* Bunch of small typos, fixes and documentation improvements\n* Use Django 2 on tests with python 3\n* Stop applying tags on buckets not created by zappa\n* Be more forgiving on 504 errors during deployment\n* Fix cleanup of DynamoDB table for async tasks\n* Detection of invalid bucket names\n* Flake8 checks added to tests\n\n## 0.47.1\n* Handle accounts with more than 100 domains in route 53\n* Force requests upgrade to 2.20.0 for compatibility with urllib3 1.24\n* Allow defining API Gateway policies (including restricting access to one IP address)\n\n## 0.47.0\n* Support for SQS events\n* Added test to enforce running of doctoc\n* Add support for running django as a WSGI app (for NewRelic and others)\n* Updates AWS regions for lambda and API Gateway\n* Fix support for gcloud and other packages with slim_handler\n* Add --disable-keep-open to zappa tail\n* Dependency updates\n* Fix pyenv invocation\n* Add custom base_path stripping support\n* Multiple documentation fixes and improvements\n* first iteration of a documented deploy policy\n\n## 0.46.2\n* hotfix for creating virtual environments\n\n## 0.46.1\n* Hotfix for pipenv support (pip >10.0.1)\n* Adds AWS GovCloud support!\n* Test fix\n\n## 0.46.0\n_Okay, I dropped the ball for a long time. Bad BDFL!_\n_New releases will come much faster once again_\n* Pip10 compatibility\n* Add support for base path configuration in API gateway custom domain.\n* Fix path case sensitivity in get_installed_packages\n* Move task decorator async decision from import time to call time.\n* Fix documentation error in authorizer stanza of zappa_settings.json.\n* Adding explicit UTF-8 encoding for Flask app detection\n* Bump lambda packages version\n* Fix for work with latest Werkezeug\n* Fixed parameter name from 'FunctionNmae' -> 'FunctionName'\n* Remove `use`; fixes #1522\n* Philippe Trounev is awesome\n* fix case sensitivity problem for comparing package location\n* isBase64Encoded is a boolean flag instead of string true\n* check pip return code as sometimes pypi lookup fails\n* Add support to delete old versions of lambda functions.\n* Reactor title casing of dict keys into a utility function\n* Add `role_arn` settings variable\n* ..and too many more, check the changelog!\n\n## 0.45.1\n* Make `package_info.json` consistent across Python versions\n* Fixes to `task_sns`\n\n## 0.45.0\n* Add support for SQLite on Python 3.6 (LP bump)\n* Add unique package identifier file\n* Fixes #1171 don't colorize partial words\n* Various small changes\n* More robust OpenSSL parsing for LE\n* Update applies tags\n* Allows deploying and updating from existing S3 package\n\n## 0.44.3\n* Slim handler packaging hotfix - thanks @mcrowson!\n\n## 0.44.2\n* Non-Dynamo asynx hotfix - thanks @jwkvam!\n\n## 0.44.1\n* Packaging hotfix - thank Yunseop!\n\n## 0.44.0\n* Async responses (thanks Sean!)\n* Remove setLevel call from common log\n* Fix #1023\n* Merge #1058, 1059, 1073\n* Allow overriding of endpoint_url arg\n* Add support for API Gateway stage variables\n* Add AWS X-Ray support (thanks @mathom!)\n* Events take kwargs (Thanks @mcrowson!)\n* Detect P2/3 during `init`\n* Include stage names in `slim_handler` zips\n* Allow `-s` with `manage`\n* Use same S3 bucket for global endpoints\n* Fix bug with mixed-case packages\n* Cache wheels, fix 0-byte wheels\n\n## 0.43.2\n* Add index prefix to each subsequent schedule expression for the same event (#1051)\n* fix/Only update CORS on resources which have an OPTIONS method (#1036)\n* Support for binary support and cors simultaneously (#1011)\n* Set Flask script name based on domain which the request was made to (#1015)\n* Fix SNS Async (#1055)\n* GZip for slim handler\n* Force color option\n* Various dep bumps\n\n## 0.43.1\n* Fixes #1001, don't override AWS env vars if k:v not set. Thanks Nik and Sean!\n\n## 0.43.0\n* Checks for the key 'Environment' when fetching remote lambda env vars (#988)\n* except BotoCoreError before general exception in zappa.cli.update\n* make cookie hack case-insensitive\n* Fix #998 - Make environment variable keys strings instead of byte arrays in python 3.6\n* Add --disable_progress command line parameter\n* #946 - Allow setting cors to false.\n* #870 Lambda from outside\n* Implement context header mappings - Feature Request Issue #939\n* Separating out native AWS environment variables ##962\n* Rule name shortening\n* Splintering aws_environment_variables from environment_variables (to avoid overwriting AWS native env vars).\n\n## 0.42.2\n* Add exclude for __pycache__ contents (#943)\n* Fix #937 - Use get_data\n* Add support for configuring APIGW cache TTL and encryption #942\n* Addressing #909: Don't load credentials for 'package' command\n\n## 0.42.1\n* Small fixes for #918, #922, #803, #802, #799, #888, #903, #893, #828, #874, and others.\n* Support for manylinux wheels Python 3.6 package downloading.\n* Py3 `certify` fixes.\n* Add support for multiple expressions when scheduling\n* Fix content-type headers not passing through on DELETE\n* Avoid creating __init__.py in a directory next to a module (.py file) with the same name\n* Check recursively if there is any .py{,c} file in a directory before creating __init__.py\n* Fix SNS event tasks\n* Bump lambda-packages\n\n## 0.42.0\n* Cached manylinux wheel installed\n* New dependency installation formatting\n* Clarify \"stage\" vs \"environment\" terminology in code\n* Fix problem with capitalized packages\n* Delete local package if using wheels version. This saves several MBs on package size in some cases (e.g. numpy).\n* Thanks to @mcrowson, @nikbora and @schuyler1d\n\n## 0.41.3\n* Various Python3 fixes\n* Remove some dead code\n* More binary package fixes thanks to and @nikbora and @bxm156\n* Improved async tasks thanks to @schuyler1d\n* Various small changes\n\n## 0.41.2\n* Support for new `lambda-packages` format (Python3 support)\n* Fix `setup.py` on Windows Python3\n* Fix #818 - python3 import for LE\n* Support AWS-specific environment variables (with KMS)\n\n## 0.41.1\n* Add `template` command\n* Add `--json` in more places\n* Add `--output` to package\n* Support for manylinux wheels Python 3.6 package downloading #803\nfrom nikbora\n* Fix PyEnv exit code #799\n\n## 0.41.0\n* Add Python3 Support! #793, #6\n* Deprecate `lets_encrypt_expression`\n* Refactor a bunch of stuff to work with Python3 package restrictions >:[\n* #776 fix for libmysqlclient.so.18 error when using `slim_handler`\n* add profile and region detection to init - thanks @pdpol\n* #774 Wsgi environment improvements (Fix untrustworthy remote_addr)\n* Only create `__init__.py` file if there are python files or sub dirs in the folder\n* Update docs to reflect lambda name prepended to role_name\n* Guard log responses (thanks @scoates)\n\n## 0.40.0\n* Add Async Task Support! Lots of tickets and PRs related, including #61, #603, #694 and #732.\n* More info here: https://blog.zappa.io/posts/zappa-introduces-seamless-asynchronous-task-execution\n* Fix Django non-WSGI function initialization, #748\n* Add support for AWS Lambda Dead Letter Queue, #740\n* Fix API Gateway test button (the bolt button), #735\n* Switch to using per-lambda-name (project-stage) rather than a single default LambdaExecutionRole\n\n## 0.39.1\n* Fix broken Let's Encrypt trying to use new ACM ARNs\n* Add `apigateway_description` setting, fixes #722\n* More aggressive virtualenvironment checking\n\n## 0.39.0\n* Add `certificate_arn` setting, support for AWS Certificate Manager (#710)\n* Fix zip permissions when building on Windows (#714)\n* Change the active working directory to `/tmp` when using the slim handler so that relative filepaths work. (#711)\n\n## 0.38.1\n* Hotfix for broken Django deploys\n\n## 0.38.0\n* Add confirm to `certify`\n* Add `--manual` to `--certify`\n* Fix `certify` for existing domains\n* Add `extra_permissions` setting\n* Add `shell` command\n\n## 0.37.2\n* Revert to Kappa 0.6.0 #684 and others\n* Add binary support for more HTTP methods, #696\n\n## 0.37.1\n* Add binary upload support, fix #683\n\n## 0.37.0\n* Add support for custom, non-Let's Encrypt certificates, thanks to Benjamin Congdon\n* Change default permissions to allow executable binaries, #682\n* Fix binary support for Django POST, #677\n\n## 0.36.1\n* Remove Kappa 0.6 specific hack\n* Bring back '-' substitution\n\n## 0.36.0\n* Add automatic support for serving binary files! Via @wobeng, closes #481\n* Fixes `rollback` default back to 1 from 0, #673\n* Ensure correct chmodding during package creation, #484\n* Update regions that Zappa supports, #667\n* Validate function names based on actual gateway rules #521\n* Fix unschedule events with trimmed names #662\n* Fix a few places where `extends` wasn't respecting `stage_config`, #655\n* Begin to remove some dead code\n* Dependency bumps\n\n## 0.35.2\n* Adds `--non-http` to `tail`\n\n## 0.35.1\n* Fix 64bit `lambda-packages` (#645)\n* Fix wheel packages (#642)\n\n## 0.35.0\n* Replace ZappaCookie with Set-Cookie permutation! :D (#636)\n* Bump `lambda-packages` version\n* Fix installed_packages_name_set (#637)\n* Add `slim_handler` (#548)\n* Various small requirements bumps and other fixes.\n\n## 0.34.0\n* Adds `--since` and `--filter` to `tail`\n* Fixes `unschedule` command when used with specific stage\n\n## 0.33.0\n* Adds `package` command\n* Forbids the use of unicode environment variable keys\n* Initialize wsgi.errors to sys.stderr (was '')\n* Accept `AWS_SESSION_TOKEN` when executing via an IAM role (#589)\n* Set `REMOTE_USER` even when using `iam_authorization`\n* Rename `lets_encrypt_schedule` to `lets_encrypt_expression` (#571)\n* Messages in `tail` are now sequential\n* Bump version requirements, update README\n* Various other small changes\n\n## 0.32.1\n* File `tail` broken in CLI refactor\n\n## 0.32.0\n* Add Cognito Authorizers\n* Refactor CLI, add Bash Completion\n* Improve manylinux wheels\n* Varios fixes and req bumps\n\n## 0.31.0\n* Adds the `cors` feature, big thanks to @AusIV!\n* Adds support for `-e` eggs, thanks to @schuyler1d and @xuru!\n* Adds support for YAML settings files. Eat up, hipsters.\n\n## 0.30.1\n* Add `--http` filter to `tail`\n* Prefer `apigateway_enabled` but still respect `use_apigateway`, #493\n\n## 0.30.0\n* Adds colors to `zappa tail` output, fixes #492\n* Adds `--no-color` CLI argument\n* Adds fatal warning for bad `app_function`s, fixes #485.\n\n## 0.29.2\n* Fix S3 broken S3 events\n* Move `use_apigateway` to `apigateway_enabled`\n\n## 0.29.1\n* Fixes progress bar error for manylinux packages\n* Safely handle freezes when downloading from PyPI\n* Adds `s3://` syntax for remote env files. (#478, thanks @Leandr!)\n\n## 0.29.0\n* Adds `extends` syntax to settings file.\n* Fixes Django migrations, #464\n* Adds support for manylinux wheels! #398\n* Fixes multiple events in `status` command\n* Fixes support for `certify` on apex domains, #451\n\n## 0.28.3\n* Filter private hosted zones to avoid conflicts while certifying\n* Fix small Python3 bug (#457)\n* Fix for #453 (windows os.path)\n* Re-raise Zappa exception with full traceback\n* Skip pyc on django migrations, fixes #436\n* Delete correct domain name, #448\n\n## 0.28.2\n* added region and lambda name to not deployed error\n\n## 0.28.1\n* Add \"global\" mode to init. Expect a blog post soon!\n* Small refactors and dependency upgrades.\n\n## 0.28.0\n* `--json` for machine readable status output\n* `--all` for global deployment prep\n* Better exit code handling\n* Get AWS region from profile if not set in zappa_settings.json\n* Fix broken Django management command invocation\n* Add Kinesis permission\n* Add capability to specify authoriser arn\n* Various refactors and small fixes\n\n## 0.27.1\n\n* Bump lambda-packages\n* Fix new Django unicode problems (#397)\n* Ensure env vars are strings via @scoates\n* Fix #382\n\n## 0.27.0\n\n* Remove many hacks using new API Gateway features.\n    * Closes #303, #363, #361\n    * See the [blog post](https://blog.zappa.io/posts/unhacking-zappa-with-new-apigateway-features) for more details!\n* Bump dependencies - make sure you reinstall your requirements!\n* Improved stack update handling.\n\n### 0.26.1 (Never Published)\n\n* Warn on namespace collisions.\n* Bump lambda-packages version.\n\n## 0.26.0\n\n* Use simplified API Gateway configuration, via @koriaf.\n* Add better support for `use_apigateway` without any supplied app function. Reported by @mguidone.\n* Truncate illegally long event functions names. Reported by @mguidone.\n\n## 0.25.1\n\n* Remove 'boto' from default excludes. #333, thanks Claude!\n* Don't allow invalid API Gateway characters in the config. Thanks @scoates!\n* Better respect for `use_apigateway` in `update` command.\n* Avoids hang with API Gateway limit reached.\n* Fix DynamoDB/Kinesis event sources, add docs. Big thanks Claude!\n\n## 0.25.0\n\n* Add ability to invoke raw python strings, like so:\n\n    `zappa invoke dev \"print 1+2+3\" --raw`\n\n* Fixes multi-argument `manage` commands.\n* Updated related documentation.\n* Fixes places where program was exiting with status 0 instead of -1. Thanks @mattc!\n* Adds old-to-new-style check on delete, thanks @mathom.\n\n## 0.24.2\n\n* Fix a problem from trying to `update` old-style API routes using new Tropo code. Ensures `touch` works as intended again. Fix by @mathom.\n\n## 0.24.1\n\n* Add a helpful failure warning for users without permissions to automatically manage execution roles.\n* Fix potential div by zero error in new Tropo code.\n\n## 0.24.0\n\n* Use Troposphere/CloudFormation to create API Gateway routes\n  - Thanks, @mathom!\n* `zappa update` now updates changes to API Gateway routes\n* Redirect HTML content injection is fixed\n* Redirect HTML content injection now only happens for 'text/html' content types. This is a partial solution to #303.\n* Added CHANGELOG.md\n\n## 0.0.1 - 0.23.2\n\n* Didn't keep a changelog\n* Sorry!\n* Read the commit log :)\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2017 Rich Jones\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "MANIFEST.in",
    "content": "include README.md LICENSE requirements.txt test_requirements.txt requirements.in test_requirements.in\nrecursive-include zappa *.py\n"
  },
  {
    "path": "README.md",
    "content": "Project moved to https://github.com/zappa/Zappa. Versions after 0.52.0 are published from there. Thank you Rich Jones for all your work on creating Zappa and maintaining it for years!\n"
  },
  {
    "path": "docs/domain_with_free_ssl_dns.md",
    "content": "# Using Let's Encrypt with Zappa\n\nIf you want to deploy a Zappa application using a domain or a subdomain, you'll need a valid SSL certificate. Fortunately for you, Zappa provides support for free SSL certificates using [Let's Encrypt](https://letsencrypt.org/) out of the box!\n\n### Step 1: Creating a Hosted Zone\n\nTo verify that you own your domain, Let's Encrypt issues a challenge for you to prove that you control your domain's DNS servers. To do this automatically, Zappa requires that you use AWS's [Route 53](https://aws.amazon.com/route53/) DNS service.\n\nIn the AWS [Route 53 web console](https://console.aws.amazon.com/route53/), create a new \"Hosted Zone\" for your domain. Define this value as the _apex_ (\"naked\") domain of your target domain. (So even if you wanted `test.zappa.io`, call this zone `zappa.io`). This will automatically give you a set of NS servers for your domain to use, like so:\n\n[![Console](http://i.imgur.com/1DflCR4.png)](https://console.aws.amazon.com/route53/)\n\nIn your domain registrar's settings, set these new values as your domain's nameservers. These may take up to an hour to propagate.\n\n### Step 2: Generating an AWS Account Key\n\nNext, you'll need to generate an account key that you'll use with Let's Encrypt.\n\nTo generate it, simply:\n\n```\n$ openssl genrsa 2048 > account.key; \n```\n\nIt's very important that you keep that key safe!\n\n_Note that this is a 2048b key. It's generally preferred to use a stronger 4096b key, but at time of writing, AWS did not support keys that large. Use larger keys at your own risk. If you get it working with a 4096b key, please file an issue so that we can update this documentation._\n\n### Step 3: Certification\n\nFinally, configure your `zappa_settings.json` to use this domain and key:\n\n```javascript\n{\n    \"dev\": {\n    ...\n       \"domain\": \"test.zappa.io\", // Your target domain\n       \"lets_encrypt_key\": \"account.key\", // Path to account key\n    ...\n    }\n}\n```\n\nIf you're doing this as part of a continuous deployment system, you can also store account key in a secure S3 bucket and point to it like so:\n\n```javascript\n{\n    \"dev\": {\n    ...\n       \"domain\": \"test.zappa.io\", // Your target domain\n       \"lets_encrypt_key\": \"s3://your-secure-bucket/account.key\", // S3 Path to account key\n    ...\n    }\n}\n```\n\nThen, to verify, create and install your certificate with your domain, simply run the command:\n\n```\n$ zappa certify\n```\n\nAnd you're done! You can now use your SSL-secured Zappa application on your target domain.\n\n**Please note** that the first time you run this command, it can take around 45 minutes for Amazon to create your domain, and it'll take about 60 seconds every time after that.\n\nLet's Encrypt certificates only last for 3 months, so make sure that you remember to renew in time.\n\n### Step 4 (Optional): Auto-Renew\n\nIf you want your certificates to renew automatically, use simply need to define a `lets_encrypt_expression` in your settings, like so:\n\n```javascript\n{\n    \"dev\": {\n    ...\n       \"domain\": \"test.zappa.io\", // Your target domain\n       \"lets_encrypt_key\": \"s3://your-secure-bucket/account.key\", // S3 Path to account key\n       \"lets_encrypt_expression\": \"rate(15 days)\", // LE Renew schedule\n    ...\n    }\n}\n```\n\nThe only caveat with this is that your functions `timeout_seconds` must be greater than `60`, as that's how long it takes the DNS to propagate. The auto-renewer will be installed whenever you next `update` or `schedule`, though you may need to re`deploy` to up your `timeout_seconds`.\n"
  },
  {
    "path": "docs/domain_with_free_ssl_http.md",
    "content": "# Using Let's Encrypt with Zappa (HTTP Validation)\n\n## IMPORTANT!: Zappa now supports DNS-based validation out of the box, so you should probably use that if possible!\n\nThis guide will show you the slightly convoluted way of running a Zappa website on an API Gateway Custom Domain Name with a free valid SSL certificate via Let's Encrypt with HTTP validation.\n\n## Tool Installation\n\nFirst, you should have a valid Zappa website deployed to API Gateway without a domain.\n\nYou'll also need to install Let's Encrypt via git:\n\n```\n$ git clone https://github.com/letsencrypt/letsencrypt\n$ cd letsencrypt\n```\n\nand localtunnel via npm:\n\n```\n$ npm install -g localtunnel\n```\n\n## Generating the Certificate\n\nIn one terminal, run:\n\n```\n./letsencrypt-auto certonly -d yoursub.example.com --manual\n```\n\nHit 'Yes' until you get to a message like this:\n\n```\nMake sure your web server displays the following content at\nhttp://yoursub.example.com/.well-known/acme-challenge/OJkbegasdfnowA_xql_kqpl8hBImj9WbM88fDF35wBE before continuing:\n\nOJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE.Dowxk8snntasdfS433FYr2xtYZ0RaBcpaEXqmdc\n\nIf you don't have HTTP server configured, you can run the following\ncommand on the target server (as root):\n\nmkdir -p /tmp/letsencrypt/public_html/.well-known/acme-challenge\ncd /tmp/letsencrypt/public_html\nprintf \"%s\" OJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE.Dowxk8snnt2LxVZS3XS433FYr2xtYZ0RaBcpaEXqmdc > .well-known/acme-challenge/OJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE\n# run only once per server:\n$(command -v python2 || command -v python2.7 || command -v python2.6) -c \\\n\"import BaseHTTPServer, SimpleHTTPServer; \\\ns = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \\\ns.serve_forever()\"\nPress ENTER to continue\n```\n\nNext, in another terminal, run the command it gave you as root.\n```\nsudo $(command -v python2 || command -v python2.7 || command -v python2.6) -c \\\n\"import BaseHTTPServer, SimpleHTTPServer; \\\ns = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \\\ns.serve_forever()\"\n```\n\nIn a third terminal, run the following command (make sure firewall is off or allow port 80 through):\n\n```\nlt --port 80 --subdomain yoursub\n```\n\nThen, in a browser, visit http://yoursub.localtunnel.me/.well-known/acme-challenge/ and make sure that your challenge value is there.\n\nNext, point your DNS server's CNAME value to be \"yoursub.localtunnel.me\". Wait five minutes for this to propate, then visit http://yoursub.example.com/.well-known/acme-challenge/ and confirm that this is working.\n\nThen, in the first terminal, press ENTER and your certificate will be generated. You can find all of the keys and certificates in /etc/letsencrypt/live/yoursub.example.com/\n\n## Installing the Certificate\n\nIn the AWS API Gateway console, visit the [custom domains](https://console.aws.amazon.com/apigateway/home?region=us-east-1#/custom-domain-names) page. Press 'create' and fill in your values from your /etc/letsencrypt/live/yoursub.example.com/ directory.\n\n\n| value | AWS API Gateway Custom Domain Name Setting field |\n| --- | --- | --- |\n| `yoursub.example.com` | Domain name |\n| `yoursub.example.com` | Certificate name |\n| `privkey.pem` | Certificate private key |\n| `cert.pem` | Certificate body |\n| `fullchain.pem` | Certificate chain. **Note**: only copy the 2nd part of the chain because the 1st part is the Certificate body, already provided.\n\nFinally, press 'Save' and your domain with a free valid SSL certificate will be live! Update your domain DNS CNAME to point to API Gateway domain. Also, this certificate will expire after 90 days, remember to re-generate it!\n"
  },
  {
    "path": "example/README.md",
    "content": "# Zappa Example\n\nThis will deploy a simple Flask app\n\n## Setup\n    # configure your AWS keys\n    $ aws configure\n\n## Deploy WSGI App\n    # deploy API to dev environment\n    $ zappa deploy dev_api\n\n    # Zappa will creates the API Gateway url for you similar to this\n    $ curl https://zzz.execute-api.us-west-2.amazonaws.com/dev_api\n\n## Schedule\n\nYou can deploy just a function with a schedule:\n\n    # deploy API to dev environment (doesn't create APIGateway resource)\n    $ zappa deploy dev_event\n\n    # schedule CloudWatch to run this Lambda function every minute\n    $ zappa schedule dev_event\n\n    # watch log\n    $ zappa tail dev_event\n\nYou can also call a scheduled function packaged along with your normal WSGI app:\n\n    # deploy API to prod environment\n    $ zappa deploy prod\n\n    # schedule CloudWatch to run mymodule.myfunc every 5 minutes\n    $ zappa schedule prod\n\nThis function can optionally take the usual `event` and `context` lambda arguments.\nSee `mymodule.myfunc_with_events` for an example of this.\n\n## Local Testing\n\nTo test locally you can execute the WSGI app like you would normally.\n\n    $ python app.py\n\nYou can also call your scheduled function locally. When deployed, the handler will import and run this function.\nFor example, in \"prod\" it is defined as \"mymodule.myfunc\", so it can be called as such:\n\n    $ python -c \"import mymodule; mymodule.myfunc()\"\n\nIf your function uses the events argument you will need to send a dict with what the function expects.\nScheduled events use a structure similar to the following:\n\n\n```python\n{\n  \"account\": \"123456789012\",\n  \"region\": \"us-east-1\",\n  \"detail\": {},\n  \"detail-type\": \"Scheduled Event\",\n  \"source\": \"aws.events\",\n  \"time\": \"1970-01-01T00:00:00Z\",\n  \"id\": \"cdc73f9d-aea9-11e3-9d5a-835b769c0d9c\",\n  \"resources\": [\n    \"arn:aws:events:us-east-1:123456789012:rule/mymodule.myfunc\"\n  ]\n}\n```\n\nIf your function is also using the context, check out [mock](https://pypi.python.org/pypi/mock) for help building\nan artificial context object.\n"
  },
  {
    "path": "example/app.py",
    "content": "import logging\nfrom flask import Flask\n\napp = Flask(__name__)\nlogging.basicConfig()\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.DEBUG)\n\n@app.route('/', methods=['GET', 'POST'])\ndef lambda_handler(event=None, context=None):\n    logger.info('Lambda function invoked index()')\n\n    return 'Flask says Hello!!'\n\nif __name__ == '__main__':\n    app.run(debug=True)\n"
  },
  {
    "path": "example/authmodule.py",
    "content": "\"\"\"\nCopyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at\n     http://aws.amazon.com/apache2.0/\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\"\"\"\nimport re\nimport time\nimport pprint\nimport json\n\n\ndef lambda_handler(event, context):\n    print(\"Client token: \" + event['authorizationToken'])\n    print(\"Method ARN: \" + event['methodArn'])\n    \"\"\"validate the incoming token\"\"\"\n    \"\"\"and produce the principal user identifier associated with the token\"\"\"\n\n    \"\"\"this could be accomplished in a number of ways:\"\"\"\n    \"\"\"1. Call out to OAuth provider\"\"\"\n    \"\"\"2. Decode a JWT token inline\"\"\"\n    \"\"\"3. Lookup in a self-managed DB\"\"\"\n    principalId = \"user|a1b2c3d4\"\n\n    \"\"\"you can send a 401 Unauthorized response to the client by failing like so:\"\"\"\n    \"\"\"raise Exception('Unauthorized')\"\"\"\n\n    \"\"\"if the token is valid, a policy must be generated which will allow or deny access to the client\"\"\"\n\n    \"\"\"if access is denied, the client will receive a 403 Access Denied response\"\"\"\n    \"\"\"if access is allowed, API Gateway will proceed with the backend integration configured on the method that was called\"\"\"\n\n    \"\"\"this function must generate a policy that is associated with the recognized principal user identifier.\"\"\"\n    \"\"\"depending on your use case, you might store policies in a DB, or generate them on the fly\"\"\"\n\n    \"\"\"keep in mind, the policy is cached for 5 minutes by default (TTL is configurable in the authorizer)\"\"\"\n    \"\"\"and will apply to subsequent calls to any method/resource in the RestApi\"\"\"\n    \"\"\"made with the same token\"\"\"\n\n    \"\"\"the example policy below denies access to all resources in the RestApi\"\"\"\n    tmp = event['methodArn'].split(':')\n    apiGatewayArnTmp = tmp[5].split('/')\n    awsAccountId = tmp[4]\n\n    policy = AuthPolicy(principalId, awsAccountId)\n    policy.restApiId = apiGatewayArnTmp[0]\n    policy.region = tmp[3]\n    policy.stage = apiGatewayArnTmp[1]\n\n    # Blueprint denies all methods by default\n    # policy.denyAllMethods()\n\n    # Example allows all methods\n    policy.allowAllMethods()\n\n    \"\"\"policy.allowMethod(HttpVerb.GET, \"/pets/*\")\"\"\"\n\n    \"\"\"finally, build the policy and exit the function using return\"\"\"\n    return policy.build()\n\nclass HttpVerb:\n    GET     = \"GET\"\n    POST    = \"POST\"\n    PUT     = \"PUT\"\n    PATCH   = \"PATCH\"\n    HEAD    = \"HEAD\"\n    DELETE  = \"DELETE\"\n    OPTIONS = \"OPTIONS\"\n    ALL     = \"*\"\n\nclass AuthPolicy:\n    awsAccountId = \"\"\n    \"\"\"The AWS account id the policy will be generated for. This is used to create the method ARNs.\"\"\"\n    principalId = \"\"\n    \"\"\"The principal used for the policy, this should be a unique identifier for the end user.\"\"\"\n    version = \"2012-10-17\"\n    \"\"\"The policy version used for the evaluation. This should always be '2012-10-17'\"\"\"\n    pathRegex = r\"^[/.a-zA-Z0-9-\\*]+$\"\n    \"\"\"The regular expression used to validate resource paths for the policy\"\"\"\n\n    \"\"\"these are the internal lists of allowed and denied methods. These are lists\n    of objects and each object has 2 properties: A resource ARN and a nullable\n    conditions statement.\n    the build method processes these lists and generates the appropriate\n    statements for the final policy\"\"\"\n    allowMethods = []\n    denyMethods = []\n\n    restApiId = \"*\"\n    \"\"\"The API Gateway API id. By default this is set to '*'\"\"\"\n    region = \"*\"\n    \"\"\"The region where the API is deployed. By default this is set to '*'\"\"\"\n    stage = \"*\"\n    \"\"\"The name of the stage used in the policy. By default this is set to '*'\"\"\"\n\n    def __init__(self, principal, awsAccountId):\n        self.awsAccountId = awsAccountId\n        self.principalId = principal\n        self.allowMethods = []\n        self.denyMethods = []\n\n    def _addMethod(self, effect, verb, resource, conditions):\n        \"\"\"Adds a method to the internal lists of allowed or denied methods. Each object in\n        the internal list contains a resource ARN and a condition statement. The condition\n        statement can be null.\"\"\"\n        if verb != \"*\" and not hasattr(HttpVerb, verb):\n            raise NameError(\"Invalid HTTP verb \" + verb + \". Allowed verbs in HttpVerb class\")\n        resourcePattern = re.compile(self.pathRegex)\n        if not resourcePattern.match(resource):\n            raise NameError(\"Invalid resource path: \" + resource + \". Path should match \" + self.pathRegex)\n\n        if resource[:1] == \"/\":\n            resource = resource[1:]\n\n        resourceArn = (\"arn:aws:execute-api:\" +\n            self.region + \":\" +\n            self.awsAccountId + \":\" +\n            self.restApiId + \"/\" +\n            self.stage + \"/\" +\n            verb + \"/\" +\n            resource)\n\n        if effect.lower() == \"allow\":\n            self.allowMethods.append({\n                'resourceArn' : resourceArn,\n                'conditions' : conditions\n            })\n        elif effect.lower() == \"deny\":\n            self.denyMethods.append({\n                'resourceArn' : resourceArn,\n                'conditions' : conditions\n            })\n\n    def _getEmptyStatement(self, effect):\n        \"\"\"Returns an empty statement object prepopulated with the correct action and the\n        desired effect.\"\"\"\n        statement = {\n            'Action': 'execute-api:Invoke',\n            'Effect': effect[:1].upper() + effect[1:].lower(),\n            'Resource': []\n        }\n\n        return statement\n\n    def _getStatementForEffect(self, effect, methods):\n        \"\"\"This function loops over an array of objects containing a resourceArn and\n        conditions statement and generates the array of statements for the policy.\"\"\"\n        statements = []\n\n        if len(methods) > 0:\n            statement = self._getEmptyStatement(effect)\n\n            for curMethod in methods:\n                if curMethod['conditions'] is None or len(curMethod['conditions']) == 0:\n                    statement['Resource'].append(curMethod['resourceArn'])\n                else:\n                    conditionalStatement = self._getEmptyStatement(effect)\n                    conditionalStatement['Resource'].append(curMethod['resourceArn'])\n                    conditionalStatement['Condition'] = curMethod['conditions']\n                    statements.append(conditionalStatement)\n\n            statements.append(statement)\n\n        return statements\n\n    def allowAllMethods(self):\n        \"\"\"Adds a '*' allow to the policy to authorize access to all methods of an API\"\"\"\n        self._addMethod(\"Allow\", HttpVerb.ALL, \"*\", [])\n\n    def denyAllMethods(self):\n        \"\"\"Adds a '*' allow to the policy to deny access to all methods of an API\"\"\"\n        self._addMethod(\"Deny\", HttpVerb.ALL, \"*\", [])\n\n    def allowMethod(self, verb, resource):\n        \"\"\"Adds an API Gateway method (Http verb + Resource path) to the list of allowed\n        methods for the policy\"\"\"\n        self._addMethod(\"Allow\", verb, resource, [])\n\n    def denyMethod(self, verb, resource):\n        \"\"\"Adds an API Gateway method (Http verb + Resource path) to the list of denied\n        methods for the policy\"\"\"\n        self._addMethod(\"Deny\", verb, resource, [])\n\n    def allowMethodWithConditions(self, verb, resource, conditions):\n        \"\"\"Adds an API Gateway method (Http verb + Resource path) to the list of allowed\n        methods and includes a condition for the policy statement. More on AWS policy\n        conditions here: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition\"\"\"\n        self._addMethod(\"Allow\", verb, resource, conditions)\n\n    def denyMethodWithConditions(self, verb, resource, conditions):\n        \"\"\"Adds an API Gateway method (Http verb + Resource path) to the list of denied\n        methods and includes a condition for the policy statement. More on AWS policy\n        conditions here: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition\"\"\"\n        self._addMethod(\"Deny\", verb, resource, conditions)\n\n    def build(self):\n        \"\"\"Generates the policy document based on the internal lists of allowed and denied\n        conditions. This will generate a policy with two main statements for the effect:\n        one statement for Allow and one statement for Deny.\n        Methods that includes conditions will have their own statement in the policy.\"\"\"\n        if ((self.allowMethods is None or len(self.allowMethods) == 0) and\n            (self.denyMethods is None or len(self.denyMethods) == 0)):\n            raise NameError(\"No statements defined for the policy\")\n\n        policy = {\n            'principalId' : self.principalId,\n            'policyDocument' : {\n                'Version' : self.version,\n                'Statement' : []\n            }\n        }\n\n        policy['policyDocument']['Statement'].extend(self._getStatementForEffect(\"Allow\", self.allowMethods))\n        policy['policyDocument']['Statement'].extend(self._getStatementForEffect(\"Deny\", self.denyMethods))\n\n        return policy\n"
  },
  {
    "path": "example/mymodule.py",
    "content": "def myfunc():\n    print('Running my function in a schedule!')\n\n\ndef myfunc_with_events(event, context):\n    print('Event time was', event['time'])\n    print('This log is', context.log_group_name, context.log_stream_name)\n    print('Time left for execution:', context.get_remaining_time_in_millis())\n"
  },
  {
    "path": "example/policy/deploy.json",
    "content": "{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"RoleManager\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"iam:AttachRolePolicy\",\n                \"iam:CreateRole\",\n                \"iam:GetRole\",\n                \"iam:PutRolePolicy\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"RoleDelegation\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"iam:PassRole\"\n            ],\n            \"Resource\": [\n                \"arn:aws:iam::<account_id>:role/*-ZappaLambdaExecutionRole\"\n            ]\n        },\n        {\n            \"Sid\": \"Core\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"lambda:AddPermission\",\n                \"lambda:CreateFunction\",\n                \"lambda:DeleteFunction\",\n                \"lambda:GetFunction\",\n                \"lambda:GetFunctionConfiguration\",\n                \"lambda:GetPolicy\",\n                \"lambda:InvokeFunction\",\n                \"lambda:ListVersionsByFunction\",\n                \"lambda:RemovePermission\",\n                \"lambda:UpdateFunctionCode\",\n                \"lambda:UpdateFunctionConfiguration\",\n                \"cloudformation:CreateStack\",\n                \"cloudformation:DeleteStack\",\n                \"cloudformation:DescribeStackResource\",\n                \"cloudformation:DescribeStacks\",\n                \"cloudformation:ListStackResources\",\n                \"cloudformation:UpdateStack\",\n                \"logs:DescribeLogStreams\",\n                \"logs:DeleteLogGroup\",\n                \"logs:FilterLogEvents\",\n                \"s3:CreateBucket\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"CoreS3List\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:ListBucket\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::<s3_bucket from zappa_settings.json>\"\n            ]\n        },\n        {\n            \"Sid\": \"CoreS3Object\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:DeleteObject\",\n                \"s3:GetObject\",\n                \"s3:PutObject\",\n                \"s3:AbortMultipartUpload\",\n                \"s3:ListMultipartUploadParts\",\n                \"s3:ListBucketMultipartUploads\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::<s3_bucket from zappa_settings.json>/*\"\n            ]\n        },\n        {\n            \"Sid\": \"APIGateway\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"apigateway:OPTIONS\",\n                \"apigateway:DELETE\",\n                \"apigateway:GET\",\n                \"apigateway:PATCH\",\n                \"apigateway:POST\",\n                \"apigateway:PUT\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"Domain\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"route53:ListHostedZones\",\n                \"route53:ListResourceRecordSets\",\n                \"route53:ChangeResourceRecordSets\",\n                \"route53:GetHostedZone\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"Events\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"events:DeleteRule\",\n                \"events:DescribeRule\",\n                \"events:ListRules\",\n                \"events:ListTargetsByRule\",\n                \"events:ListRuleNamesByTarget\",\n                \"events:PutRule\",\n                \"events:PutTargets\",\n                \"events:RemoveTargets\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"SNS\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"SNS:ListSubscriptionsByTopic\",\n                \"SNS:Unsubscribe\",\n                \"SNS:Subscribe\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Sid\": \"VPCSecurity\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ec2:DescribeSecurityGroups\",\n                \"ec2:DescribeSubnets\",\n                \"ec2:DescribeVpcs\",\n                \"ec2:DescribeVpcsRequest\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        }\n    ]\n}\n"
  },
  {
    "path": "example/requirements.txt",
    "content": "Flask>=0.12\nzappa>=0.17.6\n"
  },
  {
    "path": "requirements.in",
    "content": "argcomplete\nboto3\ndurationpy\nhjson\njmespath\nkappa==0.6.0\npip>=9.0.1\npython-dateutil\npython-slugify\nPyYAML\nfuture\n# previous version don't work with urllib3 1.24\nrequests>=2.20.0\nsix\ntoml\ntqdm\ntroposphere\n# See https://github.com/Miserlou/Zappa/issues/2036\nWerkzeug<1.0\nwheel\nwsgi-request-logger\npip-tools"
  },
  {
    "path": "requirements.sh",
    "content": "#! /bin/bash\n\nset -e\n\nARGS=\"\"\nif [ \"$1\" == \"--upgrade\" ]; then\n    ARGS=\"-U\"\nfi\n\npip-compile ${ARGS} -o test_requirements.txt requirements.in test_requirements.in\ncp test_requirements.txt requirements.txt\npip-compile -o requirements.txt requirements.in\n"
  },
  {
    "path": "requirements.txt",
    "content": "#\n# This file is autogenerated by pip-compile\n# To update, run:\n#\n#    pip-compile --output-file=requirements.txt requirements.in\n#\nargcomplete==1.11.1       # via -r requirements.in (line 1)\nboto3==1.14.2             # via -r requirements.in (line 2), kappa\nbotocore==1.17.2          # via boto3, s3transfer\ncertifi==2020.4.5.2       # via requests\ncfn-flip==1.2.3           # via troposphere\nchardet==3.0.4            # via requests\nclick==7.1.2              # via cfn-flip, kappa, pip-tools\ndocutils==0.15.2          # via botocore\ndurationpy==0.5           # via -r requirements.in (line 3)\nfuture==0.18.2            # via -r requirements.in (line 11)\nhjson==3.0.1              # via -r requirements.in (line 4)\nidna==2.9                 # via requests\njmespath==0.10.0          # via -r requirements.in (line 5), boto3, botocore\nkappa==0.6.0              # via -r requirements.in (line 6)\npip-tools==5.2.1          # via -r requirements.in (line 22)\nplacebo==0.9.0            # via kappa\npython-dateutil==2.8.1    # via -r requirements.in (line 8), botocore\npython-slugify==4.0.0     # via -r requirements.in (line 9)\npyyaml==5.3.1             # via -r requirements.in (line 10), cfn-flip, kappa\nrequests==2.23.0          # via -r requirements.in (line 13)\ns3transfer==0.3.3         # via boto3\nsix==1.15.0               # via -r requirements.in (line 14), cfn-flip, pip-tools, python-dateutil\ntext-unidecode==1.3       # via python-slugify\ntoml==0.10.1              # via -r requirements.in (line 15)\ntqdm==4.46.1              # via -r requirements.in (line 16)\ntroposphere==2.6.1        # via -r requirements.in (line 17)\nurllib3==1.25.9           # via botocore, requests\nwerkzeug==0.16.1          # via -r requirements.in (line 19)\nwheel==0.34.2             # via -r requirements.in (line 20)\nwsgi-request-logger==0.4.6  # via -r requirements.in (line 21)\n\n# The following packages are considered to be unsafe in a requirements file:\n# pip\n"
  },
  {
    "path": "setup.py",
    "content": "import os\nimport sys\nfrom setuptools import setup\nfrom io import open\nfrom zappa import __version__\n\nwith open('README.md') as readme_file:\n    long_description = readme_file.read()\n\nwith open(os.path.join(os.path.dirname(__file__), 'requirements.in')) as f:\n    required = f.read().splitlines()\n\nwith open(os.path.join(os.path.dirname(__file__), 'test_requirements.in')) as f:\n    test_required = f.read().splitlines()\n\nsetup(\n    name='zappa',\n    version=__version__,\n    packages=['zappa'],\n    install_requires=required,\n    tests_require=test_required,\n    test_suite='nose.collector',\n    include_package_data=True,\n    license='MIT License',\n    description='Server-less Python Web Services for AWS Lambda and API Gateway',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/Miserlou/Zappa',\n    author='Rich Jones',\n    author_email='rich@openwatch.net',\n    entry_points={\n        'console_scripts': [\n            'zappa=zappa.cli:handle',\n            'z=zappa.cli:handle',\n        ]\n    },\n    classifiers=[\n        'Environment :: Console',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Framework :: Django',\n        'Framework :: Django :: 1.11',\n        'Framework :: Django :: 2.0',\n        'Framework :: Django :: 3.0',\n        'Topic :: Internet :: WWW/HTTP',\n        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',\n    ],\n)\n"
  },
  {
    "path": "test.sh",
    "content": "#! /bin/bash\nnosetests --with-coverage --cover-package=zappa\n\n# For a specific test:\n# nosetests tests.tests:TestZappa.test_lets_encrypt_sanity -s\n"
  },
  {
    "path": "test_requirements.in",
    "content": "coveralls\nDjango\nflake8\nFlask\nmock\nnose\nnose-timer\nplacebo\n\n"
  },
  {
    "path": "test_requirements.txt",
    "content": "#\n# This file is autogenerated by pip-compile\n# To update, run:\n#\n#    pip-compile --output-file=test_requirements.txt requirements.in test_requirements.in\n#\nargcomplete==1.11.1       # via -r requirements.in (line 1)\nasgiref==3.2.7            # via django\nboto3==1.14.2             # via -r requirements.in (line 2), kappa\nbotocore==1.17.2          # via boto3, s3transfer\ncertifi==2020.4.5.2       # via requests\ncfn-flip==1.2.3           # via troposphere\nchardet==3.0.4            # via requests\nclick==7.1.2              # via cfn-flip, flask, kappa, pip-tools\ncoverage==5.1             # via coveralls\ncoveralls==2.0.0          # via -r test_requirements.in (line 1)\ndjango==3.0.7             # via -r test_requirements.in (line 2)\ndocopt==0.6.2             # via coveralls\ndocutils==0.15.2          # via botocore\ndurationpy==0.5           # via -r requirements.in (line 3)\nflake8==3.8.3             # via -r test_requirements.in (line 3)\nflask==1.1.2              # via -r test_requirements.in (line 4)\nfuture==0.18.2            # via -r requirements.in (line 11)\nhjson==3.0.1              # via -r requirements.in (line 4)\nidna==2.9                 # via requests\nitsdangerous==1.1.0       # via flask\njinja2==2.11.2            # via flask\njmespath==0.10.0          # via -r requirements.in (line 5), boto3, botocore\nkappa==0.6.0              # via -r requirements.in (line 6)\nmarkupsafe==1.1.1         # via jinja2\nmccabe==0.6.1             # via flake8\nmock==4.0.2               # via -r test_requirements.in (line 5)\nnose-timer==1.0.0         # via -r test_requirements.in (line 7)\nnose==1.3.7               # via -r test_requirements.in (line 6), nose-timer\npip-tools==5.2.1          # via -r requirements.in (line 22)\nplacebo==0.9.0            # via -r test_requirements.in (line 8), kappa\npycodestyle==2.6.0        # via flake8\npyflakes==2.2.0           # via flake8\npython-dateutil==2.8.1    # via -r requirements.in (line 8), botocore\npython-slugify==4.0.0     # via -r requirements.in (line 9)\npytz==2020.1              # via django\npyyaml==5.3.1             # via -r requirements.in (line 10), cfn-flip, kappa\nrequests==2.23.0          # via -r requirements.in (line 13), coveralls\ns3transfer==0.3.3         # via boto3\nsix==1.15.0               # via -r requirements.in (line 14), cfn-flip, pip-tools, python-dateutil\nsqlparse==0.3.1           # via django\ntext-unidecode==1.3       # via python-slugify\ntoml==0.10.1              # via -r requirements.in (line 15)\ntqdm==4.46.1              # via -r requirements.in (line 16)\ntroposphere==2.6.1        # via -r requirements.in (line 17)\nurllib3==1.25.9           # via botocore, requests\nwerkzeug==0.16.1          # via -r requirements.in (line 19), flask\nwheel==0.34.2             # via -r requirements.in (line 20)\nwsgi-request-logger==0.4.6  # via -r requirements.in (line 21)\n\n# The following packages are considered to be unsafe in a requirements file:\n# pip\n"
  },
  {
    "path": "test_settings.json",
    "content": "{\n    \"ttt888\": {\n       \"touch\": false,\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"use_precompiled_packages\": false,\n       \"callbacks\": {\n           \"settings\": \"tests.test_app.callback\",\n           \"post\": \"tests.test_app.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n       \"prebuild_script\": \"tests.test_app.prebuild_me\",\n       \"environment_variables\": {\n           \"TEST_ENV_VAR\": \"test_value\"\n       },\n       \"context_header_mappings\": {\n           \"CognitoIdentityId\": \"identity.cognitoIdentityId\",\n           \"APIStage\": \"stage\"\n       },\n       \"events\": [\n           {\n               \"function\": \"tests.test_app.schedule_me\",\n               \"expression\": \"rate(1 minute)\"\n           },\n           {\n               \"function\": \"test.test_app.method\",\n               \"event_source\": {\n                   \"arn\": \"arn:aws:sns:::1\",\n                   \"events\": [\n                     \"sns:Publish\"\n                   ]\n               }\n           },\n           {\n               \"function\": \"test.test_app.method_filters\",\n               \"event_source\": {\n                   \"arn\": \"arn:aws:sns:::with-filters\",\n                   \"filters\": {\n                        \"interests\": [\"python\", \"aws\", \"zappa\"],\n                        \"version\": [\"1.0\"]\n                    },\n                   \"events\": [\n                     \"sns:Publish\"\n                   ]\n               }\n           }\n       ],\n       \"cognito\": {\n           \"user_pool\": \"user-pool-id\",\n           \"triggers\": [\n                {\"source\": \"PreSignUp_SignUp\",\n                 \"function\": \"test.tasks.pre_signup_function\"\n                }\n            ]\n      }\n    },\n    \"devor\": {\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [{\n          \"function\": \"tests.test_app.schedule_me\",\n          \"expression\": \"rate(1 minute)\"\n       }]\n    },\n    \"extendo\": {\n       \"extends\": \"ttt888\",\n       \"touch\": true,\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"environment_variables\": {\n          \"EXTENDO\": \"You bet\"\n       }\n    },\n    \"extendo2\": {\n       \"extends\": \"extendo\",\n       \"s3_bucket\": \"lmbda2\"\n    },\n    \"slim_handler\": {\n       \"extends\": \"ttt888\",\n       \"slim_handler\": true,\n       \"delete_local_zip\": true\n    },\n    \"deprecated_remote_env\": {\n       \"s3_bucket\": \"lmbda\",\n       \"remote_env_bucket\": \"lmbda-env\",\n       \"remote_env_file\": \"dev/env.json\"\n    },\n    \"remote_env\": {\n       \"s3_bucket\": \"lmbda\",\n       \"remote_env\": \"s3://lmbda-env/prod/env.json\"\n    },\n    \"extendofail\": {\n       \"extends\": \"failfail\",\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"environment_variables\": {\n          \"EXTENDO\": \"You bet\"\n       }\n    },\n    \"build_package_only_delete_local_zip_false\": {\n      \"delete_local_zip\": false,\n      \"use_precompiled_packages\": false,\n      \"delete_s3_zip\": false\n    },\n    \"build_package_only_delete_local_zip_true\": {\n      \"delete_local_zip\": true,\n      \"use_precompiled_packages\": false,\n      \"delete_s3_zip\": false\n    },\n    \"lambda_concurrency_enabled\": {\n        \"extends\": \"ttt888\",\n        \"lambda_concurrency\": 6\n     }\n}\n"
  },
  {
    "path": "test_settings.py",
    "content": "APP_MODULE = 'tests.test_app'\nAPP_FUNCTION = 'hello_world'\nDJANGO_SETTINGS = None\nDEBUG = 'True'\nLOG_LEVEL = 'DEBUG'\nSCRIPT_NAME = 'hello_world'\nDOMAIN = None\nAPI_STAGE = 'ttt888'\nPROJECT_NAME = 'ttt888'\n\nREMOTE_ENV='s3://lmbda/test_env.json'\n## test_env.json\n#{\n#    \"hello\": \"world\"\n#}\n#\n\nAWS_EVENT_MAPPING = {\n    'arn:aws:s3:1': 'test_settings.aws_s3_event',\n    'arn:aws:sns:1': 'test_settings.aws_sns_event',\n    'arn:aws:dynamodb:1': 'test_settings.aws_dynamodb_event',\n    'arn:aws:kinesis:1': 'test_settings.aws_kinesis_event',\n    'arn:aws:sqs:1': 'test_settings.aws_sqs_event'\n}\n\nENVIRONMENT_VARIABLES={'testenv': 'envtest'}\n\nAUTHORIZER_FUNCTION='test_settings.authorizer_event'\n\n\ndef prebuild_me():\n    print(\"This is a prebuild script!\")\n\n\ndef callback(self):\n    print(\"this is a callback\")\n\n\ndef aws_s3_event(event, content):\n    return \"AWS S3 EVENT\"\n\n\ndef aws_sns_event(event, content):\n    return \"AWS SNS EVENT\"\n\ndef aws_async_sns_event(arg1, arg2, arg3):\n    return \"AWS ASYNC SNS EVENT\"\n\n\ndef aws_dynamodb_event(event, content):\n    return \"AWS DYNAMODB EVENT\"\n\n\ndef aws_kinesis_event(event, content):\n    return \"AWS KINESIS EVENT\"\n\n\ndef aws_sqs_event(event, content):\n    return \"AWS SQS EVENT\"\n\n\ndef authorizer_event(event, content):\n    return \"AUTHORIZER_EVENT\"\n\n\ndef command():\n    print(\"command\")\n"
  },
  {
    "path": "tests/README.md",
    "content": "# Zappa Test Notes\n\nLook here!: https://github.com/garnaat/placebo#usage-as-a-decorator\n\nAlso useful - OSX sed replace example:\n\n`\nfind . -type f -name '*.json' -exec sed -i '' s/\"Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%3A%3A%2A%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect\"/\"Resource%22%3A%20%22arn%3Aaws%3Asqs%3A*%3A*%3A*%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect\"/ {} +\n`\n"
  },
  {
    "path": "tests/__init__.py",
    "content": ""
  },
  {
    "path": "tests/data/test1/this_dir_is_not_a_module.txt",
    "content": "# test1 is a directory without any .py files in it, so a __init__.py file should NOT be created in it\n\nInformation is not knowledge.\nKnowledge is not wisdom.\nWisdom is not truth.\nTruth is not beauty.\nBeauty is not love.\nLove is not music.\nMusic is THE BEST."
  },
  {
    "path": "tests/data/test1.py",
    "content": "\n# this is a module\n\n\ndef greet():\n    print('There is more stupidity than hydrogen in the universe, and it has a longer shelf life.')\n"
  },
  {
    "path": "tests/data/test2/test.py",
    "content": "\n# this is a module, so test2 should get an __init__.py\n\ndef get_some_wisdom():\n    return 'Art is making something out of nothing, and selling it.'"
  },
  {
    "path": "tests/name_scenarios.json",
    "content": "[\n  {\n    \"id\": \"integer\",\n    \"value\": 12,\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"float\",\n    \"value\": 3.1415,\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"list\",\n    \"value\": [\n      \"a\",\n      1,\n      null\n    ],\n    \"is_valid\": false\n  },\n  {\n    \"id\": null,\n    \"value\": null,\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"empty string\",\n    \"value\": \"\",\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"ok\",\n    \"value\": \"FrancoZappa\",\n    \"is_valid\": true\n  },\n  {\n    \"id\": \"with space\",\n    \"value\": \"Franco Zappa\",\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"one char\",\n    \"value\": \"A\",\n    \"is_valid\": true\n  },\n  {\n    \"id\": \"one digit\",\n    \"value\": \"5\",\n    \"is_valid\": true\n  },\n  {\n    \"id\": \"80 chars\",\n    \"value\": \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",\n    \"is_valid\": true\n  },\n  {\n    \"id\": \"81 chars\",\n    \"value\": \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzza\",\n    \"is_valid\": false\n  },\n  {\n    \"id\": \"bad_chars\",\n    \"value\": \"hi&bye\",\n    \"is_valid\": false\n  }\n]\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateApiKey_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"name\": \"test\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"e861edec-5901-11e6-8f63-a3652f6325da\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"e861edec-5901-11e6-8f63-a3652f6325da\", \n                \"date\": \"Tue, 02 Aug 2016 22:39:00 GMT\", \n                \"content-length\": \"148\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"createdDate\": {\n            \"hour\": 15, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 1, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 2, \n            \"minute\": 39\n        }, \n        \"lastUpdatedDate\": {\n            \"hour\": 15, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 1, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 2, \n            \"minute\": 39\n        }, \n        \"enabled\": true, \n        \"id\": \"mOebO1Q4uFa8NUGutxr833XZb3quSqa35yCRkRci\", \n        \"stageKeys\": []\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"id\": \"cahz60\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"8689874e-28f4-11e6-805d-312f5a261f21\"\n        }, \n        \"createdDate\": {\n            \"hour\": 15, \n            \"__class__\": \"datetime\", \n            \"month\": 6, \n            \"second\": 20, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 2, \n            \"minute\": 2\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_2.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"id\": \"szdwm0\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"976f3698-28f7-11e6-8233-6d2c402681cd\"\n        }, \n        \"createdDate\": {\n            \"hour\": 15, \n            \"__class__\": \"datetime\", \n            \"month\": 6, \n            \"second\": 15, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 2, \n            \"minute\": 24\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_3.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"id\": \"43p5hj\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"44700020-6a74-11e6-9e18-d13c6ce86685\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"44700020-6a74-11e6-9e18-d13c6ce86685\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:29 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 29, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 24, \n            \"minute\": 30\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}\", \n        \"pathPart\": \"{parameter_1}\", \n        \"id\": \"ndmj6n\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"5a09c6b7-28f4-11e6-b8f8-d1b42d374c32\"\n        }, \n        \"parentId\": \"6ahk6mn0bi\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_2.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}\", \n        \"pathPart\": \"{parameter_2}\", \n        \"id\": \"kbdbxf\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"608b4583-28f4-11e6-805d-312f5a261f21\"\n        }, \n        \"parentId\": \"ndmj6n\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_3.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}/{parameter_3}\", \n        \"pathPart\": \"{parameter_3}\", \n        \"id\": \"ozp3pf\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"663f1468-28f4-11e6-9152-ebe760f7884c\"\n        }, \n        \"parentId\": \"kbdbxf\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_4.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}\", \n        \"pathPart\": \"{parameter_4}\", \n        \"id\": \"hynkkf\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"6cdf3ecd-28f4-11e6-87ec-8f98a402daaf\"\n        }, \n        \"parentId\": \"ozp3pf\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_5.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}\", \n        \"pathPart\": \"{parameter_5}\", \n        \"id\": \"7rfu1h\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"7386e455-28f4-11e6-9152-ebe760f7884c\"\n        }, \n        \"parentId\": \"hynkkf\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_6.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}/{parameter_6}\", \n        \"pathPart\": \"{parameter_6}\", \n        \"id\": \"f97hp3\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"7a63547b-28f4-11e6-87ec-8f98a402daaf\"\n        }, \n        \"parentId\": \"7rfu1h\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_7.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}/{parameter_6}/{parameter_7}\", \n        \"pathPart\": \"{parameter_7}\", \n        \"id\": \"y78dak\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"8062abaa-28f4-11e6-b8f8-d1b42d374c32\"\n        }, \n        \"parentId\": \"f97hp3\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_8.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}\", \n        \"pathPart\": \"{parameter_1}\", \n        \"id\": \"lkkm6z\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"90702348-28f7-11e6-a01d-971fdfddbf7e\"\n        }, \n        \"parentId\": \"vw69yjtx3b\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_9.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"path\": \"/{parameter_1}\", \n        \"pathPart\": \"{parameter_1}\", \n        \"id\": \"z65qvb\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"3892e3ff-6a74-11e6-831b-43c278515a41\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"3892e3ff-6a74-11e6-831b-43c278515a41\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:07 GMT\", \n                \"content-length\": \"91\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"parentId\": \"hq4rr1cie4\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteApiKey_1.json",
    "content": "{\n  \"status_code\": 204,\n  \"data\": {\n    \"ResponseMetadata\": {\n      \"HTTPStatusCode\": 204,\n      \"RequestId\": \"db1a1c1c0-28f7-11e6-8db2-597c5c8eebes5\"\n    }\n  }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteRestApi_1.json",
    "content": "{\n    \"status_code\": 202, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 202, \n            \"RequestId\": \"af701457-28f7-11e6-a01d-971fdfddbf7e\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteRestApi_2.json",
    "content": "{\n    \"status_code\": 202, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 202, \n            \"RequestId\": \"a27ed33c-6a74-11e6-aaec-e994c773c0ae\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a27ed33c-6a74-11e6-aaec-e994c773c0ae\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:06 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetApiKeys_1.json",
    "content": "{\n  \"status_code\": 200,\n  \"data\": {\n    \"items\": [\n      {\n       \"id\": \"randomid\",\n       \"name\": \"iw5z0jpx0d\"\n      }\n    ]\n }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"path\": \"/\", \n                \"id\": \"6ahk6mn0bi\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"5494870d-28f4-11e6-87ec-8f98a402daaf\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"path\": \"/\", \n                \"id\": \"vw69yjtx3b\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8b7bad0d-28f7-11e6-8233-6d2c402681cd\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"path\": \"/\", \n                \"id\": \"hq4rr1cie4\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2d381708-6a74-11e6-831b-43c278515a41\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2d381708-6a74-11e6-831b-43c278515a41\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:48 GMT\", \n                \"content-length\": \"42\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApi_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"description\": \"Created automatically by Zappa.\", \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6c275db7-ef2b-11e6-a318-5fc3640c993c\", \n            \"HTTPHeaders\": {\n                \"date\": \"Fri, 10 Feb 2017 00:54:05 GMT\", \n                \"x-amzn-requestid\": \"6c275db7-ef2b-11e6-a318-5fc3640c993c\", \n                \"content-length\": \"145\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 2, \n            \"second\": 13, \n            \"microsecond\": 0, \n            \"year\": 2017, \n            \"day\": 9, \n            \"minute\": 24\n        }, \n        \"binaryMediaTypes\": [\n            \"*/*\"\n        ], \n        \"id\": \"9q10y8x8j9\", \n        \"name\": \"image-fly-test5\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApi_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"id\": \"9q10y8x8j9\", \n        \"name\": \"image-fly-test5\", \n        \"description\": \"Created automatically by Zappa.\", \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"79948f9c-ef2b-11e6-854a-99ec105212e0\", \n            \"HTTPHeaders\": {\n                \"date\": \"Fri, 10 Feb 2017 00:54:28 GMT\", \n                \"x-amzn-requestid\": \"79948f9c-ef2b-11e6-854a-99ec105212e0\", \n                \"content-length\": \"118\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 2, \n            \"second\": 13, \n            \"microsecond\": 0, \n            \"year\": 2017, \n            \"day\": 9, \n            \"minute\": 24\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"position\": \"aWQ9U2xraXVnNjhlazk%3D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"543aa6e1-28f4-11e6-805d-312f5a261f21\"\n        }, \n        \"items\": [\n            {\n                \"description\": \"serverless-imagehost-devuhhh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 41\n                }, \n                \"id\": \"0490ldmsmf\", \n                \"name\": \"serverless-imagehost-devuhhh\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 1\n                }, \n                \"id\": \"67urt9dyf3\", \n                \"name\": \"helloworld-beta\"\n            }, \n            {\n                \"description\": \"oort-dev3 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"id\": \"6nrpew3z4h\", \n                \"name\": \"oort-dev3\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 14\n                }, \n                \"id\": \"cc1o38ldtb\", \n                \"name\": \"serverless-imagehost-nob\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-devuh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"ezjhledye7\", \n                \"name\": \"serverless-imagehost-devuh\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"restful-demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 15, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 12\n                }, \n                \"id\": \"k6ox1w18i7\", \n                \"name\": \"restful-demo-dev\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"position\": \"aWQ9U2xraXVnNjhlazk%3D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"12bcd642-28f6-11e6-805d-312f5a261f21\"\n        }, \n        \"items\": [\n            {\n                \"description\": \"serverless-imagehost-devuhhh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 41\n                }, \n                \"id\": \"0490ldmsmf\", \n                \"name\": \"serverless-imagehost-devuhhh\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 1\n                }, \n                \"id\": \"67urt9dyf3\", \n                \"name\": \"helloworld-beta\"\n            }, \n            {\n                \"description\": \"oort-dev3 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"id\": \"6nrpew3z4h\", \n                \"name\": \"oort-dev3\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 14\n                }, \n                \"id\": \"cc1o38ldtb\", \n                \"name\": \"serverless-imagehost-nob\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-devuh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"ezjhledye7\", \n                \"name\": \"serverless-imagehost-devuh\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"restful-demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 15, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 12\n                }, \n                \"id\": \"k6ox1w18i7\", \n                \"name\": \"restful-demo-dev\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"position\": \"aWQ9U2xwaGZheGo4NGc%3D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8b2f39ee-28f7-11e6-a8d7-ffa4edbd5522\"\n        }, \n        \"items\": [\n            {\n                \"description\": \"serverless-imagehost-devuhhh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 41\n                }, \n                \"id\": \"0490ldmsmf\", \n                \"name\": \"serverless-imagehost-devuhhh\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 1\n                }, \n                \"id\": \"67urt9dyf3\", \n                \"name\": \"helloworld-beta\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 14\n                }, \n                \"id\": \"cc1o38ldtb\", \n                \"name\": \"serverless-imagehost-nob\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-devuh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"ezjhledye7\", \n                \"name\": \"serverless-imagehost-devuh\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"serverless-imagehost-devuhhh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 41\n                }, \n                \"id\": \"0490ldmsmf\", \n                \"name\": \"serverless-imagehost-devuhhh\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 1\n                }, \n                \"id\": \"67urt9dyf3\", \n                \"name\": \"helloworld-beta\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 14\n                }, \n                \"id\": \"cc1o38ldtb\", \n                \"name\": \"serverless-imagehost-nob\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-devuh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"ezjhledye7\", \n                \"name\": \"serverless-imagehost-devuh\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"zappa-ttt888 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 6, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 2, \n                    \"minute\": 23\n                }, \n                \"id\": \"iw5z0jpx0d\", \n                \"name\": \"zappa-ttt888\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"zappa-ttt666 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 6, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 2, \n                    \"minute\": 0\n                }, \n                \"id\": \"mj9gnteqc9\", \n                \"name\": \"zappa-ttt666\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 1, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"1453992953 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 55\n                }, \n                \"id\": \"tpwx2chyc9\", \n                \"name\": \"1453992953\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"af6602b8-28f7-11e6-8233-6d2c402681cd\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"position\": \"aWQ9U2xwaGZheGo4NGc%3D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2cafad23-6a74-11e6-831b-43c278515a41\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2cafad23-6a74-11e6-831b-43c278515a41\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:47 GMT\", \n                \"content-length\": \"2753\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"items\": [\n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 56\n                }, \n                \"id\": \"4sm404ad2j\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"zappa-slack-inviter-prod Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 41, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 54\n                }, \n                \"id\": \"9pi3dp8g4f\", \n                \"name\": \"zappa-slack-inviter-prod\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"baby-pyramid-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 20\n                }, \n                \"id\": \"css89s7off\", \n                \"name\": \"baby-pyramid-dev\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 56\n                }, \n                \"id\": \"4sm404ad2j\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"zappa-slack-inviter-prod Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 41, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 54\n                }, \n                \"id\": \"9pi3dp8g4f\", \n                \"name\": \"zappa-slack-inviter-prod\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"baby-pyramid-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 20\n                }, \n                \"id\": \"css89s7off\", \n                \"name\": \"baby-pyramid-dev\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"zappa-ttt888 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 48, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"jkib1pg4l1\", \n                \"name\": \"zappa-ttt888\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"659dce17-6a74-11e6-aaec-e994c773c0ae\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"659dce17-6a74-11e6-aaec-e994c773c0ae\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:23 GMT\", \n                \"content-length\": \"6217\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 56\n                }, \n                \"id\": \"4sm404ad2j\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"zappa-slack-inviter-prod Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 41, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 54\n                }, \n                \"id\": \"9pi3dp8g4f\", \n                \"name\": \"zappa-slack-inviter-prod\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"baby-pyramid-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 20\n                }, \n                \"id\": \"css89s7off\", \n                \"name\": \"baby-pyramid-dev\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"zappa-ttt888 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 48, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"jkib1pg4l1\", \n                \"name\": \"zappa-ttt888\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"684546ee-6a74-11e6-831b-43c278515a41\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"684546ee-6a74-11e6-831b-43c278515a41\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:27 GMT\", \n                \"content-length\": \"6217\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 56\n                }, \n                \"id\": \"4sm404ad2j\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"zappa-slack-inviter-prod Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 41, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 54\n                }, \n                \"id\": \"9pi3dp8g4f\", \n                \"name\": \"zappa-slack-inviter-prod\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"baby-pyramid-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 20\n                }, \n                \"id\": \"css89s7off\", \n                \"name\": \"baby-pyramid-dev\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"zappa-ttt888 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 48, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"jkib1pg4l1\", \n                \"name\": \"zappa-ttt888\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a227164b-6a74-11e6-aaec-e994c773c0ae\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a227164b-6a74-11e6-aaec-e994c773c0ae\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:05 GMT\", \n                \"content-length\": \"6217\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 56\n                }, \n                \"id\": \"4sm404ad2j\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"zappa-slack-inviter-prod Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 41, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 22, \n                    \"minute\": 54\n                }, \n                \"id\": \"9pi3dp8g4f\", \n                \"name\": \"zappa-slack-inviter-prod\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"baby-pyramid-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 23, \n                    \"minute\": 20\n                }, \n                \"id\": \"css89s7off\", \n                \"name\": \"baby-pyramid-dev\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"zappa-ttt888 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 48, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"jkib1pg4l1\", \n                \"name\": \"zappa-ttt888\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a269c4ec-6a74-11e6-9e18-d13c6ce86685\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a269c4ec-6a74-11e6-9e18-d13c6ce86685\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:05 GMT\", \n                \"content-length\": \"6217\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.GetStages_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"item\": [\n            {\n                \"stageName\": \"ttt888\", \n                \"cacheClusterSize\": \"0.5\", \n                \"variables\": {}, \n                \"cacheClusterEnabled\": false, \n                \"cacheClusterStatus\": \"NOT_AVAILABLE\", \n                \"deploymentId\": \"43p5hj\", \n                \"lastUpdatedDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 31\n                }, \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 29, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 30\n                }, \n                \"methodSettings\": {\n                    \"*/*\": {\n                        \"cacheTtlInSeconds\": 300, \n                        \"loggingLevel\": \"OFF\", \n                        \"dataTraceEnabled\": false, \n                        \"metricsEnabled\": false, \n                        \"unauthorizedCacheControlHeaderStrategy\": \"SUCCEED_WITH_RESPONSE_HEADER\", \n                        \"throttlingRateLimit\": 1000.0, \n                        \"cacheDataEncrypted\": false, \n                        \"cachingEnabled\": false, \n                        \"throttlingBurstLimit\": 2000, \n                        \"requireAuthorizationForCacheControl\": true\n                    }\n                }\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a23bfe5b-6a74-11e6-831b-43c278515a41\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a23bfe5b-6a74-11e6-831b-43c278515a41\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:05 GMT\", \n                \"content-length\": \"559\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateRestApi_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"id\": \"9q10y8x8j9\", \n        \"name\": \"image-fly-test5\", \n        \"description\": \"Created automatically by Zappa.\", \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6c33e026-ef2b-11e6-8557-cbcea87a07dc\", \n            \"HTTPHeaders\": {\n                \"date\": \"Fri, 10 Feb 2017 00:54:05 GMT\", \n                \"x-amzn-requestid\": \"6c33e026-ef2b-11e6-8557-cbcea87a07dc\", \n                \"content-length\": \"118\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 2, \n            \"second\": 13, \n            \"microsecond\": 0, \n            \"year\": 2017, \n            \"day\": 9, \n            \"minute\": 24\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_1.json",
    "content": "{\n  \"status_code\": 201,\n  \"data\": {\n    \"deploymentId\" : \"aioOASIHD1h\",\n    \"stageName\" : \"ttt888\",\n    \"description\" : \"Deployed by Zappa.\",\n    \"cacheClusterEnabled\" : false,\n    \"cacheClusterSize\" : \"1\",\n    \"cacheClusterStatus\" : \"AVAILABLE\",\n    \"methodSettings\" : {\n      \"String\" : {\n        \"metricsEnabled\" : false,\n        \"loggingLevel\" : \"OFF\",\n        \"dataTraceEnabled\" : false,\n        \"throttlingBurstLimit\" : 100,\n        \"throttlingRateLimit\" : 100,\n        \"cachingEnabled\" : false,\n        \"cacheTtlInSeconds\" : 100,\n        \"cacheDataEncrypted\" : false,\n        \"requireAuthorizationForCacheControl\" : false\n      }\n    },\n    \"variables\" : {\n    },\n    \"createdDate\" : \"2011-01-01T01:01:01Z+0000\",\n    \"lastUpdatedDate\" : \"2011-01-01T01:01:01Z+0000\"\n  }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"stageName\": \"ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"45629d34-6a74-11e6-aaec-e994c773c0ae\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"45629d34-6a74-11e6-aaec-e994c773c0ae\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:28 GMT\", \n                \"content-length\": \"548\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"cacheClusterSize\": \"0.5\", \n        \"variables\": {}, \n        \"cacheClusterEnabled\": false, \n        \"cacheClusterStatus\": \"NOT_AVAILABLE\", \n        \"deploymentId\": \"43p5hj\", \n        \"lastUpdatedDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 29, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 24, \n            \"minute\": 30\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 29, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 24, \n            \"minute\": 30\n        }, \n        \"methodSettings\": {\n            \"*/*\": {\n                \"cacheTtlInSeconds\": 300, \n                \"loggingLevel\": \"OFF\", \n                \"dataTraceEnabled\": false, \n                \"metricsEnabled\": false, \n                \"unauthorizedCacheControlHeaderStrategy\": \"SUCCEED_WITH_RESPONSE_HEADER\", \n                \"throttlingRateLimit\": 1000.0, \n                \"cacheDataEncrypted\": false, \n                \"cachingEnabled\": false, \n                \"throttlingBurstLimit\": 2000, \n                \"requireAuthorizationForCacheControl\": true\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"stageName\": \"ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"685acb8b-6a74-11e6-9e18-d13c6ce86685\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"685acb8b-6a74-11e6-9e18-d13c6ce86685\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:27 GMT\", \n                \"content-length\": \"548\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"cacheClusterSize\": \"0.5\", \n        \"variables\": {}, \n        \"cacheClusterEnabled\": false, \n        \"cacheClusterStatus\": \"NOT_AVAILABLE\", \n        \"deploymentId\": \"43p5hj\", \n        \"lastUpdatedDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 28, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 24, \n            \"minute\": 31\n        }, \n        \"createdDate\": {\n            \"hour\": 20, \n            \"__class__\": \"datetime\", \n            \"month\": 8, \n            \"second\": 29, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 24, \n            \"minute\": 30\n        }, \n        \"methodSettings\": {\n            \"*/*\": {\n                \"cacheTtlInSeconds\": 300, \n                \"loggingLevel\": \"OFF\", \n                \"dataTraceEnabled\": false, \n                \"metricsEnabled\": false, \n                \"unauthorizedCacheControlHeaderStrategy\": \"SUCCEED_WITH_RESPONSE_HEADER\", \n                \"throttlingRateLimit\": 1000.0, \n                \"cacheDataEncrypted\": false, \n                \"cachingEnabled\": false, \n                \"throttlingBurstLimit\": 2000, \n                \"requireAuthorizationForCacheControl\": true\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.CreateStack_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"081486b3-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"081486b3-7f76-11e6-b951-6975199b9748\", \n                \"date\": \"Tue, 20 Sep 2016 21:05:59 GMT\", \n                \"content-length\": \"382\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DeleteStack_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"3fd15252-7f76-11e6-9c9d-1d2b104a5cbc\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"3fd15252-7f76-11e6-9c9d-1d2b104a5cbc\", \n                \"date\": \"Tue, 20 Sep 2016 21:07:33 GMT\", \n                \"content-length\": \"212\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"StackResourceDetail\": {\n            \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n            \"ResourceStatus\": \"CREATE_COMPLETE\", \n            \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n            \"LastUpdatedTimestamp\": {\n                \"hour\": 21, \n                \"__class__\": \"datetime\", \n                \"month\": 9, \n                \"second\": 6, \n                \"microsecond\": 196000, \n                \"year\": 2016, \n                \"day\": 20, \n                \"minute\": 6\n            }, \n            \"StackName\": \"zappa-ttt888\", \n            \"PhysicalResourceId\": \"hekjfezvfl\", \n            \"Metadata\": \"{}\\n\", \n            \"LogicalResourceId\": \"Api\"\n        }, \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"218ce97d-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"218ce97d-7f76-11e6-b951-6975199b9748\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:42 GMT\", \n                \"content-length\": \"848\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"StackResourceDetail\": {\n            \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n            \"ResourceStatus\": \"CREATE_COMPLETE\", \n            \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n            \"LastUpdatedTimestamp\": {\n                \"hour\": 21, \n                \"__class__\": \"datetime\", \n                \"month\": 9, \n                \"second\": 6, \n                \"microsecond\": 196000, \n                \"year\": 2016, \n                \"day\": 20, \n                \"minute\": 6\n            }, \n            \"StackName\": \"zappa-ttt888\", \n            \"PhysicalResourceId\": \"hekjfezvfl\", \n            \"Metadata\": \"{}\\n\", \n            \"LogicalResourceId\": \"Api\"\n        }, \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"314bf9eb-7f76-11e6-adb1-97dc59990589\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"314bf9eb-7f76-11e6-adb1-97dc59990589\", \n                \"date\": \"Tue, 20 Sep 2016 21:07:08 GMT\", \n                \"content-length\": \"848\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"StackResourceDetail\": {\n            \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n            \"ResourceStatus\": \"CREATE_COMPLETE\", \n            \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n            \"LastUpdatedTimestamp\": {\n                \"hour\": 21, \n                \"__class__\": \"datetime\", \n                \"month\": 9, \n                \"second\": 6, \n                \"microsecond\": 196000, \n                \"year\": 2016, \n                \"day\": 20, \n                \"minute\": 6\n            }, \n            \"StackName\": \"zappa-ttt888\", \n            \"PhysicalResourceId\": \"hekjfezvfl\", \n            \"Metadata\": \"{}\\n\", \n            \"LogicalResourceId\": \"Api\"\n        }, \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"3fba6fee-7f76-11e6-9c9d-1d2b104a5cbc\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"3fba6fee-7f76-11e6-9c9d-1d2b104a5cbc\", \n                \"date\": \"Tue, 20 Sep 2016 21:07:33 GMT\", \n                \"content-length\": \"848\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_1.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"07f3de96-7f76-11e6-8ba2-2b306877d289\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"07f3de96-7f76-11e6-8ba2-2b306877d289\", \n                \"date\": \"Tue, 20 Sep 2016 21:05:59 GMT\", \n                \"content-length\": \"298\", \n                \"content-type\": \"text/xml\", \n                \"connection\": \"close\"\n            }\n        }, \n        \"Error\": {\n            \"Message\": \"Stack with id zappa-ttt888 does not exist\", \n            \"Code\": \"ValidationError\", \n            \"Type\": \"Sender\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1961b144-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1961b144-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:29 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1b45658e-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1b45658e-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:31 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1d2ac77f-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1d2ac77f-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:35 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_13.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1f12c188-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1f12c188-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:37 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_14.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_COMPLETE\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"20f84a95-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"20f84a95-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4245\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:41 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_15.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_COMPLETE\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"30d82959-7f76-11e6-9295-3308821d25df\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"30d82959-7f76-11e6-9295-3308821d25df\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4245\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:07:07 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_16.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n            \"Error\": {\"Code\": \"ValidationError\",\n            \"Message\": \"Stack with id zappa-ttt888 does not exist\",\n            \"Type\": \"Sender\"},\n            \"ResponseMetadata\": {\"HTTPHeaders\": {\"connection\": \"close\",\n                \"content-length\": \"298\",\n                \"content-type\": \"text/xml\",\n                \"date\": \"Tue, 20 Sep 2016 22:13:54 GMT\",\n                \"x-amzn-requestid\": \"853a18e4-7f7f-11e6-ab28-0d18db97cbd1\"},\n                \"HTTPStatusCode\": 400,\n                \"RequestId\": \"853a18e4-7f7f-11e6-ab28-0d18db97cbd1\"}\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0a3a9a2e-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0a3a9a2e-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:03 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0c229427-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0c229427-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:05 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0e0473ae-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0e0473ae-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:09 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0ff01736-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0ff01736-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:12 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"11d0e573-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"11d0e573-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:15 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"13b6205a-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"13b6205a-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:19 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"159a96f6-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"159a96f6-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:22 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Stacks\": [\n            {\n                \"StackId\": \"arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6\", \n                \"Description\": \"Automatically generated with Zappa\", \n                \"Parameters\": [\n                    {\n                        \"ParameterValue\": \"#set($rawPostData = $input.path(\\\"$\\\"))\\n{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"A\"\n                    }, \n                    {\n                        \"ParameterValue\": \"{\\n  \\\"body\\\" : \\\"$util.base64Encode($input.body)\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n\\n    #end\\n  }\\n}\", \n                        \"ParameterKey\": \"B\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Content-Type\", \n                        \"ParameterKey\": \"C\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Location\", \n                        \"ParameterKey\": \"D\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Status\", \n                        \"ParameterKey\": \"E\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.X-Frame-Options\", \n                        \"ParameterKey\": \"F\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.Set-Cookie\", \n                        \"ParameterKey\": \"G\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\", \n                        \"ParameterKey\": \"H\"\n                    }, \n                    {\n                        \"ParameterValue\": \"#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\\n$util.base64Decode($_body)\", \n                        \"ParameterKey\": \"I\"\n                    }, \n                    {\n                        \"ParameterValue\": \"integration.response.body.errorMessage\", \n                        \"ParameterKey\": \"J\"\n                    }\n                ], \n                \"Tags\": [\n                    {\n                        \"Value\": \"zappa-ttt888\", \n                        \"Key\": \"ZappaProject\"\n                    }\n                ], \n                \"CreationTime\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 0, \n                    \"microsecond\": 142000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"StackName\": \"zappa-ttt888\", \n                \"NotificationARNs\": [], \n                \"StackStatus\": \"CREATE_IN_PROGRESS\", \n                \"DisableRollback\": false\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"177e4b29-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"177e4b29-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"4248\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:25 GMT\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0a4d37d0-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0a4d37d0-7f76-11e6-b951-6975199b9748\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:03 GMT\", \n                \"content-length\": \"315\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"StackResourceSummaries\": []\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1b5236d0-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1b5236d0-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6331\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:31 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 23, \n                    \"microsecond\": 140000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1DIACCZRJR5BU\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 26, \n                    \"microsecond\": 766000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 29, \n                    \"microsecond\": 718000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 504000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 31, \n                    \"microsecond\": 167000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 383000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 27, \n                    \"microsecond\": 460000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1d38d143-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1d38d143-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6247\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:35 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1DIACCZRJR5BU\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 34, \n                    \"microsecond\": 939000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 26, \n                    \"microsecond\": 766000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 29, \n                    \"microsecond\": 718000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 504000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 31, \n                    \"microsecond\": 167000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 383000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 27, \n                    \"microsecond\": 460000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1f1e0c2d-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1f1e0c2d-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"5995\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:38 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1DIACCZRJR5BU\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 34, \n                    \"microsecond\": 939000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 26, \n                    \"microsecond\": 766000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 35, \n                    \"microsecond\": 279000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 29, \n                    \"microsecond\": 718000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 504000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 31, \n                    \"microsecond\": 167000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 35, \n                    \"microsecond\": 365000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 383000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 27, \n                    \"microsecond\": 460000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 36, \n                    \"microsecond\": 363000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0c2e53f9-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0c2e53f9-7f76-11e6-b951-6975199b9748\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:05 GMT\", \n                \"content-length\": \"683\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0e1081a1-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0e1081a1-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"2699\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:09 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 834000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 697000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 748000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 890000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 661000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 329000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0ffb3aca-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0ffb3aca-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"3063\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:12 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 834000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 161000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 748000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 9, \n                    \"microsecond\": 890000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 218000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"11dc7e37-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"11dc7e37-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6323\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:15 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 632000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 650000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 356000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 520000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 220000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 644000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 218000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"13c16afe-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"13c16afe-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6323\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:19 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 632000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 650000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 356000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 520000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 220000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 644000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 218000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"15a5ba88-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"15a5ba88-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6679\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:22 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 22, \n                    \"microsecond\": 364000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 632000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 40000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 356000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 520000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 220000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 644000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"17896ebb-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"17896ebb-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6835\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:25 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 23, \n                    \"microsecond\": 140000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1DIACCZRJR5BU\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 632000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 40000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 356000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 520000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 220000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 644000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"196cadc7-7f76-11e6-b951-6975199b9748\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"196cadc7-7f76-11e6-b951-6975199b9748\", \n                \"vary\": \"Accept-Encoding\", \n                \"content-length\": \"6499\", \n                \"content-type\": \"text/xml\", \n                \"date\": \"Tue, 20 Sep 2016 21:06:29 GMT\"\n            }\n        }, \n        \"StackResourceSummaries\": [\n            {\n                \"ResourceType\": \"AWS::ApiGateway::RestApi\", \n                \"PhysicalResourceId\": \"hekjfezvfl\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 6, \n                    \"microsecond\": 196000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Api\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 23, \n                    \"microsecond\": 140000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-DELET-1DIACCZRJR5BU\", \n                \"LogicalResourceId\": \"DELETE0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-DELET-1JK4SZOIK0707\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 26, \n                    \"microsecond\": 766000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"DELETE1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-GET0-1TC7D2726JX2T\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 8000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"GET0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 9000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-GET1-96GHNT9AFMME\", \n                \"LogicalResourceId\": \"GET1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 40000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-HEAD0-97FT504P6Q9K\", \n                \"LogicalResourceId\": \"HEAD0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-HEAD1-1DVREDZVQF491\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 504000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"HEAD1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-OPTIO-14ELHMS3EGLB1\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 631000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"OPTIONS0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 14, \n                    \"microsecond\": 520000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-OPTIO-1TD9GFGGTAQI9\", \n                \"LogicalResourceId\": \"OPTIONS1\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 873000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PATCH-1J45WIOLFVTU5\", \n                \"LogicalResourceId\": \"PATCH0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PATCH-12E8GBG6L5S4P\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 28, \n                    \"microsecond\": 383000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PATCH1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST0-TKUBVZLX28A7\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 15, \n                    \"microsecond\": 291000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST0\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-POST1-WVJLSEIQZY6H\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 27, \n                    \"microsecond\": 460000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"POST1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"PhysicalResourceId\": \"zappa-PUT0-1T3JX7U0FAPYQ\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 20, \n                    \"microsecond\": 248000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"PUT0\"\n            }, \n            {\n                \"ResourceStatus\": \"CREATE_IN_PROGRESS\", \n                \"ResourceType\": \"AWS::ApiGateway::Method\", \n                \"ResourceStatusReason\": \"Resource creation Initiated\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 13, \n                    \"microsecond\": 893000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"PhysicalResourceId\": \"zappa-PUT1-1QG4RKEWK5YVY\", \n                \"LogicalResourceId\": \"PUT1\"\n            }, \n            {\n                \"ResourceType\": \"AWS::ApiGateway::Resource\", \n                \"PhysicalResourceId\": \"7y1l9s\", \n                \"LastUpdatedTimestamp\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 9, \n                    \"second\": 10, \n                    \"microsecond\": 308000, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 6\n                }, \n                \"ResourceStatus\": \"CREATE_COMPLETE\", \n                \"LogicalResourceId\": \"Resource1\"\n            }\n        ]\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cloudformation.UpdateStack_1.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"30e82eed-7f76-11e6-9295-3308821d25df\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"30e82eed-7f76-11e6-9295-3308821d25df\", \n                \"date\": \"Tue, 20 Sep 2016 21:07:07 GMT\", \n                \"content-length\": \"288\", \n                \"content-type\": \"text/xml\", \n                \"connection\": \"close\"\n            }\n        }, \n        \"Error\": {\n            \"Message\": \"No updates are to be performed.\", \n            \"Code\": \"ValidationError\", \n            \"Type\": \"Sender\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cognito-idp.DescribeUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserPool\": {\n            \"Id\": \"us-east-1_9jUv74DH8\",\n            \"Name\": \"Zappa-Test\",\n            \"Policies\": {\n                \"PasswordPolicy\": {\n                    \"MinimumLength\": 8,\n                    \"RequireUppercase\": true,\n                    \"RequireLowercase\": true,\n                    \"RequireNumbers\": true,\n                    \"RequireSymbols\": true\n                }\n            },\n            \"LambdaConfig\": {\n                \"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n            },\n            \"LastModifiedDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 23,\n                \"second\": 34,\n                \"microsecond\": 969000\n            },\n            \"CreationDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 15,\n                \"second\": 36,\n                \"microsecond\": 195000\n            },\n            \"SchemaAttributes\": [\n                {\n                    \"Name\": \"sub\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": false,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"1\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"given_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"family_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"middle_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"nickname\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"preferred_username\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"profile\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"picture\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"website\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"gender\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"birthdate\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"10\",\n                        \"MaxLength\": \"10\"\n                    }\n                },\n                {\n                    \"Name\": \"zoneinfo\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"locale\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"address\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"updated_at\",\n                    \"AttributeDataType\": \"Number\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"NumberAttributeConstraints\": {\n                        \"MinValue\": \"0\"\n                    }\n                }\n            ],\n            \"AutoVerifiedAttributes\": [\n                \"email\"\n            ],\n            \"VerificationMessageTemplate\": {\n                \"DefaultEmailOption\": \"CONFIRM_WITH_CODE\"\n            },\n            \"MfaConfiguration\": \"OFF\",\n            \"EstimatedNumberOfUsers\": 0,\n            \"EmailConfiguration\": {},\n            \"UserPoolTags\": {},\n            \"AdminCreateUserConfig\": {\n                \"AllowAdminCreateUserOnly\": false,\n                \"UnusedAccountValidityDays\": 7\n            }\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:31 GMT\",\n                \"x-amzn-requestid\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n                \"content-length\": \"4132\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/cognito-idp.UpdateUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\",\n                \"x-amzn-requestid\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n                \"content-length\": \"2\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a391c043-28f7-11e6-b030-5b78d1137742\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b105f6f0-28f7-11e6-8bbf-b1fb71361919\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"66a81238-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"66a81238-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:24 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"670a080b-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"670a080b-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:25 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a061bfe1-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a061bfe1-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:01 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a099988f-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a099988f-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1d77053-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1d77053-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a20a8e32-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a20a8e32-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-keep-warm-zappa-ttt666\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_2.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-keep-warm-zappa-ttt888\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_3.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-keep-warm-zappa-ttt888\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_4.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_5.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-ttt888-tests.test_app.schedule_me\",\n            \"zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_6.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-ttt888-tests.test_app.schedule_me\",\n            \"zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_7.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [\n            \"zappa-ttt888-tests.test_app.schedule_me\",\n            \"zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\"\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_8.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"RuleNames\": [],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_1.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"53729c57-28f4-11e6-b918-078fb6d3b572\"\n        }, \n        \"Error\": {\n            \"Message\": \"Rule zappa-keep-warm-zappa-ttt666 does not exist.\", \n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id091815528307\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }, \n            {\n                \"Id\": \"Id238892486553\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a073e89a-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a073e89a-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:01 GMT\", \n                \"content-length\": \"197\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id854580722537\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1b73d85-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1b73d85-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"105\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id006403247915\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }, \n            {\n                \"Id\": \"Id418990627953\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }, \n            {\n                \"Id\": \"Id765326959363\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1e7ea75-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1e7ea75-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"289\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"5010\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"afd8efac-28f4-11e6-8544-73f7fd03d944\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_3.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"11fb334c-28f6-11e6-a522-b91d7ab8623c\"\n        }, \n        \"Error\": {\n            \"Message\": \"Rule zappa-keep-warm-zappa-ttt777 does not exist.\", \n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_4.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"8994c3fa-28f7-11e6-af9c-c96fcfc9a8ce\"\n        }, \n        \"Error\": {\n            \"Message\": \"Rule zappa-keep-warm-zappa-ttt888 does not exist.\", \n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"5016\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a37f230a-28f7-11e6-af9c-c96fcfc9a8ce\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"5124\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b0e1f4a9-28f7-11e6-81bf-2d60e05ac7fd\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id756017120335\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6675de5a-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"6675de5a-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:24 GMT\", \n                \"content-length\": \"105\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id249251389162\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"66d6276a-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"66d6276a-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:25 GMT\", \n                \"content-length\": \"105\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Targets\": [\n            {\n                \"Id\": \"Id656622160450\", \n                \"Arn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a0413ff8-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a0413ff8-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:01 GMT\", \n                \"content-length\": \"105\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"5384eb91-28f4-11e6-a567-41a2fedb6435\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6803aa43-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"6803aa43-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a0ab9a29-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a0ab9a29-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"content-length\": \"96\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a0f748e8-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a0f748e8-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_13.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1314583-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1314583-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_14.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a164b18e-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a164b18e-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b009279e-28f4-11e6-a04e-f7cf2cf61140\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt777\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"1210693a-28f6-11e6-99b2-03de7e10bcbf\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"89e6187a-28f7-11e6-b77e-d3bc5df75ed1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a3a7b9c4-28f7-11e6-aca4-1fb2cb248ecc\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2b750b13-6a74-11e6-945c-0b1ddee71d5d\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2b750b13-6a74-11e6-945c-0b1ddee71d5d\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:45 GMT\", \n                \"content-length\": \"96\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2bbf0bba-6a74-11e6-945c-0b1ddee71d5d\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2bbf0bba-6a74-11e6-945c-0b1ddee71d5d\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:46 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6724e341-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"6724e341-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:25 GMT\", \n                \"content-length\": \"96\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutRule_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RuleArn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"67a0c9c6-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"67a0c9c6-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"content-length\": \"112\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"53d666ee-28f4-11e6-8df8-379210332ed2\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6831716b-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"6831716b-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:27 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a0e2b047-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a0e2b047-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1205550-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1205550-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_13.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a152afd9-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a152afd9-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_14.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1853154-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1853154-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b037b20c-28f4-11e6-a04e-f7cf2cf61140\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"124b76d2-28f6-11e6-af9c-c96fcfc9a8ce\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8a4af54b-28f7-11e6-8f47-37e43b6a5f7e\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a3d72e36-28f7-11e6-af9c-c96fcfc9a8ce\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2ba960ba-6a74-11e6-945c-0b1ddee71d5d\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2ba960ba-6a74-11e6-945c-0b1ddee71d5d\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:45 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2c0ba5bb-6a74-11e6-945c-0b1ddee71d5d\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"2c0ba5bb-6a74-11e6-945c-0b1ddee71d5d\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:46 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"6789bf2d-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"6789bf2d-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.PutTargets_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"67d5bcf7-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"67d5bcf7-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"afe0431b-28f4-11e6-b5de-4da2458e6f30\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a384c86f-28f7-11e6-af9c-c96fcfc9a8ce\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b0ea5868-28f7-11e6-80e7-290fa8f4f236\"\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"668f8104-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"668f8104-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:24 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"66f128aa-6a74-11e6-b1df-6905c3c8daa6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"66f128aa-6a74-11e6-b1df-6905c3c8daa6\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:25 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a05192fa-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a05192fa-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:01 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a0865f69-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a0865f69-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1c7b88c-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1c7b88c-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"FailedEntries\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1f7c927-6a74-11e6-a237-bb13171f213e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a1f7c927-6a74-11e6-a237-bb13171f213e\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"41\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"FailedEntryCount\": 0\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0D%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%0D%0A%20%20%20%20%22Statement%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%5D%0D%0A%7D\",\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0ef3ada5-6a74-11e6-94a8-7fe6b973411e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0ef3ada5-6a74-11e6-94a8-7fe6b973411e\", \n                \"date\": \"Thu, 25 Aug 2016 03:28:57 GMT\", \n                \"content-length\": \"3773\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"48920b7e-6a74-11e6-90df-c50dd5221118\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"48920b7e-6a74-11e6-90df-c50dd5221118\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:34 GMT\", \n                \"content-length\": \"3773\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%20%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kinesis%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Akinesis%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sns%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asns%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A%2A%3A%2A%3A%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%2C%20%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTraceSegments%22%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22xray%3APutTelemetryRecords%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81a584b4-28f7-11e6-8296-0db40e88750e\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"4d88be55-28f3-11e6-b455-b3e4bc23726a\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"99cb75ea-28f7-11e6-8296-0db40e88750e\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0ede77c9-6a74-11e6-94a8-7fe6b973411e\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0ede77c9-6a74-11e6-94a8-7fe6b973411e\", \n                \"date\": \"Thu, 25 Aug 2016 03:28:57 GMT\", \n                \"content-length\": \"844\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%2C%22lambda.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"482825c1-6a74-11e6-90df-c50dd5221118\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"482825c1-6a74-11e6-90df-c50dd5221118\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:33 GMT\", \n                \"content-length\": \"844\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2cbf61f6-28f4-11e6-a120-7113b0af4e40\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8ad450a4-28f4-11e6-8f14-4d8f80324ce8\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"c1d4b527-28f5-11e6-9d76-fbfa24d3c2ae\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"eed2a711-28f5-11e6-8296-0db40e88750e\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"baaaa444-28f6-11e6-967a-8b57d96c38fa\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"d7d22c50-28f6-11e6-b455-b3e4bc23726a\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22apigateway.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22events.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"50d3f5b4-28f7-11e6-b791-1dff148dc09d\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.GetRole_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22events.amazonaws.com%22%2C%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"81802243-28f7-11e6-8296-0db40e88750e\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/iam.PutRolePolicy_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"4b4ef6f8-8245-11e7-ae54-834f84ed42ff\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"4b4ef6f8-8245-11e7-ae54-834f84ed42ff\", \n                \"date\": \"Wed, 16 Aug 2017 05:39:38 GMT\", \n                \"content-length\": \"206\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae983eab-d365-11e7-ba13-8135763ed363\",\n            \"HTTPStatusCode\": 201,\n            \"HTTPHeaders\": {\n                \"date\": \"Mon, 27 Nov 2017 11:25:33 GMT\",\n                \"content-type\": \"application/json\",\n                \"content-length\": \"361\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"ae983eab-d365-11e7-ba13-8135763ed363\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"Statement\": \"{\\\"Sid\\\":\\\"9UFS02MW\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"cognito-idp.amazonaws.com\\\"},\\\"Action\\\":\\\"lambda:InvokeFunction\\\",\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\\\",\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:cognito-idp:us-east-1:12345:userpool/us-east-1_9jUv74DH8\\\"}}}\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_10.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"SHT7F5TS\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"681d9abb-6a74-11e6-8483-ad8555bfc90e\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:27 GMT\", \n                \"x-amzn-requestid\": \"681d9abb-6a74-11e6-8483-ad8555bfc90e\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_11.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"UQVB3BGF\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"a0d0fc2e-6a74-11e6-954f-91387b9177fe\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"x-amzn-requestid\": \"a0d0fc2e-6a74-11e6-954f-91387b9177fe\", \n                \"content-length\": \"363\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_12.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"WHOAAU7W\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"a10b94e1-6a74-11e6-b979-d738397cab13\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:02 GMT\", \n                \"x-amzn-requestid\": \"a10b94e1-6a74-11e6-b979-d738397cab13\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_13.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"0D59E6S3\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"a1414a73-6a74-11e6-9346-db4e16abbc55\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"x-amzn-requestid\": \"a1414a73-6a74-11e6-9346-db4e16abbc55\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_14.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"RK9ORZQ5\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"a1749012-6a74-11e6-b65f-c5206d4f8203\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"x-amzn-requestid\": \"a1749012-6a74-11e6-b65f-c5206d4f8203\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_2.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"FTWBBQHW\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"b02e14cf-28f4-11e6-9dd8-4b08e3c52023\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_3.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt777\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt777\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"H2EM5KDC\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"12442376-28f6-11e6-b81e-f9a73f6721a8\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_4.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"WZ91XUD1\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"8a323d39-28f7-11e6-8116-01b0f23dfa05\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_5.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"9BOLBRUK\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"a3cea27d-28f7-11e6-9ef0-2d25b6dbc6b7\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_6.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"9LTNB0L6\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"2b9738e5-6a74-11e6-b885-3d75db80b5c5\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:29:45 GMT\", \n                \"x-amzn-requestid\": \"2b9738e5-6a74-11e6-b885-3d75db80b5c5\", \n                \"content-length\": \"363\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_7.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"H5GBSCQ1\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"2be66a1e-6a74-11e6-aa2e-e9ecfa4b7177\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:29:46 GMT\", \n                \"x-amzn-requestid\": \"2be66a1e-6a74-11e6-aa2e-e9ecfa4b7177\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_8.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"EQHY0KON\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"676aed34-6a74-11e6-92f5-8d9fb7451a83\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"x-amzn-requestid\": \"676aed34-6a74-11e6-92f5-8d9fb7451a83\", \n                \"content-length\": \"363\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_9.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"Statement\": \"{\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback\\\"}},\\\"Action\\\":[\\\"lambda:InvokeFunction\\\"],\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"events.amazonaws.com\\\"},\\\"Sid\\\":\\\"CP8FF9KR\\\"}\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"67bc19e9-6a74-11e6-a060-3bf8dcc72e5f\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:26 GMT\", \n                \"x-amzn-requestid\": \"67bc19e9-6a74-11e6-a060-3bf8dcc72e5f\", \n                \"content-length\": \"379\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"cWF57Szks5dHvRXo5yI6Ob0OPhD8TFF8IsmuTeM3vko=\", \n        \"FunctionName\": \"zappa-ttt666\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"4cd2e719-28f4-11e6-9c21-ed419ebd424c\"\n        }, \n        \"CodeSize\": 53011393, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:00:43.958+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_2.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"oFEMiO1TSJVVYkVC0PGJM8xN6NWFY37lVfImtmIbL+s=\", \n        \"FunctionName\": \"zappa-ttt777\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"0d8e15ce-28f6-11e6-aa0c-7b10ed279857\"\n        }, \n        \"CodeSize\": 52694037, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt777\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:13:16.029+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_3.json",
    "content": "{\n    \"status_code\": 409, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 409, \n            \"RequestId\": \"57205ad3-28f7-11e6-b9d3-61f7d33459a1\"\n        }, \n        \"Error\": {\n            \"Message\": \"Function already exist: zappa-ttt777\", \n            \"Code\": \"ResourceConflictException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_4.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"87d0a68e-28f7-11e6-9c83-511af597005a\"\n        }, \n        \"CodeSize\": 8311340, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:23:48.902+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_5.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"26ec757d-6a74-11e6-b534-e9ce29846b3c\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:29:44 GMT\", \n                \"x-amzn-requestid\": \"26ec757d-6a74-11e6-b534-e9ce29846b3c\", \n                \"content-length\": \"502\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"CodeSize\": 34119501, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n        \"Version\": \"4\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-08-25T03:29:40.612+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunctionConcurrency_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunction_1.json",
    "content": "{\n    \"status_code\": 204, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"RequestId\": \"b1a1c1c0-28f7-11e6-8db2-597c5c8eebe5\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunction_2.json",
    "content": "{\n    \"status_code\": 204, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"RequestId\": \"a35f4884-6a74-11e6-9c66-eba57f539c2b\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:06 GMT\", \n                \"x-amzn-requestid\": \"a35f4884-6a74-11e6-9c66-eba57f539c2b\", \n                \"connection\": \"keep-alive\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetAlias_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunctionConfiguration_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"8cd3e440-6d74-11e7-9ebd-693a5cc9b121\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/json\",\n                \"date\": \"Thu, 20 Jul 2017 17:54:59 GMT\",\n                \"x-amzn-requestid\": \"8cd3e440-6d74-11e7-9ebd-693a5cc9b121\",\n                \"content-length\": \"609\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"FunctionName\": \"zappa-ttt888\",\n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:004396165043:function:zappa-ttt888\",\n        \"Runtime\": \"python3.6\",\n        \"Role\": \"arn:aws:iam::004396165043:role/zappa-ttt888-ZappaLambdaExecutionRole\",\n        \"Handler\": \"handler.lambda_handler\",\n        \"CodeSize\": 16975308,\n        \"Description\": \"Zappa Deployment\",\n        \"Timeout\": 30,\n        \"MemorySize\": 512,\n        \"LastModified\": \"2017-07-20T17:54:59.235+0000\",\n        \"CodeSha256\": \"0pOcmP7sDoO6mLbZKmtH5z0XyjT8wuu/1VenHLgu/MU=\",\n        \"Version\": \"$LATEST\",\n        \"Environment\": {\n            \"Variables\": {}\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt666-5ed077d0-c7ba-4829-ba3b-8e754db50805?x-amz-security-token=FQoDYXdzEEwaDL%2F%2BRmBN9KhhTw%2F4hSK0Az%2BGrbKvCCc%2F%2Fu9lIRorMkGSvGZAr1L2%2BVCTLEiX2bIA3PSAX4l9mMjNPjxve65KkuT1NsOqIb%2FdmIdLhJwhXA8J2a1JrhAHWAS4euuM0qob88W0kXaMTpPg1ptoZRaDm1kuL077DplfFIPs5JSJb95PK0j%2BieWkW5MgPqbGAXFU3y1Yxej4Yj3Sx9E9UoaXmoEtbIeOpJO0jKmCe%2FI84cwJ6CunXkcUruS7HzbyouG8Sm2SDIk1ynipnuPYydPvCqCSBjJL5Tw6RmMJ%2FXf7%2FofDS6GdD%2BPPrFhMrOY%2FISV%2F6beNlSj%2FK6lKGtPSBhhCIDxLyOJZV%2BuF%2FwpxOTUa9mi5amlSTI4uyBCJGT0AymKs9%2FGXct381%2F9cYp7iLJvlGvByEwomPFq3IGLE%2BBhS4qeqN%2BUps%2FxhHgdBDKFovO7ylixVulBs%2BVRDVVwJDSknXnNj4iSnWRMuSMwWQqEQc53njnM3%2FdAApJKutmwFMk9n8l8cFrSfwBygzMC%2BT5fVS5zBMwAb0Qm8lsOrc%2FRLm3J4TY6AY9jc%2Bm84GLEXRvv9yAtsZuQbzsojbgQnbXUxehz5gK0o8vPBugU%3D&AWSAccessKeyId=ASIAIQ2YOTOLV53PKP3Q&Expires=1464894808&Signature=peE6nnByqX6b3zriUgYlTjxxvtA%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"1\", \n            \"CodeSha256\": \"cWF57Szks5dHvRXo5yI6Ob0OPhD8TFF8IsmuTeM3vko=\", \n            \"FunctionName\": \"zappa-ttt666\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 53011393, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666:1\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-06-02T19:00:43.958+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b0c042d3-28f4-11e6-be90-6dca90616b3e\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-ef373459-e2b9-4519-94d3-f1998bd796f1?x-amz-security-token=FQoDYXdzEEsaDNFzs2HYUQm1%2BwJcHyK0A9oTLyn6u3U1q%2BjcOxrB2kF2Gha9Vpjpcp0wb02djylFBu5GjKFNlmkBS09fB5sFF%2F%2BzwufGwltEli4X2lJjz%2BhOrsTGXLHt0nDI6FKrnVMxUhOviwBzE9%2B75hAuABJDjStqJ%2Bl1dYmcYlbzeKuTie2VAnhmenrR2xBf8g8tu1vQYWNC3paPjybbBb0gLKskKwNPpU7bCSEFp1hBXqX5iOXIvEbWy4RjA1BAq6WsLwoRpWeob86mu%2FZp8cZa%2BggS9xvl2QJywMHHdc48UNRj5CicPocMjSe7dPZLYiXhWWzFJl4ggkvBMNHJkBxyH2LHk5XXY3dyO3dmyt6OLRph08Z2eicAv1M6hVxg08mauyOlJMB3X0EfYDpI2V7o4rgXhDj57H5a49Nqrz4YSVE6AbxNmKH5KbJIg%2FdA7%2FhZhe7KMEtPpvZOd4SlWNzDbOC%2FxGvyhRZ%2B7hLV1goJlwK0OtBC03F0ttJ0VDHDQVscvg9OqS4unFStJ4xUbwia5T6q%2B0kJuCZVWlsVDfzhCaBkyIGBinTy23SctTB4KeQceAQZvk3LlZFIWy%2FzGosRVJ2NXvKhwjUo9vHBugU%3D&AWSAccessKeyId=ASIAIYMYK3GZ4OBV663Q&Expires=1464896076&Signature=EGH22BneoRTYD4iKGa0guH9D99M%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"1\", \n            \"CodeSha256\": \"8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 8311340, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-06-02T19:23:48.902+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a4a838ef-28f7-11e6-b71d-85d581e5b915\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-db31118d-0fdc-42a1-9014-70c08bd08a09?x-amz-security-token=FQoDYXdzEJz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDJ3nTVvWKW4soAwQ4iK3AwnuaHkjRUcGm5S0yWxwHXe1b2DX1nWoP3Vvant62mEvzPeg5EjdL%2FdZAR%2FQxCUruyCQN%2BkHOWcA2Ene1fRRo7N97kuSDVxCjsLAri0xBnhjn6TJRqAjZ3JGgHtpbNcY9Cy5vVgVrREMP5X32Z0z5Kl8KHnILTqRciupvIzOKEcsdFpR7bspTMMeVWItbNiIE2BdsKfLZFegZ2MuVnMXPPE9l2Q2LFugO9SZFuxSv6eZc2l9gB%2FPS4452i2KoKIJ%2BA%2FNMBn7Qx%2BIvFGD2Zo1m0JdhhJJ3Do1sa4OCB%2FQDUOB%2FHPMPRBLVdBTeqBHUyznHk7McSCye53RX2jtX3J0RnDgml98dBiD4P8CIeFzm6ak9URMAXKCNkB5bgJBu4lfldm0%2Bohjo0EQf9WcdeZ8rdfjBxGWnu81YU%2FxUKjyWzerTwPaYEe6VFDo6u05nAz0Wh1bN52Bbms%2FbpYC1AYk%2B8cuTon4e2F62TJQ4B2Je6ww7KsyqlsrqTwKzL%2FnNwkiy%2Fsrz8WXsBANtVwaGZqKTt%2BW41rVSv%2FMbg1nof77EpbhAOhqtpX1pFVPhwC9JlCElNcI6shxjYAomrL5vQU%3D&AWSAccessKeyId=ASIAIFVY3TIJOTWTCXQA&Expires=1472096384&Signature=5fFXOXrM5FQ4N8SlIR4GC2DZl1Q%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34119501, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:29:40.612+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2abcddc1-6a74-11e6-92cb-fd2bf2ec2010\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:29:43 GMT\", \n                \"x-amzn-requestid\": \"2abcddc1-6a74-11e6-92cb-fd2bf2ec2010\", \n                \"content-length\": \"1501\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-9bb0789d-615b-48c7-87a0-9c210d0ceb82?x-amz-security-token=FQoDYXdzEJz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDJg3XIOe9RH06LQqfiK3A2yFIkcVCqmFYjzGTnkcuWwQhOUhyDE2um98JQQrGqCb5INiSTDxZVBEKM%2BiCn8WQg6ELfpgBpQ3EqlP8j5kBZTk%2BQjnc6p2JrmvrmTba%2Fti26EGi%2FBn1jwlwydTJrrjOgNAJv7m5WP8%2FU%2BT4XgUaf1d7bYhiTQy02d7SrgbycrKWOyYmP5mphwhKYL9w1pKd65A3Kw%2Ft4I5Qw2rGA8EOHPqk0l%2BJjJT0P29%2BVM%2BUKfVb9oEsZQcZmSHANAgTioy3OaiQVtHiaO69zFZS%2F8VWfvI2jiUkVraax4dAR9R7bwjCIJrQeP0T9VSQPmvZqguVX0GdcMKZAOvtKf44EUAQdJ7rz3vKFGJo%2BQbRbM4aqRsmGk8hBxUm0GXxb%2B4tX0EMPx58TxMPGX4UnjsyP5QlNc5O6yrFzCkiWVPeGAXsvlZV5Dsy0a1qDsrfAxBkN9C1sEbxVUqoCy6Lye7GxhVTjshrUrze97dmp24GMXhwUh9Hv84mH%2FSaN4o1L%2FBcXGOfqCSoKx1ZJwvVKDZqB1HIiMmp592vNoXmR144HuMofeSsE7N1qHBuMLnkYCAxNZniX0L1%2BT%2BAcoot8L5vQU%3D&AWSAccessKeyId=ASIAI5VEVZGEWFHMOVWQ&Expires=1472096483&Signature=%2BCd8eErPQJJgrl5grkqb7Gem%2FnE%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34293478, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:31:23.343+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"65ca5ca5-6a74-11e6-8fbb-53ef6e599bed\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:23 GMT\", \n                \"x-amzn-requestid\": \"65ca5ca5-6a74-11e6-8fbb-53ef6e599bed\", \n                \"content-length\": \"1505\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-c2503000-ec0b-4d51-ac5b-9a708b62e9c2?x-amz-security-token=FQoDYXdzEJz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGltMtQEdG7%2FQybqtSK3AzojhGTsmaH7E%2FFWhbCn1acHdhBCixkmhUPH8Yu85QePAwCp4HAkJj0hMHR9Tjd0o0LtWrpm47jFUU9Aqdi1tyFguHBzung8AzJ7KfvKMqj4A%2FJAYgwLeiy%2BTuxGjrwXU4hjOkL%2B2NUmw27IrcN9kX6stK%2BzUHn7d3xMKlvdfGfGcP53AmkNx87WcsyE3GF4HC5cy1s%2B75paLsywVMK02Zka8YSYs2%2B%2B%2Bs6gIXFZ8WjMhGtzpTvIOsq%2Fej8OsNFBFFrmPk91hCclsSa4hTOTEIMjNrtcaIbx8ySAV3pN8OXE82ZaaONQVpRRDxmON2bxYztsg1aNHzP7RicKK3RbVWGFJsT2ZYholSAUznptcXRd1Y7KqkTrZukTheWpakBZ9hmQiEjOJmQBNAGZGSNgeeS3h2GJP1Wox3UBV8bS5oAHa%2FGMFVl%2B85X%2B4vPLdoKWJO7%2FRa3T5eie6OQJWUfRy3KJNmZD8nCUZ%2FmdSQgT%2B3K%2Bc5GJFvqY%2Bmn8RV3wE%2Fz6Q%2FjloxD%2B0btLOTfX76%2BK799M1e4ifv1%2FrwAUnr393crdjE7pnwM4PqQ8%2FzqBQcwi5H%2BYy2alcAIopa%2F5vQU%3D&AWSAccessKeyId=ASIAJL7FKN53NCZ5ESOQ&Expires=1472096488&Signature=baMLnU%2BCtGpln1PAsVxJox0gC2Y%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"4\", \n            \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34119501, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:4\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:29:40.612+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"68b8c9f3-6a74-11e6-a583-b36fb60f2d42\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:28 GMT\", \n                \"x-amzn-requestid\": \"68b8c9f3-6a74-11e6-a583-b36fb60f2d42\", \n                \"content-length\": \"1519\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-47e64943-2164-4733-96e0-588022c9c061?x-amz-security-token=FQoDYXdzEJz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDFUxKflDi1l2uqp5zCK3A8sjCwuyeF522Y9pcR%2B6ncisebCzplNH%2F09xYgXGibtOAWNj2SqUNnkPaeAPHDHwgH6yFihGdz86rf%2F8acuBmo2sl2wKcteaywiKHfoQAXTIgghs876K4SwjqrBlJcBqMbabyJPr5MdAMK2jlHiaZY0qxqGglypCNM3DXkL%2FQxH7KjRVoFhKo%2FGarB7uzXCUvFmUhsCp1rLm1mzZRt27Hu%2Bdhavq1%2BJYNseihmviAGmu7A6oyhFa8DQaUWB2ysUJwCg2egF%2FCGM77bAWhHZF7VLDOQy1KbipJtoh1vSjP%2F%2BKMhOy7Zhly4AEY%2FJwjh7L%2BYRpKOxH3mm9zcp1kI%2FOj8EHdFF63HFs9Njh3dyFomFoJqvVqPo7z3OnE9lGRvJfKQHHfGvDHopLDZuICGRREnSLu2yZxVE0YfEiXpgj8A3wPErS%2F2EsRM2AxV6gswyNBe1AkAYuuTNPbT6Hm%2BdoRE%2BAKr7gK0978PpyaAygyr%2FxPg4a7Fpvhlo3oKBd3nvhC5p37rBX87d9THh%2BJE2IRagOZnwcLpIyORphVQztCaKqNAIH3v5qP0kny6JXmvprWV5Gu%2FDE2u0o98L5vQU%3D&AWSAccessKeyId=ASIAIT7J7OEDUOZDNJLA&Expires=1472096581&Signature=JYGl2jKRAQm7UzsFiya1P0dUSNY%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34119501, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:32:54.145+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9fce80d3-6a74-11e6-814e-ed78a2ae26f6\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:00 GMT\", \n                \"x-amzn-requestid\": \"9fce80d3-6a74-11e6-814e-ed78a2ae26f6\", \n                \"content-length\": \"1505\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-47e64943-2164-4733-96e0-588022c9c061?x-amz-security-token=FQoDYXdzEJv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDIwrhOaYJqnbdhsz9SK3A9pKAnVdYSMXgSY9wTStThBM0kdVgxnsA%2Fa%2FpUQRw9AdTWqup4bXDSah3B50GQhAlkQsQ6kJHePxDUSBCAPJHTSk4rZh%2BEZc220ZhoyM2cjaQCwcjzBNQL2gODBtusZSWh5LERWuACdq2Y5eDY%2BNAL%2FHmR1A11dVQW8SnOsH045%2BCMYSxWIwWkV1yHCtsm8tLiUbP%2FEksL6RQh3ys%2FFHrL%2B1bknvcnqDgS9VvvDCtw4KhP9PzzsNERB2E9A%2B4lQwUrSey2URf3jnID83Y9HvSAQ%2B%2BslfvOHvMnKF9%2FWXLdsKN49kedHDPXQ5u4p8jRF6h6urRIQ4XPA%2FPFwtIqrdZ%2BZRYcs7PoVioAgpEI94b%2B8amXzBKoEi6ZKQ%2Ft%2FMzomqJnB0W5NfQEvYdpZeSFl92EvWgTFago9tyXY37OmDlFEK4DxYwewRNPaJPIx36YldP9AGAbL7ROXzjCYCpU7Wir2Jr9So5KlFbq2dkqVOY4VIbs%2FnyjCgD4eZiAv2ZR%2BgmGLZx7xIzH64Bc50RY10C5tPojUsKcJmo9taEvvg%2Bju0IHUeKnrhyK0VPRxR9pE%2BOdDwIYZW7e0ouaj5vQU%3D&AWSAccessKeyId=ASIAIWUBNU3UFJU4CKXA&Expires=1472096584&Signature=e7pnnExZVTLOVVJDmodurT2CSFw%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34119501, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:32:54.145+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a198b90e-6a74-11e6-a16f-7fad14073a60\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:03 GMT\", \n                \"x-amzn-requestid\": \"a198b90e-6a74-11e6-a16f-7fad14073a60\", \n                \"content-length\": \"1511\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/zappa-ttt888-47e64943-2164-4733-96e0-588022c9c061?x-amz-security-token=FQoDYXdzEJz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDKCZVm2BJCHyVU93niK3A5fs49d4SgGBiKqnQ%2FSfvoVDuW6Pkje%2FwERLhwutiI7iZiPz9uhgetuzgHL1%2BAoayxI%2BHHEagHeFgVtCvnmSOZfK%2F2PfpTXhcRGpg4sIq6Mb%2BLL38rMXCGOb%2Brp3Mvtd5VrlyAobIuQT6BdX0AETVJYD8vanX0UOD1OXic%2BtZJViJoDlt7raSStU05msNz9e%2BMi%2B7PcONRNckyoFglk%2BXRFq4yENMtE2TXlJGVXt%2FuHUdhWdnu5kILm25wlCahZ%2BTHKQHlPCePTk3tJ1LFwWImlzB%2BfTsKf%2F1intGJmAtYama9OyyKBk2eJhk8HJLF9vvQ2jM2BelA2piZfCYc3ttWQko60J38Xy2AFa7P%2BEF6W78fBu6P74vJDWCWurSrPw9HtJ7UVAIxt0TTd%2BIIGS1UZWZUNMhnPgVi8s0BLi%2Bn5bQk1SDIIW2aDKFhuWVKqXsenUj9uU1ZhBxzccaIExi6UVj9xTivleyV%2B1NMv7QEWsRaGgqoh7HI2NBDgJ4g1Nhu9BJAW8WqSz5wYJwaEd8QCfiVnxiUejgXKS3T%2FdpMqQpCwqAZjWGlk%2FFD84zUan2TOC8w0sNPAo8rP5vQU%3D&AWSAccessKeyId=ASIAIZLVHN722DS2BVHQ&Expires=1472096586&Signature=y03JR9%2FNzNosGIoLOC6dyAjPni0%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n            \"FunctionName\": \"zappa-ttt888\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 34119501, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-25T03:32:54.145+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a33fd9e2-6a74-11e6-b711-ffca1def474c\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:33:05 GMT\", \n                \"x-amzn-requestid\": \"a33fd9e2-6a74-11e6-b711-ffca1def474c\", \n                \"content-length\": \"1511\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.GetPolicy_1.json",
    "content": "{\n    \"status_code\": 404,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 404,\n            \"RequestId\": \"43c3f6fc-7105-11e6-b082-7b8efc14ebe8\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"43c3f6fc-7105-11e6-b082-7b8efc14ebe8\",\n                \"content-length\": \"107\",\n                \"connection\": \"keep-alive\",\n                \"date\": \"Fri, 02 Sep 2016 12:03:30 GMT\",\n                \"content-type\": \"application/json\",\n                \"x-amzn-errortype\": \"ResourceNotFoundException\"\n            }\n        },\n        \"Error\": {\n            \"Message\": \"Policy not found: arn:aws:lambda:us-east-1:032345039960:function:zappa-ttt888\",\n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"b0bc99a5-28f4-11e6-973f-fd5204f1d818\"\n        }, \n        \"Versions\": [\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a4906bea-28f7-11e6-85a7-5f3f9dd115d7\"\n        }, \n        \"Versions\": [\n            {\n                \"Version\": \"$LATEST\", \n                \"CodeSha256\": \"O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 8436189, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:$LATEST\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-06-02T19:24:32.878+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"1\", \n                \"CodeSha256\": \"8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 8311340, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-06-02T19:23:48.902+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"2\", \n                \"CodeSha256\": \"O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 8436189, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-06-02T19:24:32.878+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_3.json",
    "content": "{\n    \"status_code\": 404, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 404, \n            \"RequestId\": \"0e2c6581-6a74-11e6-a715-5f05be30fa57\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0e2c6581-6a74-11e6-a715-5f05be30fa57\", \n                \"content-length\": \"107\", \n                \"connection\": \"keep-alive\", \n                \"date\": \"Thu, 25 Aug 2016 03:28:56 GMT\", \n                \"content-type\": \"application/json\", \n                \"x-amzn-errortype\": \"ResourceNotFoundException\"\n            }\n        }, \n        \"Error\": {\n            \"Message\": \"Function not found: arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"68a9d580-6a74-11e6-8630-ef2f366ba5b9\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:27 GMT\", \n                \"x-amzn-requestid\": \"68a9d580-6a74-11e6-8630-ef2f366ba5b9\", \n                \"content-length\": \"1559\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"Versions\": [\n            {\n                \"Version\": \"$LATEST\", \n                \"CodeSha256\": \"EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 34293478, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:$LATEST\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-25T03:31:23.343+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"4\", \n                \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 34119501, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:4\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-25T03:29:40.612+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"5\", \n                \"CodeSha256\": \"EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=\", \n                \"FunctionName\": \"zappa-ttt888\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 34293478, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:5\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-25T03:31:18.572+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateAlias_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"O+UgQQT1ppytR9/n9r3ULukBw473iimxxyoQUUzNiuQ=\", \n        \"FunctionName\": \"zappa-ttt666\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aa39934a-28f4-11e6-8eab-cdf7e40cdc6c\"\n        }, \n        \"CodeSize\": 53489678, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666:2\", \n        \"Version\": \"2\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:03:19.892+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_2.json",
    "content": "{\n    \"status_code\": 413, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 413, \n            \"RequestId\": \"191e8dbc-28f5-11e6-b71d-85d581e5b915\"\n        }, \n        \"Error\": {\n            \"Message\": \"Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation\", \n            \"Code\": \"RequestEntityTooLargeException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a239d1da-28f7-11e6-ac0c-af09793b39b4\"\n        }, \n        \"CodeSize\": 8436189, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2\", \n        \"Version\": \"2\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:24:32.878+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a7ffefec-28f7-11e6-bd37-ffa1d7636382\"\n        }, \n        \"CodeSize\": 8311340, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:3\", \n        \"Version\": \"3\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-06-02T19:24:50.332+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"620dc9a2-6a74-11e6-9e11-0bd5ffc6198c\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:21 GMT\", \n                \"x-amzn-requestid\": \"620dc9a2-6a74-11e6-9e11-0bd5ffc6198c\", \n                \"content-length\": \"504\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"CodeSize\": 34293478, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:5\", \n        \"Version\": \"5\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-08-25T03:31:18.572+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"78fa29eb-6a74-11e6-aab9-f34ee8cdd438\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:32:57 GMT\", \n                \"x-amzn-requestid\": \"78fa29eb-6a74-11e6-aab9-f34ee8cdd438\", \n                \"content-length\": \"504\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"CodeSize\": 34119501, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:6\", \n        \"Version\": \"6\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-08-25T03:32:54.145+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionConfiguration_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=\", \n        \"FunctionName\": \"zappa-ttt888\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"65858b4f-6a74-11e6-a4c1-a9af34892afa\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 25 Aug 2016 03:31:22 GMT\", \n                \"x-amzn-requestid\": \"65858b4f-6a74-11e6-a4c1-a9af34892afa\", \n                \"content-length\": \"508\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"CodeSize\": 34293478, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888\", \n        \"Version\": \"$LATEST\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-08-25T03:31:23.343+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_1.json",
    "content": "{\n  \"status_code\": 202,\n  \"data\": {\n    \"ResponseMetadata\": {\n      \"HTTPStatusCode\": 202,\n      \"RequestId\": \"aasdf-asdfasdf-asdfasdf-asdf\"\n    }\n  }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_2.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"RequestId\": \"a24d6324-6a74-11e6-a70f-c33a89881a7c\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a24d6324-6a74-11e6-a70f-c33a89881a7c\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:04 GMT\", \n                \"content-length\": \"90\", \n                \"content-type\": \"application/x-amz-json-1.1\", \n                \"nncoection\": \"close\"\n            }\n        }, \n        \"Error\": {\n            \"Message\": \"The specified log group does not exist.\", \n            \"Code\": \"ResourceNotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a38483ff-6a74-11e6-9e89-1f53bd0bcaf8\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a38483ff-6a74-11e6-9e89-1f53bd0bcaf8\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:06 GMT\", \n                \"content-length\": \"0\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"logStreams\": [\n            {\n                \"firstEventTimestamp\": 1464895458307, \n                \"lastEventTimestamp\": 1464895458308, \n                \"creationTime\": 1464895458318, \n                \"uploadSequenceToken\": \"49547819337008687716864754247034213471967449977953728562\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"lastIngestionTime\": 1464895473352, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458119, \n                \"lastEventTimestamp\": 1464895458119, \n                \"creationTime\": 1464895457790, \n                \"uploadSequenceToken\": \"49557759006499770114619173424197784266225544958614456930\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"lastIngestionTime\": 1464895473222, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"storedBytes\": 0\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"ae195e73-28f7-11e6-9607-0576b04ab9e4\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"logStreams\": [\n            {\n                \"firstEventTimestamp\": 1464895458307, \n                \"lastEventTimestamp\": 1464895458308, \n                \"creationTime\": 1464895458318, \n                \"uploadSequenceToken\": \"49547819337008687716864754247034213471967449977953728562\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"lastIngestionTime\": 1464895473352, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458119, \n                \"lastEventTimestamp\": 1464895458119, \n                \"creationTime\": 1464895457790, \n                \"uploadSequenceToken\": \"49557759006499770114619173424197784266225544958614456930\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"lastIngestionTime\": 1464895473222, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"storedBytes\": 0\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"ae99d8a5-28f7-11e6-96a6-8fce84da63ed\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"logStreams\": [\n            {\n                \"firstEventTimestamp\": 1472095939120, \n                \"lastEventTimestamp\": 1472095939120, \n                \"creationTime\": 1472095937253, \n                \"uploadSequenceToken\": \"49564431587761396782395039936735939781482269179597839650\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\", \n                \"lastIngestionTime\": 1472095954272, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1472095819556, \n                \"lastEventTimestamp\": 1472095876909, \n                \"creationTime\": 1472095817710, \n                \"uploadSequenceToken\": \"49561406310035646461334886483372352431653111873568533778\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\", \n                \"lastIngestionTime\": 1472095891991, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458307, \n                \"lastEventTimestamp\": 1464895458308, \n                \"creationTime\": 1464895458318, \n                \"uploadSequenceToken\": \"49547819337008687716864754247034213471967449977953728562\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"lastIngestionTime\": 1464895473352, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"storedBytes\": 246\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458119, \n                \"lastEventTimestamp\": 1464895458156, \n                \"creationTime\": 1464895457790, \n                \"uploadSequenceToken\": \"49557759006499770114619173424197784266225544958614456930\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"lastIngestionTime\": 1464895473222, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"storedBytes\": 447\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9e48f2af-6a74-11e6-b9c8-4beb0a79aaee\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9e48f2af-6a74-11e6-b9c8-4beb0a79aaee\", \n                \"date\": \"Thu, 25 Aug 2016 03:32:57 GMT\", \n                \"content-length\": \"1808\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"logStreams\": [\n            {\n                \"firstEventTimestamp\": 1472095939120, \n                \"lastEventTimestamp\": 1472095939120, \n                \"creationTime\": 1472095937253, \n                \"uploadSequenceToken\": \"49564431587761396782395039936735939781482269179597839650\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\", \n                \"lastIngestionTime\": 1472095954272, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1472095819556, \n                \"lastEventTimestamp\": 1472095876909, \n                \"creationTime\": 1472095817710, \n                \"uploadSequenceToken\": \"49561406310035646461334886483372352431653111873568533778\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\", \n                \"lastIngestionTime\": 1472095891991, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\", \n                \"storedBytes\": 0\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458307, \n                \"lastEventTimestamp\": 1464895458308, \n                \"creationTime\": 1464895458318, \n                \"uploadSequenceToken\": \"49547819337008687716864754247034213471967449977953728562\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"lastIngestionTime\": 1464895473352, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\", \n                \"storedBytes\": 246\n            }, \n            {\n                \"firstEventTimestamp\": 1464895458119, \n                \"lastEventTimestamp\": 1464895458156, \n                \"creationTime\": 1464895457790, \n                \"uploadSequenceToken\": \"49557759006499770114619173424197784266225544958614456930\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"lastIngestionTime\": 1464895473222, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\", \n                \"storedBytes\": 447\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9f38a9c8-6a74-11e6-b4b1-bdca786ad91f\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9f38a9c8-6a74-11e6-b4b1-bdca786ad91f\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:00 GMT\", \n                \"content-length\": \"1808\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"searchedLogStreams\": [\n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }\n        ], \n        \"events\": [\n            {\n                \"ingestionTime\": 1464895458153, \n                \"timestamp\": 1464895458119, \n                \"message\": \"START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\\n\", \n                \"eventId\": \"32668260353996606794341458938610688159080211542579544064\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"[INFO]\\t2016-06-02T19:24:18.156Z\\t9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\t96.90.37.59 - - [02/Jun/2016:19:24:18 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/36.71\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826176\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826177\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"REPORT RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\tDuration: 37.62 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 18 MB\\t\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826178\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458307, \n                \"message\": \"START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\\n\", \n                \"eventId\": \"32668260358189146891665216107594067979796140253731815424\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795841\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"REPORT RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\tDuration: 0.79 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 17 MB\\t\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795842\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"ae3571d6-28f7-11e6-a82e-edf0fadbb1e7\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"searchedLogStreams\": [\n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }\n        ], \n        \"events\": [\n            {\n                \"ingestionTime\": 1464895458153, \n                \"timestamp\": 1464895458119, \n                \"message\": \"START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\\n\", \n                \"eventId\": \"32668260353996606794341458938610688159080211542579544064\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"[INFO]\\t2016-06-02T19:24:18.156Z\\t9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\t96.90.37.59 - - [02/Jun/2016:19:24:18 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/36.71\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826176\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826177\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"REPORT RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\tDuration: 37.62 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 18 MB\\t\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826178\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458307, \n                \"message\": \"START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\\n\", \n                \"eventId\": \"32668260358189146891665216107594067979796140253731815424\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795841\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"REPORT RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\tDuration: 0.79 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 17 MB\\t\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795842\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aeb158e9-28f7-11e6-93eb-53411ab5fae6\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"searchedLogStreams\": [\n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }\n        ], \n        \"events\": [\n            {\n                \"ingestionTime\": 1464895458153, \n                \"timestamp\": 1464895458119, \n                \"message\": \"START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\\n\", \n                \"eventId\": \"32668260353996606794341458938610688159080211542579544064\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"[INFO]\\t2016-06-02T19:24:18.156Z\\t9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\t96.90.37.59 - - [02/Jun/2016:19:24:18 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/36.71\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826176\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826177\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"REPORT RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\tDuration: 37.62 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 18 MB\\t\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826178\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458307, \n                \"message\": \"START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\\n\", \n                \"eventId\": \"32668260358189146891665216107594067979796140253731815424\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795841\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"REPORT RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\tDuration: 0.79 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 17 MB\\t\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795842\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1472095819575, \n                \"timestamp\": 1472095819556, \n                \"message\": \"START RequestId: 3e40e698-6a74-11e6-b010-0796037628bd Version: $LATEST\\n\", \n                \"eventId\": \"32828833779740469602282057220252583220417675906808610816\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:29:50Z', u'id': u'd9ec5db0-e7f5-408c-981d-0960207128d7', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785344\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"END RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785345\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"REPORT RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\\tDuration: 0.94 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785346\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831701, \n                \"message\": \"START RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b Version: $LATEST\\n\", \n                \"eventId\": \"32828834050583020038436475292405541805718089804987957251\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831703, \n                \"message\": \"Zappa Event: {u'body': u'e30=', u'headers': {u'Via': u'1.1 b04a4cffa8fb4f524ff7edcab1b5ae31.cloudfront.net (CloudFront)', u'Accept-Encoding': u'gzip, deflate', u'CloudFront-Is-SmartTV-Viewer': u'false', u'CloudFront-Forwarded-Proto': u'https', u'X-Forwarded-For': u'24.23.178.45, 54.239.203.109', u'CloudFront-Viewer-Country': u'US', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.10.0', u'Host': u'jkib1pg4l1.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'FheO8UOp1Mo2tBR9kxg5I8ChIcrsW2I5Ob5u3dEIeH3pg6jqbS7a-Q==', u'CloudFront-Is-Tablet-Viewer': u'false', u'X-Forwarded-Port': u'443', u'CloudFront-Is-Mobile-Viewer': u'false', u'CloudFront-Is-Desktop-Viewer': u'true'}, u'params': {}, u'method': u'GET', u'query': {}}\\n\", \n                \"eventId\": \"32828834050627621528833536538688613242263386527999918084\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831704, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:30:31.704Z\\t463d939d-6a74-11e6-9e46-4372c0a7957b\\tZappa Event: {u'body': u'e30=', u'headers': {u'Via': u'1.1 b04a4cffa8fb4f524ff7edcab1b5ae31.cloudfront.net (CloudFront)', u'Accept-Encoding': u'gzip, deflate', u'CloudFront-Is-SmartTV-Viewer': u'false', u'CloudFront-Forwarded-Proto': u'https', u'X-Forwarded-For': u'24.23.178.45, 54.239.203.109', u'CloudFront-Viewer-Country': u'US', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.10.0', u'Host': u'jkib1pg4l1.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'FheO8UOp1Mo2tBR9kxg5I8ChIcrsW2I5Ob5u3dEIeH3pg6jqbS7a-Q==', u'CloudFront-Is-Tablet-Viewer': u'false', u'X-Forwarded-Port': u'443', u'CloudFront-Is-Mobile-Viewer': u'false', u'CloudFront-Is-Desktop-Viewer': u'true'}, u'params': {}, u'method': u'GET', u'query': {}}\\n\", \n                \"eventId\": \"32828834050649922274032067161830148960536034889505898501\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"[INFO]\\t2016-08-25T03:30:31.705Z\\t463d939d-6a74-11e6-9e46-4372c0a7957b\\t24.23.178.45 - - [25/Aug/2016:03:30:31 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/1.132\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878918\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"END RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878919\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"REPORT RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\\tDuration: 2.02 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878920\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095837489, \n                \"timestamp\": 1472095837474, \n                \"message\": \"START RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560 Version: $LATEST\\n\", \n                \"eventId\": \"32828834179325222069553762691946502590087704378856177664\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837478, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:29:50Z', u'id': u'c6c1bea9-5846-4008-9947-57c1c5fb03d5', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback']}\\n\", \n                \"eventId\": \"32828834179414425050347885202716289686015888095690031104\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837478, \n                \"message\": \"Zappa Event: {}\\n\", \n                \"eventId\": \"32828834179414425050347885202716289686015888095690031105\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:30:37.478Z\\t4a180eae-6a74-11e6-a770-3dfd80db1560\\tZappa Event: {}\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011522\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"END RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011523\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"REPORT RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\\tDuration: 0.73 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011524\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095876933, \n                \"timestamp\": 1472095876906, \n                \"message\": \"START RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9 Version: $LATEST\\n\", \n                \"eventId\": \"32828835058688206738013294456667706850429642808481021952\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:30:50Z', u'id': u'8cc9414a-09ad-4e98-94c0-61cf8d913a54', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457088\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:31:16.909Z\\t619f5090-6a74-11e6-bea3-9380ecc2bed9\\tZappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:30:50Z', u'id': u'8cc9414a-09ad-4e98-94c0-61cf8d913a54', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457089\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"END RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457090\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"REPORT RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\\tDuration: 0.61 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457091\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095939205, \n                \"timestamp\": 1472095939120, \n                \"message\": \"START RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517 Version: $LATEST\\n\", \n                \"eventId\": \"32828836446106768519397482659453111578474681979771748352\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939120, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:31:50Z', u'id': u'ed6d27eb-a878-4a17-ac83-55dea0af1a04', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828836446106768519397482677667903964769906316644384768\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939121, \n                \"message\": \"END RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\\n\", \n                \"eventId\": \"32828836446129069264596013300809439683042554678150365185\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939121, \n                \"message\": \"REPORT RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\\tDuration: 1.00 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828836446129069264596013300809439683042554678150365186\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9e5e4e9d-6a74-11e6-8722-a741ba7570d8\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9e5e4e9d-6a74-11e6-8722-a741ba7570d8\", \n                \"date\": \"Thu, 25 Aug 2016 03:32:59 GMT\", \n                \"content-length\": \"13280\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"searchedLogStreams\": [\n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }\n        ], \n        \"events\": [\n            {\n                \"ingestionTime\": 1464895458153, \n                \"timestamp\": 1464895458119, \n                \"message\": \"START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\\n\", \n                \"eventId\": \"32668260353996606794341458938610688159080211542579544064\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"[INFO]\\t2016-06-02T19:24:18.156Z\\t9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\t96.90.37.59 - - [02/Jun/2016:19:24:18 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/36.71\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826176\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826177\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473222, \n                \"timestamp\": 1464895458156, \n                \"message\": \"REPORT RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\\tDuration: 37.62 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 18 MB\\t\\n\", \n                \"eventId\": \"32668260354821734366687092013064740005169577899195826178\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458307, \n                \"message\": \"START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\\n\", \n                \"eventId\": \"32668260358189146891665216107594067979796140253731815424\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795841\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1464895473352, \n                \"timestamp\": 1464895458308, \n                \"message\": \"REPORT RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\\tDuration: 0.79 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 17 MB\\t\\n\", \n                \"eventId\": \"32668260358211447636863746730735603698068788615237795842\", \n                \"logStreamName\": \"2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab\"\n            }, \n            {\n                \"ingestionTime\": 1472095819575, \n                \"timestamp\": 1472095819556, \n                \"message\": \"START RequestId: 3e40e698-6a74-11e6-b010-0796037628bd Version: $LATEST\\n\", \n                \"eventId\": \"32828833779740469602282057220252583220417675906808610816\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:29:50Z', u'id': u'd9ec5db0-e7f5-408c-981d-0960207128d7', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785344\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"END RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785345\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095819557, \n                \"message\": \"REPORT RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\\tDuration: 0.94 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828833779762770347480587861595779102676387676361785346\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831701, \n                \"message\": \"START RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b Version: $LATEST\\n\", \n                \"eventId\": \"32828834050583020038436475292405541805718089804987957251\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831703, \n                \"message\": \"Zappa Event: {u'body': u'e30=', u'headers': {u'Via': u'1.1 b04a4cffa8fb4f524ff7edcab1b5ae31.cloudfront.net (CloudFront)', u'Accept-Encoding': u'gzip, deflate', u'CloudFront-Is-SmartTV-Viewer': u'false', u'CloudFront-Forwarded-Proto': u'https', u'X-Forwarded-For': u'24.23.178.45, 54.239.203.109', u'CloudFront-Viewer-Country': u'US', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.10.0', u'Host': u'jkib1pg4l1.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'FheO8UOp1Mo2tBR9kxg5I8ChIcrsW2I5Ob5u3dEIeH3pg6jqbS7a-Q==', u'CloudFront-Is-Tablet-Viewer': u'false', u'X-Forwarded-Port': u'443', u'CloudFront-Is-Mobile-Viewer': u'false', u'CloudFront-Is-Desktop-Viewer': u'true'}, u'params': {}, u'method': u'GET', u'query': {}}\\n\", \n                \"eventId\": \"32828834050627621528833536538688613242263386527999918084\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831704, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:30:31.704Z\\t463d939d-6a74-11e6-9e46-4372c0a7957b\\tZappa Event: {u'body': u'e30=', u'headers': {u'Via': u'1.1 b04a4cffa8fb4f524ff7edcab1b5ae31.cloudfront.net (CloudFront)', u'Accept-Encoding': u'gzip, deflate', u'CloudFront-Is-SmartTV-Viewer': u'false', u'CloudFront-Forwarded-Proto': u'https', u'X-Forwarded-For': u'24.23.178.45, 54.239.203.109', u'CloudFront-Viewer-Country': u'US', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.10.0', u'Host': u'jkib1pg4l1.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'FheO8UOp1Mo2tBR9kxg5I8ChIcrsW2I5Ob5u3dEIeH3pg6jqbS7a-Q==', u'CloudFront-Is-Tablet-Viewer': u'false', u'X-Forwarded-Port': u'443', u'CloudFront-Is-Mobile-Viewer': u'false', u'CloudFront-Is-Desktop-Viewer': u'true'}, u'params': {}, u'method': u'GET', u'query': {}}\\n\", \n                \"eventId\": \"32828834050649922274032067161830148960536034889505898501\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"[INFO]\\t2016-08-25T03:30:31.705Z\\t463d939d-6a74-11e6-9e46-4372c0a7957b\\t24.23.178.45 - - [25/Aug/2016:03:30:31 +0000] \\\"GET / HTTP/1.1\\\" 200 30 \\\"\\\" \\\"python-requests/2.10.0\\\" 0/1.132\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878918\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"END RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878919\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095834631, \n                \"timestamp\": 1472095831705, \n                \"message\": \"REPORT RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\\tDuration: 2.02 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828834050672223019230597784971684678808683251011878920\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095837489, \n                \"timestamp\": 1472095837474, \n                \"message\": \"START RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560 Version: $LATEST\\n\", \n                \"eventId\": \"32828834179325222069553762691946502590087704378856177664\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837478, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:29:50Z', u'id': u'c6c1bea9-5846-4008-9947-57c1c5fb03d5', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback']}\\n\", \n                \"eventId\": \"32828834179414425050347885202716289686015888095690031104\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837478, \n                \"message\": \"Zappa Event: {}\\n\", \n                \"eventId\": \"32828834179414425050347885202716289686015888095690031105\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:30:37.478Z\\t4a180eae-6a74-11e6-a770-3dfd80db1560\\tZappa Event: {}\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011522\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"END RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011523\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095852547, \n                \"timestamp\": 1472095837479, \n                \"message\": \"REPORT RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\\tDuration: 0.73 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828834179436725795546415825857825404288536457196011524\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095876933, \n                \"timestamp\": 1472095876906, \n                \"message\": \"START RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9 Version: $LATEST\\n\", \n                \"eventId\": \"32828835058688206738013294456667706850429642808481021952\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:30:50Z', u'id': u'8cc9414a-09ad-4e98-94c0-61cf8d913a54', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457088\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"[DEBUG]\\t2016-08-25T03:31:16.909Z\\t619f5090-6a74-11e6-bea3-9380ecc2bed9\\tZappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:30:50Z', u'id': u'8cc9414a-09ad-4e98-94c0-61cf8d913a54', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457089\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"END RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457090\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095891991, \n                \"timestamp\": 1472095876909, \n                \"message\": \"REPORT RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\\tDuration: 0.61 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828835058755108973608886344296130140153400867786457091\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff\"\n            }, \n            {\n                \"ingestionTime\": 1472095939205, \n                \"timestamp\": 1472095939120, \n                \"message\": \"START RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517 Version: $LATEST\\n\", \n                \"eventId\": \"32828836446106768519397482659453111578474681979771748352\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939120, \n                \"message\": \"Zappa Event: {u'account': u'724336686645', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2016-08-25T03:31:50Z', u'id': u'ed6d27eb-a878-4a17-ac83-55dea0af1a04', u'resources': [u'arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me']}\\n\", \n                \"eventId\": \"32828836446106768519397482677667903964769906316644384768\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939121, \n                \"message\": \"END RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\\n\", \n                \"eventId\": \"32828836446129069264596013300809439683042554678150365185\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }, \n            {\n                \"ingestionTime\": 1472095954272, \n                \"timestamp\": 1472095939121, \n                \"message\": \"REPORT RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\\tDuration: 1.00 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32828836446129069264596013300809439683042554678150365186\", \n                \"logStreamName\": \"2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9f4bbca1-6a74-11e6-9da3-c567afd11da4\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9f4bbca1-6a74-11e6-9da3-c567afd11da4\", \n                \"date\": \"Thu, 25 Aug 2016 03:33:00 GMT\", \n                \"content-length\": \"13280\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"7d8ea4b5ca695ef9def6f57e8ab947af-7\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt666-1464893986.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"1U04LK7sMQjp+bQd91fM5zhG/ealJmd6+PIGvUE0Fx2gA88TS/2pO+/hqbOl0dSYpUrXl87wFXY=\", \n            \"RequestId\": \"753D147604AD53D7\"\n        }, \n        \"Key\": \"zappa-ttt666-1464893986.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"cb211db1a343550a77053192725b9b3f-7\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt666-1464894143.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"CDDWDTTgkMv6wIemmCaivt1xCqIQZVPRKPWaXXTBzku7ndJ4Pi8gnoWfyZ3czOMmH3uTkS5FFZo=\", \n            \"RequestId\": \"88F34F6CF3AFFF08\"\n        }, \n        \"Key\": \"zappa-ttt666-1464894143.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"a9e494dfe3c5246750e78bd42f90c4a5-7\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt777-1464894741.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"I1HS36v8H6pvz1LSPYQGmckWapvyYjcBW7/7oWMvbj7oCw04Rmvixg09EPhmS0D50TrIN5yCMHw=\", \n            \"RequestId\": \"9B6AF42A93970E25\"\n        }, \n        \"Key\": \"zappa-ttt777-1464894741.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"79446d3807f886f8f89ed5179c6f4c81-2\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt888-1464895457.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"cGdNVqQMWt2lKxO7WUwdjjb0UPz/X8hD8HyjMDJEwmVWz5nRkuHCQuvaKIow46iMIkWyPmq+RiA=\", \n            \"RequestId\": \"9E9942B27023A8D4\"\n        }, \n        \"Key\": \"zappa-ttt888-1464895457.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"4cff7333c284cf98d32e9c234078a260-5\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt888-1472095738.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"1rYmoqWiCpm9xab8SHg7A0bHqRmOC2C0uTWEA0kMJlnRjYp5P8sJsABafj/56NcV6NKxkq/qKyA=\", \n            \"RequestId\": \"C174B5610428C046\", \n            \"HTTPHeaders\": {\n                \"x-amz-id-2\": \"1rYmoqWiCpm9xab8SHg7A0bHqRmOC2C0uTWEA0kMJlnRjYp5P8sJsABafj/56NcV6NKxkq/qKyA=\", \n                \"server\": \"AmazonS3\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"C174B5610428C046\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:39 GMT\", \n                \"content-type\": \"application/xml\"\n            }\n        }, \n        \"Key\": \"zappa-ttt888-1472095738.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"d3baeac4e66f3403809c1deb5e76ae40-5\\\"\", \n        \"Bucket\": \"lmbda\", \n        \"Location\": \"https://lmbda.s3.amazonaws.com/zappa-ttt888-1472095835.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"DU1b7lEUxvZ8CZzg6z4YPUr/WI1yLurRUXoVZ2eELwWVsg6ojDzcRBq7a3RkFCW2t/skLr81CIg=\", \n            \"RequestId\": \"3099CD772CC83FD5\", \n            \"HTTPHeaders\": {\n                \"x-amz-id-2\": \"DU1b7lEUxvZ8CZzg6z4YPUr/WI1yLurRUXoVZ2eELwWVsg6ojDzcRBq7a3RkFCW2t/skLr81CIg=\", \n                \"server\": \"AmazonS3\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"3099CD772CC83FD5\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:18 GMT\", \n                \"content-type\": \"application/xml\"\n            }\n        }, \n        \"Key\": \"zappa-ttt888-1472095835.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_1.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"WkKOL/umYvyelpQTci91kybzdBtME9Fre1at/Qq1VLpdLUptTvl+YokU2aPFUflogOIoXb01juU=\", \n            \"RequestId\": \"F3587DF863DFE7FB\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Location\": \"/lmbda\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"/YSJwqqetw2S1gPvBA/OdTp0m8jqv7ZrN5gPA3OOviJvRgaqknRtLSo5iX9PPNDdfvewQWArLKI=\", \n            \"RequestId\": \"E294822D6B451239\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"/YSJwqqetw2S1gPvBA/OdTp0m8jqv7ZrN5gPA3OOviJvRgaqknRtLSo5iX9PPNDdfvewQWArLKI=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"E294822D6B451239\", \n                \"location\": \"/lmbda\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:45 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_2.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"ixHdQ3qvyt5fk5PT/74tfr1XaZW9OB1x8QC0ei9d3zxD8YA/64TQkiUo35wem3Y7andJXQ8UGkM=\", \n            \"RequestId\": \"A0FF751028D7BE3E\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_3.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"3gwJL32J80cl2zqOqBO7i4ivR+bIKHk1Z6SqcoVmtWNMo8x5LKMeqLAcSYRn44E33OPn+erQsbY=\", \n            \"RequestId\": \"51C8A341B18A3239\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_4.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"H09AiBf8SSHvsa/OmW8cP1UGxAT5Y7HWemIdva6+aU0FPBDs5G3kcuwXEX1uu5Am6KuHA20/yMQ=\", \n            \"RequestId\": \"21000EA7A2256303\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_5.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"Wb7Zafku3Fm3Jo9rU4fdCONIC1uqzsB6wOenBvQ40sYlBaPODFG2w+wVCzIatOB8Dp1D4ZoHdGw=\", \n            \"RequestId\": \"2CB218F2983FF033\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_6.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"ntsdbpuJwEmOZW+3e0//DvmxIl8qfINHCTNsxzdoYbwaqL86Q/muJ8FifIV/PSboAOypFY2v6zU=\", \n            \"RequestId\": \"66505E25363BE660\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_7.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"hfJ5JJhKDWwmDRS/zZZpHrfGDbRjH0b2YZsUvV5Zw/QSsvYO3nkBzhT1NeCEO5zb5SpqCafh99w=\", \n            \"RequestId\": \"11F1F27E46FE9D55\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_8.json",
    "content": "{\n    \"status_code\": 400, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 400, \n            \"HostId\": \"OawmswNfwnBjYReYvTv3YfhUA2X+2/064rQc4ucsQEPhxVj511hBQUi+r84hQoh9cNzl8Lr3WQU=\", \n            \"RequestId\": \"8CC9BCD1FDC1B4C3\"\n        }, \n        \"Error\": {\n            \"Message\": \"The specified location-constraint is not valid\", \n            \"Code\": \"InvalidLocationConstraint\", \n            \"LocationConstraint\": \"us-east-1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Location\": \"/lmbda\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"ZgZJ98oqBfCvDXQ9uKmsTb+Jg7NKAqdR6bg7BtmmE941CWnUXSF0qdfwOkYoQqhaJSw1M9goVbg=\", \n            \"RequestId\": \"FB82CE06E5269737\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"ZgZJ98oqBfCvDXQ9uKmsTb+Jg7NKAqdR6bg7BtmmE941CWnUXSF0qdfwOkYoQqhaJSw1M9goVbg=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"FB82CE06E5269737\", \n                \"location\": \"/lmbda\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:07 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"US_bFtpdBYtCllL2Cl9U3OlxrWnzPNgdILxxQ3FboEG3vlfDPTtracF7Db_q6XXBD7u3XpnTPE.8e2F9YTyxTQ--\", \n        \"Key\": \"zappa-ttt666-1464893611.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"LLVwICNp0bM5O9UlagkyPe4F1xSGyzc2o+UzwnzPC8HOwM/MHGbiEYqWv30I3vXC/lqNjTX7TyE=\", \n            \"RequestId\": \"F180A947964EED25\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"A15QCn_ymu0PDNdm4oCG0iw509EcREjrlaO6C4SshzTmy3usSJ174TlWmgL6iy7f5jiQHXYnrZ6QRQKEzczNog--\", \n        \"Key\": \"zappa-ttt666-1464893986.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"IrbF7Nil6jqwHkO5AgWvkgOGdJZ1HHlfPQVZr1iZxm9MSzGCrFhdAOmfgxaXk9jGTaACwFT9Gog=\", \n            \"RequestId\": \"729D63EA69A183CD\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"UZZLVPlRxiH7LauzkSoyXHVRL5QhU2hpH36uPhAkiILgTLY3a8Z3AkTc3XtxiIvm856urSUFdXEoqdiEl8ed_g--\", \n        \"Key\": \"zappa-ttt666-1464894143.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"WVuuVNQaXZbEdTIsOAJWwqjl22xpngmFTbkcmmFSThX4y7ah6lMBDqHmrbO6tm7j21LT73lJ/7A=\", \n            \"RequestId\": \"D0D2A50BA855F11F\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"zMVT1Ff2vwJljMaIZVvvzWMKNFNL6oGrPetJimjggNyIGzheMABl0vvcjQ0CPWFv7gzwhyk3lcsTFb_XlfUrBQ--\", \n        \"Key\": \"zappa-ttt777-1464894741.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"9+9lOecGqOD/+rhp6Iz6oqTrOYwbJtzwyQAff5pSLpkU5A3i0rLIzMO665YbsVvQ1rHpMJmAkCk=\", \n            \"RequestId\": \"AEE878A166629949\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"jdF42jIIibhpgl11YtCGyctvxfLLFa6JpJTcsjpPuJZoeQBiMPpP9xxoHLr2Q0Gc2xCnka1dM1Qy31klQpzptw--\", \n        \"Key\": \"zappa-ttt777-1464895132.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"3aVY53C8sq1b2kgaCP1YNIMPrAYKCO09sbcb2PVM9Uby47BD1s7RPdWv0VfMOZfg+JQ8ievD1s8=\", \n            \"RequestId\": \"57CC7AACBA21B328\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"3mze22UMMFSxvNPzj6G_VKiTuf3VHw.q2qFqHDBh1neIib_kIpvUV4UvZ3bWraZOleEvtXD2WzKRH8zbZbe0Ww--\", \n        \"Key\": \"zappa-ttt888-1464895457.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"5AAEtb6SGiTHMiDiF9K2gFOSbO9yhUjK6Zm5f+ITUCppV5GYM+YTe3domen5YjMnwsTX5kNlSMY=\", \n            \"RequestId\": \"165233E17319C4F3\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"A3T4vXHQEd9dw1uK8y1S2E6qArCsvZaXFXXtbMOVND8uqtMKqqnkqf9e_lrLlcyLIZi7lr_HY5ClRFopCO.4Ig--\", \n        \"Key\": \"zappa-ttt888-1472095738.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"1sYhVpDz0fFArHH3ypjaroVzsgy8BR9R5vPA7s/cc7sEqKrXBwsDidNoirib0x1eLX+myjUh4/8=\", \n            \"RequestId\": \"16D622C42C6154BE\", \n            \"HTTPHeaders\": {\n                \"x-amz-id-2\": \"1sYhVpDz0fFArHH3ypjaroVzsgy8BR9R5vPA7s/cc7sEqKrXBwsDidNoirib0x1eLX+myjUh4/8=\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"16D622C42C6154BE\", \n                \"server\": \"AmazonS3\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"lmbda\", \n        \"UploadId\": \"Of02Ii9bKP99Q0IeesyEkV7a2bEF7Uv4AuBw_MDipQE7N_5iR0ptMrQXP7FYotBiU0emwfNMem_96euqrXxeIQ--\", \n        \"Key\": \"zappa-ttt888-1472095835.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"4kRjYO9wNrV4HuGRMvaH+Mo6kgNFjQQ9ntg5dN9+9VHrtI53/dYzOIbPO++s6MjNpyEkY6V/mbI=\", \n            \"RequestId\": \"B1AFC8BD862E8A41\", \n            \"HTTPHeaders\": {\n                \"x-amz-id-2\": \"4kRjYO9wNrV4HuGRMvaH+Mo6kgNFjQQ9ntg5dN9+9VHrtI53/dYzOIbPO++s6MjNpyEkY6V/mbI=\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:45 GMT\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"B1AFC8BD862E8A41\", \n                \"server\": \"AmazonS3\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_1.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204,\n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\",\n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\",\n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_2.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_3.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_4.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_5.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_6.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"uAXeXh1s8nYDQU/KD7qa2DPPSN+mMJ3d5hP9G5hegH0fNOhehPo/kdHmCMBB8pXGfM56/Tzi4N0=\", \n            \"RequestId\": \"4AF5E5D5B7DD6424\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"X9TX+PJGkwPRxkC50qdl+b9lkFkeGbNKleAENOakCVi5JMZP8QYXKoVX6OYoOriDZ9DOJLpdZuE=\", \n            \"RequestId\": \"447BAF343E73D371\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"SuKvXFoSJbM/2jkopS0MAyrO4UIzSJIAl0JSpCZLvO1fhB058u2IQXoy4+gM7kiE/vxFhXmk+qY=\", \n            \"RequestId\": \"1781FF8E001574B5\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"qEDhHzOeHhrFyBMpFd+RvM+Eo8kiptgwFvuV8a68RNjz+g6lJD9a6ysrN2/orszOFZr6B1Cw6as=\", \n            \"RequestId\": \"484B95A4A0FB9451\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"eO/GhHTRpS+CUu157mnKhejp/Hu85BlJ3GbrR7TsxT5iU8F4TaaCJvwRtlTrS4S3KSQG5QyXkaA=\", \n            \"RequestId\": \"694DA0BE4C6E334D\", \n            \"HTTPHeaders\": {\n                \"x-amz-bucket-region\": \"us-east-1\", \n                \"x-amz-id-2\": \"eO/GhHTRpS+CUu157mnKhejp/Hu85BlJ3GbrR7TsxT5iU8F4TaaCJvwRtlTrS4S3KSQG5QyXkaA=\", \n                \"server\": \"AmazonS3\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"694DA0BE4C6E334D\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:33 GMT\", \n                \"content-type\": \"application/xml\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"FifYdur0PVNCEXZe/jSHaLp/NpQzXcYKHCGXWO5Lsbi1Fu2zhbfM9/i61//u3PL5AA2zi3XSy1M=\", \n            \"RequestId\": \"B51935E006CEB74A\", \n            \"HTTPHeaders\": {\n                \"x-amz-bucket-region\": \"us-east-1\", \n                \"x-amz-id-2\": \"FifYdur0PVNCEXZe/jSHaLp/NpQzXcYKHCGXWO5Lsbi1Fu2zhbfM9/i61//u3PL5AA2zi3XSy1M=\", \n                \"server\": \"AmazonS3\", \n                \"transfer-encoding\": \"chunked\", \n                \"x-amz-request-id\": \"B51935E006CEB74A\", \n                \"date\": \"Thu, 25 Aug 2016 03:31:23 GMT\", \n                \"content-type\": \"application/xml\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.PutObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"deb78dc052685752be7e1370e0689391\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"1gmZkXfdLqDqlqUdMjetbhJ/K5FZBHd+uczRh6TcAPqHL7timFbAMoEQO3PtTlAIVdoejCQ0x00=\", \n            \"RequestId\": \"417985B0ADD8BCB0\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.PutObject_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"041ea0d7bf25415d10604d7c5b66dbb2\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"2fALzAd9Y/kJCKcDOBMiJFGwfyNN+dXJjeoyZPAozpGE6dDNcg9cQt0B+ef9oSL1YrrEiJjFUiY=\", \n            \"RequestId\": \"FBEB40B5C3E49393\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"1242470432e43dfd0426c87a81d478aa\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"zasl1XXzLL6GSsA8iiKdTKpfYg4MHclBJPo28N08zPb0vS9MQkQTgq/TaHJwGL2f12y31r4Cn30=\", \n            \"RequestId\": \"734C4C70E100D4C6\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_10.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"4398272c8aa68f99a63d1a14065a20ec\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"m7ftvLp5tpV3HA1LELk0rjwN5RCZV7wzXfph+5p1EWAxEaa5it1gi6fJ5VEz7oLHaUPuq200YHs=\", \n            \"RequestId\": \"CF52E43AB50169C9\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_11.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"a397427b45b59d474f9bfcb3c6944a7e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"sQ5uFLn3//gxsiZD3HUd+6fRF04kDcZJAzdihOYwFGsy/Gn/N1vZOtUHMlf73qBl1kvvfOu12cQ=\", \n            \"RequestId\": \"641375B0D0F17519\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_12.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"3b3bad108adc65ee2e29bdbf30bd3ba9\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"FEW8Q0LbM7itBDlB5RVXR8hFdVuquw3BHqF2NmpBxODgHTllocOHIrRXMr19fI++NLBZRJqBQWQ=\", \n            \"RequestId\": \"4F83278171F2D0D1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_13.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"229bb6f168da5aa543ad5918cc6c24f1\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"2ydbp+NdwzX5URL8GmTtnVYeBwixQi3h+4Et6WZwGLVC/3zcNpvBg/P+tvP/iNDYaSNUvTP1d8M=\", \n            \"RequestId\": \"E1033839A2210EA6\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_14.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"51d6450073ea95efcfbaf62fff7e1312\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"sbiaUw0uGUdmer6oiFq4veKXhIOAWlQP4Xv6Wqvu4Gr10I625TQR+8MJc4xQ8f7tIICaH+av7Mo=\", \n            \"RequestId\": \"52C56A59B2CD9DB6\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_15.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"b1a8651b6edd778fe291d35d5e18df77\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"L7O9ixK1BMEKv4KTIFZModaCRQWjGlsmnfg6LbPfkU7dtyE70NKLJ1FYY41tGmZF5biORpLsapc=\", \n            \"RequestId\": \"04AA1E715E8C160A\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_16.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"229bb6f168da5aa543ad5918cc6c24f1\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"LDblVk1NaREWA0/bd5oUSz5cBOoC9DOcA/3sStt3bEw9g6cr9+76gz16UWEBKP2aW6vLKqMnJuA=\", \n            \"RequestId\": \"5282C18C7DB82F25\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_17.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"4398272c8aa68f99a63d1a14065a20ec\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"tDwkWKDhNbtxfdFT/90P7Idmjqf6CPkuFgwbLBrQL6CyxYanqhi3azBpnb+QGI0ttXYfoN4Frvw=\", \n            \"RequestId\": \"75D22D39A79EDFD2\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_18.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"51d6450073ea95efcfbaf62fff7e1312\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"OWVUZ5hy1haKFYp1Vjd0q3gnEfzCrZcC96HhlP6QLoWxfevn4DbMSheYm693gOgq4Wx/fjwKAbg=\", \n            \"RequestId\": \"D8B0D08C2444330C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_19.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"3d8594493e6e63cb3e4271a47db3ff04\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Jy3Z2iSSC87HQ6245l7bKjPPPTebmiY+LqN2z9mynCDMqCFaLinO1uDbbkROmv68nYLctkTF33w=\", \n            \"RequestId\": \"ADF2101C71860122\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"5af3d1c659ca1359c0b281ea96c5c90e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"V/kUEy1azTsD3qTQXx14ffnV6cgrq9/Gd4zkSAyUjaE9X3ng/hgBR/KEYiUTXw27/0hT/X1LU+8=\", \n            \"RequestId\": \"68BBEA9F860B426F\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_20.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"a397427b45b59d474f9bfcb3c6944a7e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"heRgdTXa8K2oh7Y7xedgAkvMt9PNwUiPMmLsk1o6sidhdmYUxHTbaxCxx4xPLtRJpj48/LI2XfQ=\", \n            \"RequestId\": \"99BCAEADB87D8130\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_21.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"be81001ac8c8c0d290f47e97f22abbc9\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"7phlZLQPWh5Rgk3FKuMHLvgV8VoKfmq7E4Ly9K7zuN3NtcJarPMMM5jVstUyE+OlBrWgrOvPoQg=\", \n            \"RequestId\": \"270D6D409C05B385\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_22.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"cabe8e9d9f8b3e59778168d132b01759\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"XMXgvLPuTNhrYSnAXXmDd4co98JmPuUqyPICTeWKZ6gcPHrFqd7lnBIwJNau6neu6RPmFj+iipw=\", \n            \"RequestId\": \"D2BD17C8F86EAE73\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_23.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"cbff88fe24f1c482b368ec7b975f6720\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"RISiMRRCNWa7Wqj7Y542P3IOGAueS1oFcg7gZTMcS/Xh/VC7oOwFOD70JMcFuVhnfLODK0VVx4g=\", \n            \"RequestId\": \"B814B11452F79FD1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_24.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"46ec538eaab9f73a58ccbddfaf7e0a90\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"+nQXq03sUfV6OHPgOejJHV1EcFCQOHYeOX24M+kDAYdjNHbjcn+hs51xQy3IQKBiQycBcr5JBy0=\", \n            \"RequestId\": \"B1AA2E6D00EC0E38\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_25.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"e420f791dba5cabc26820fbde065c1fe\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"BJ6G/EDKpa1y//YXvDMl5QUCxxIMhaMQOJua1p1f3xKHEiLZlZKlFLo2IEXQPtNY+T82xxesCOI=\", \n            \"RequestId\": \"4D9DE8D7ECC279E8\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_26.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"0303cfb0d66cee3dd346390580ddea53\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Zm00+3pPEcm0zsG8p2iqPQvtrTxWARxSCVMQszl14x830pf/zld0fEHAl6v/J7YdeZifAgYK24M=\", \n            \"RequestId\": \"2F1D8B14B8F46195\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_27.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"bd9e04a2eed4d2957ba9e92436cb8ffb\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"JtfDy6sJsaCJwzNNSuj59b1DAJnvwRUsxIVXPcvudypIlUTk7CByv/Zu5cRQ6FK1TM+fBHD70BA=\", \n            \"RequestId\": \"CC86CC3DF4DDC42C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_28.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"9998157cd1f74475327e3428d8f2144f\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"sj0O3u6Md5oiMVmDPEs1NQzNa7sdy7vAoeEpY81dSBxZ9Aex6cgA/p5NnhhppTvlnTndPNiDb10=\", \n            \"RequestId\": \"BFC2014C8B57F200\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_29.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"f6140e3e2473a04de3961fd78cdcfe40\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"RPp5i63tP8z+oQPZr69KY1eK1OwAPXPD9BXU1HdmvQLwIq/S6R8Nui5eDaTh4KmMidsnogONYfM=\", \n            \"RequestId\": \"43403A445017CE93\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"31c13ab8e2d1ba711e77d08c901d3be8\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Xp+f2l6fZqckLwPGbSBOOCePrib0OnrQwOfilgkihJPyco11c3Wtok4Lm7K/QOFfeDd/LU1V3kc=\", \n            \"RequestId\": \"335FC6FE0BA8B8BC\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_30.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"85e8afd19ff1bd97ddaa011ec33c1ebb\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Ahx9/55dPxJbwsmwekz2rPT+so4G99o2V+Qft+6dc41Wz+xDOlTxv6hZo/Aje8pH3u1KLDiisww=\", \n            \"RequestId\": \"F2A4FC0F994C8BC5\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_31.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"380f42248ecfeef3e993bdb8648f7881\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"R+AxY0PpAjv6ia4QStds8SVoZNJYrTut9DPG2/eEh0mn2kEWCUn2gVJ/6BpOiPLtGliIGu8jLik=\", \n            \"RequestId\": \"34DBF90CACF01699\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_32.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"48077a74caf88237cc0f25de30fe4640\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"bKNsHrbCzDRdc3iSYOWHzrJgYwQyi7KFL/2+IWR5WbRPhts8AzEFkheiaEDU3iBXSe5fTzK9AyU=\", \n            \"RequestId\": \"63236EF2E576FD0C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_33.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"1143aa0e146adacd0a9c58f4d43721b7\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"qp/roI60HDe7ENnLHIKmcZ+WW9IzbqnaS2OIdrY4EdPYvFBdAgFUSc+xFeeuHyTbHdJ3egfHAmM=\", \n            \"RequestId\": \"94BA9014F8216639\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_34.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"82902c50d3555bf8cdca1ee94027032c\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"gEoEUasdItPrYqDEBnKqrpp5L1ZtsgXCyPsww4E3xLwYZuTSdw7+oUqU24HAGHCet3EwSbwUdRI=\", \n            \"RequestId\": \"C92A13FFBF7FB473\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_35.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"957b0ae07059f1d95344ba38a7e2c5de\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"m7Rf3fVbRm0+IBbpHV/77EGpycbWkwot2xL7yplAowc8YtDQcCOl8YY0sr+1B2GINR3ew0pdU/0=\", \n            \"RequestId\": \"1207CAC55752D828\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_36.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"5af6121935b546fce744b2bc3229d5fd\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"m6/sPKdp/S1QOBngd8+8gO9Ek1R46yrZCFPgEfjZP7b5qK+C7JPjnUVpAx/nv6fPa0n2ktSp9AE=\", \n            \"RequestId\": \"4D2C812CD712564C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_37.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"6c1d802704b810593239b59944cd3205\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"y8bprdPrSd0TS5e29M+nstHxL2dK9j5aVXLaSSoLCNRpS7OPSptT/LLfHwFKNX4qLzrwQkQaUB8=\", \n            \"RequestId\": \"F36DA6AD7E7C2E31\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_38.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"102e3b0b9ed9080f0b8cbeb8d7941d8e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Bj3c1RKnK+aF2VC8BymsFZDv982sFy19zRS1ggmf67NHtPXAHctsNVkO9HtST+MTF0eNOFShVqk=\", \n            \"RequestId\": \"CB63DB4A78312EE4\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_39.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"6f31fde6eac0db6d8cf9d36574edae76\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"JhFm5wKTQ05uYlEqMbPZbQOrijXV/Lw1cfIVYgnxtj/xBwLUtpKVStNPOFPX9J0P6G4OQYpAHxg=\", \n            \"RequestId\": \"A1DE373066AA8630\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"JhFm5wKTQ05uYlEqMbPZbQOrijXV/Lw1cfIVYgnxtj/xBwLUtpKVStNPOFPX9J0P6G4OQYpAHxg=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"A1DE373066AA8630\", \n                \"etag\": \"\\\"6f31fde6eac0db6d8cf9d36574edae76\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"c307018fb49fc0980fc8771eeb6742cc\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"NYQOzV1gEaUqdBQ8TqJH/Y4mzGW1JjSnOpyr6aquEJsJUmPrB+/pMqGBuuE2unXH8zvN0a0SZVU=\", \n            \"RequestId\": \"CF34CDE701525DCB\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_40.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"ffe251ee24979b203f03ffbde9870812\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"/1x8BkaDAVO9kyQYF2csb5izdE8vZ4CYtjWUvhgorSXhYWup7wz6wLAnvt91SinG3mabyt//xd0=\", \n            \"RequestId\": \"9A093022B713DCF4\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"/1x8BkaDAVO9kyQYF2csb5izdE8vZ4CYtjWUvhgorSXhYWup7wz6wLAnvt91SinG3mabyt//xd0=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"9A093022B713DCF4\", \n                \"etag\": \"\\\"ffe251ee24979b203f03ffbde9870812\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_41.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"51646df403d058f25946f72d2b5ec2fc\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"S5zQSd3mBgjIPZ/N8g9DctwPBcvnmZwSM/dR5RQX4Fp+wPvcaiiDSXg2kf1UP7lNPTCOZlgDZqs=\", \n            \"RequestId\": \"E09E422C330CF95B\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"S5zQSd3mBgjIPZ/N8g9DctwPBcvnmZwSM/dR5RQX4Fp+wPvcaiiDSXg2kf1UP7lNPTCOZlgDZqs=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"E09E422C330CF95B\", \n                \"etag\": \"\\\"51646df403d058f25946f72d2b5ec2fc\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_42.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"196f426a3d95fb259671abb5b64cb821\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"8+9xyM/9b9Ftlpy1P0vGFWPB7qBrduUP9p1OK/g4/UWJJhy8DTg/2be1rln2QJet7kXh30fsAMk=\", \n            \"RequestId\": \"4BFD6B36A802B621\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"8+9xyM/9b9Ftlpy1P0vGFWPB7qBrduUP9p1OK/g4/UWJJhy8DTg/2be1rln2QJet7kXh30fsAMk=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"4BFD6B36A802B621\", \n                \"etag\": \"\\\"196f426a3d95fb259671abb5b64cb821\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_43.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"3b1e1b10238bee30f78f99e0f3500afa\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"mochGukzAh7oWfp6GeZyM44RCpwnwg/T4IFKhygtjg1bJu+hExf5OpgBzDupO7nk7gfLbgvTAhM=\", \n            \"RequestId\": \"5804B5614A7F329F\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"mochGukzAh7oWfp6GeZyM44RCpwnwg/T4IFKhygtjg1bJu+hExf5OpgBzDupO7nk7gfLbgvTAhM=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"5804B5614A7F329F\", \n                \"etag\": \"\\\"3b1e1b10238bee30f78f99e0f3500afa\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:29:08 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_44.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"431d4b26b394c1be968be51a1434bb3a\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"ss6Ao8qiMh1h32aJKQcTdgMEkTaZOhd26OU+0QiTsa63rqTRW/dXcduu+x0t4zYYNHL0c1nfVP4=\", \n            \"RequestId\": \"303545496641952D\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"ss6Ao8qiMh1h32aJKQcTdgMEkTaZOhd26OU+0QiTsa63rqTRW/dXcduu+x0t4zYYNHL0c1nfVP4=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"303545496641952D\", \n                \"etag\": \"\\\"431d4b26b394c1be968be51a1434bb3a\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:45 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_45.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"3fba89af0a653de117462fa256ebb7fb\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"+d02fd3+fBnCAPioAzVQuaKhZP6X3zFcTPKIBWq8m9dHuFBo4GzCqsUm3ARb/Wb6rvzJaIMPJ2I=\", \n            \"RequestId\": \"7E801289795EE342\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"+d02fd3+fBnCAPioAzVQuaKhZP6X3zFcTPKIBWq8m9dHuFBo4GzCqsUm3ARb/Wb6rvzJaIMPJ2I=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"7E801289795EE342\", \n                \"etag\": \"\\\"3fba89af0a653de117462fa256ebb7fb\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:46 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_46.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"196f426a3d95fb259671abb5b64cb821\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"ZVv/P4S1Dtl9W/KvfxXQ6l4QetzFCvUT2UQV8sFyqnu1/wvXelZ4NnCOK+uy8jYpNRkM22Pz2OM=\", \n            \"RequestId\": \"798BFF2B7F0394B1\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"ZVv/P4S1Dtl9W/KvfxXQ6l4QetzFCvUT2UQV8sFyqnu1/wvXelZ4NnCOK+uy8jYpNRkM22Pz2OM=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"798BFF2B7F0394B1\", \n                \"etag\": \"\\\"196f426a3d95fb259671abb5b64cb821\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:46 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_47.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"ffe251ee24979b203f03ffbde9870812\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"lKHv5xxVg0fJ58luBBEMcKoqfMBGtrzMIPaS1ckFGk8/BLtPs0LNnyN3ebicsoMAxK776Ik0N4w=\", \n            \"RequestId\": \"CEE49B7A2E8F437A\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"lKHv5xxVg0fJ58luBBEMcKoqfMBGtrzMIPaS1ckFGk8/BLtPs0LNnyN3ebicsoMAxK776Ik0N4w=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"CEE49B7A2E8F437A\", \n                \"etag\": \"\\\"ffe251ee24979b203f03ffbde9870812\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:46 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_48.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"79a5d6bfe5444b4c326fc27db439dfa0\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"WQs9g8sXtaq+b5cwdH/MB0tsCjlAMJHKZeY2YVrzO2xeDuS8tXLfUhthMw6cPR3M1euVi3+vwpE=\", \n            \"RequestId\": \"446260E896C426FF\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"0\", \n                \"x-amz-id-2\": \"WQs9g8sXtaq+b5cwdH/MB0tsCjlAMJHKZeY2YVrzO2xeDuS8tXLfUhthMw6cPR3M1euVi3+vwpE=\", \n                \"server\": \"AmazonS3\", \n                \"x-amz-request-id\": \"446260E896C426FF\", \n                \"etag\": \"\\\"79a5d6bfe5444b4c326fc27db439dfa0\\\"\", \n                \"date\": \"Thu, 25 Aug 2016 03:30:46 GMT\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"8f44b2aa328e1aa036579db62fa8c017\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"hUyiXTTy4WsLGE9FwDzgulbD3aj/6ivyeAgsfZ3KP0fyXEB+LkQs2UdH/iNa8OCtJ0xa5lrF+K4=\", \n            \"RequestId\": \"DFBCC402A76C7432\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_6.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"b880bbf96e4692c2a23439a232c59845\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"DJpqruCU71BRv23pamMDj0ZATaduJTa06XO9okFC9Tfw+nAOxvP+db935KVF6o+pXB1pBOP8dDg=\", \n            \"RequestId\": \"C72D8E1E8C1DA9F5\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_7.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"d55e894bb0080fb49e888b420e1b0520\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"Uu/hrcOi1M4iwB2ZRv4vFCiuMmx+nMRSlrjkaeLSk4hKksrQt9DsjoelEBmXhWAaGg7wkLxEVGo=\", \n            \"RequestId\": \"E0EA066ACCB1980A\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"598bacfbf596e97804d9363cfd9bd581\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"jczWSmPzEY13vWHRxNXwfMNnDMRm5JFCgdkkk+DPmTzZRT53RjxqRdon1IYmdz1hSQtgyG/NmAU=\", \n            \"RequestId\": \"F5EA56E331AAB17D\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_9.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"3d8594493e6e63cb3e4271a47db3ff04\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"MDJ856TXiVlteCjlVCJKf4tSlf6hrVy37qd5Hq2l1ECf5mtPXOFIV2aHMbBM4wsYBw/gFXYwEoI=\", \n            \"RequestId\": \"ED811ABDFD6014EB\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"5a9c3f2b-b163-5a8c-b4b7-6f701e2ec4ee\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"5a9c3f2b-b163-5a8c-b4b7-6f701e2ec4ee\", \n                \"date\": \"Tue, 20 Sep 2016 21:41:32 GMT\", \n                \"content-length\": \"319\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"Subscriptions\": []\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_2.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"c31b8bb1-05e2-52c5-8c71-dbeaaa6a1b4e\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"c31b8bb1-05e2-52c5-8c71-dbeaaa6a1b4e\",\n                \"date\": \"Tue, 20 Sep 2016 21:42:32 GMT\",\n                \"content-length\": \"720\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"Subscriptions\": [\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::1\",\n                \"SubscriptionArn\": \"arn:aws:sns:::1\"\n            },\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::with-filters\",\n                \"SubscriptionArn\": \"arn:aws:sns:::with-filters:subscription1\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_3.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"4b297fb0-32e1-5466-8b32-2feb82122ee6\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"4b297fb0-32e1-5466-8b32-2feb82122ee6\",\n                \"date\": \"Tue, 20 Sep 2016 21:48:34 GMT\",\n                \"content-length\": \"720\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"Subscriptions\": [\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::1\",\n                \"SubscriptionArn\": \"arn:aws:sns:::1:1833de9b-d325-4610-bc69-139311499f5d\"\n            },\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::with-filters\",\n                \"SubscriptionArn\": \"arn:aws:sns:::with-filters:subscription1\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"d1ee6794-b714-55ec-8434-37cf06b42cdc\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"d1ee6794-b714-55ec-8434-37cf06b42cdc\", \n                \"date\": \"Tue, 20 Sep 2016 21:51:28 GMT\", \n                \"content-length\": \"319\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"Subscriptions\": []\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_5.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"4d8b41db-39d2-57af-b9e9-1180883901a2\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"4d8b41db-39d2-57af-b9e9-1180883901a2\",\n                \"date\": \"Tue, 20 Sep 2016 21:52:42 GMT\",\n                \"content-length\": \"720\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"Subscriptions\": [\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::1\",\n                \"SubscriptionArn\": \"arn:aws:sns:::1:57ae90d2-0fe8-4204-85a3-bcd4848545f6\"\n            },\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::with-filters\",\n                \"SubscriptionArn\": \"arn:aws:sns:::with-filters:subscription2\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_6.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"e51e3ca3-a2ca-5748-98dd-6cf813310bcc\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"e51e3ca3-a2ca-5748-98dd-6cf813310bcc\",\n                \"date\": \"Tue, 20 Sep 2016 21:52:58 GMT\",\n                \"content-length\": \"720\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"Subscriptions\": [\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::1\",\n                \"SubscriptionArn\": \"arn:aws:sns:::1:8e52fdf5-49ec-4fab-93d8-29502b2899d4\"\n            },\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::with-filters\",\n                \"SubscriptionArn\": \"arn:aws:sns:::with-filters:subscription2\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_7.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"1d25a7ba-9a6b-53cb-b029-f7e12b951045\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"1d25a7ba-9a6b-53cb-b029-f7e12b951045\",\n                \"date\": \"Tue, 20 Sep 2016 21:53:01 GMT\",\n                \"content-length\": \"720\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"Subscriptions\": [\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::1\",\n                \"SubscriptionArn\": \"arn:aws:sns:::1:e62db82e-757c-4356-ab9b-a2441b0662c8\"\n            },\n            {\n                \"Owner\": \"123456789123\",\n                \"Endpoint\": \"arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1\",\n                \"Protocol\": \"lambda\",\n                \"TopicArn\": \"arn:aws:sns:::with-filters\",\n                \"SubscriptionArn\": \"arn:aws:sns:::with-filters:subscription2\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_8.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"99b53069-3e2a-50ef-a5a0-60328c34a964\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"99b53069-3e2a-50ef-a5a0-60328c34a964\", \n                \"date\": \"Tue, 20 Sep 2016 21:53:34 GMT\", \n                \"content-length\": \"319\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"Subscriptions\": []\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.SetSubscriptionAttributes_1.json",
    "content": "{\n  \"status_code\": 200,\n  \"data\": {\n    \"ResponseMetadata\": {\n      \"RequestId\": \"0fd08270-517b-5524-b434-d0bf5c813e24\",\n      \"HTTPStatusCode\": 200,\n      \"HTTPHeaders\": {\n        \"x-amzn-requestid\": \"0fd08270-517b-5524-b434-d0bf5c813e24\",\n        \"content-type\": \"text/xml\",\n        \"content-length\": \"229\",\n        \"date\": \"Tue, 09 Jan 2018 18:36:42 GMT\"\n      },\n      \"RetryAttempts\": 0\n    }\n  }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"ba6b9df2-b2c7-5c29-86c9-cda91d89fa8b\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ba6b9df2-b2c7-5c29-86c9-cda91d89fa8b\",\n                \"date\": \"Tue, 20 Sep 2016 21:41:33 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::with-filters\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_2.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"5fc669e7-9952-5cd5-8a41-39bc36d8d93c\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"5fc669e7-9952-5cd5-8a41-39bc36d8d93c\",\n                \"date\": \"Tue, 20 Sep 2016 21:42:34 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::1:1833de9b-d325-4610-bc69-139311499f5d\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_3.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"a735afa5-04c9-5ddc-b6fa-fffeb43afd23\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"a735afa5-04c9-5ddc-b6fa-fffeb43afd23\",\n                \"date\": \"Tue, 20 Sep 2016 21:48:35 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::with-filters:221eb6cc-2fcb-496c-87c2-3af0f81cf34e\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_4.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"4f2c7f44-73ba-5f13-bd94-2f1fc21b4ca1\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"4f2c7f44-73ba-5f13-bd94-2f1fc21b4ca1\",\n                \"date\": \"Tue, 20 Sep 2016 21:51:29 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::1:57ae90d2-0fe8-4204-85a3-bcd4848545f6\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_5.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"e682d70b-5a4f-51e7-9791-8750eba3af24\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"e682d70b-5a4f-51e7-9791-8750eba3af24\",\n                \"date\": \"Tue, 20 Sep 2016 21:52:44 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::with-filters:8e52fdf5-49ec-4fab-93d8-29502b2899d4\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_6.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0,\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"dccdb21f-87c2-5b69-8e47-e244363ec978\",\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"dccdb21f-87c2-5b69-8e47-e244363ec978\",\n                \"date\": \"Tue, 20 Sep 2016 21:53:00 GMT\",\n                \"content-length\": \"354\",\n                \"content-type\": \"text/xml\"\n            }\n        },\n        \"SubscriptionArn\": \"arn:aws:sns:::1:e62db82e-757c-4356-ab9b-a2441b0662c8\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8679c068-9d47-5867-917a-903332cf01ec\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"8679c068-9d47-5867-917a-903332cf01ec\", \n                \"date\": \"Tue, 20 Sep 2016 21:42:33 GMT\", \n                \"content-length\": \"201\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0eade3ea-75e0-53c3-a2ca-b3b1c5133943\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"0eade3ea-75e0-53c3-a2ca-b3b1c5133943\", \n                \"date\": \"Tue, 20 Sep 2016 21:48:34 GMT\", \n                \"content-length\": \"201\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_3.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"e76604b6-a417-50eb-ac0d-54ed15fc96e6\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"e76604b6-a417-50eb-ac0d-54ed15fc96e6\", \n                \"date\": \"Tue, 20 Sep 2016 21:52:43 GMT\", \n                \"content-length\": \"201\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_4.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"598228fc-f2d6-55f0-ac86-78a7432df974\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"598228fc-f2d6-55f0-ac86-78a7432df974\", \n                \"date\": \"Tue, 20 Sep 2016 21:52:58 GMT\", \n                \"content-length\": \"201\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_5.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RetryAttempts\": 0, \n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"4e12e243-7bb1-5689-8a5a-b218ca4fb507\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"4e12e243-7bb1-5689-8a5a-b218ca4fb507\", \n                \"date\": \"Tue, 20 Sep 2016 21:53:01 GMT\", \n                \"content-length\": \"201\", \n                \"content-type\": \"text/xml\"\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws/sts.GetCallerIdentity_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserId\": \"RANDOMSTRING12314\",\n        \"Account\": \"12345\",\n        \"Arn\": \"arn:aws:iam::12345:user/test\",\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n                \"content-type\": \"text/xml\",\n                \"content-length\": \"401\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/apigateway.GetApiKeys_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"Api Key for rdrde6pecd\",\n                \"enabled\": true,\n                \"stageKeys\": [\n                    \"rdrde6pecd/devor\"\n                ],\n                \"lastUpdatedDate\": 1470384739,\n                \"createdDate\": 1470384739,\n                \"id\": \"W9QTptojpE3bsg816Rrjh4was83amtaAx5s6NXaAl\",\n                \"name\": \"devor_rdrde6pecd\"\n            },\n            {\n                \"description\": \"test\",\n                \"enabled\": true,\n                \"stageKeys\": [],\n                \"lastUpdatedDate\": 1472205619,\n                \"createdDate\": 1472126924,\n                \"id\": \"BbMa34BFOj6fKevBXPhUc61L3R2eh4sz7QzC6NWK\",\n                \"name\": \"test\"\n            },\n            {\n                \"description\": \"test2\",\n                \"enabled\": true,\n                \"stageKeys\": [\n                    \"eoeoeo/test\"\n                ],\n                \"lastUpdatedDate\": 1472205619,\n                \"createdDate\": 1472126924,\n                \"id\": \"CbMa34BFOj6fKevBXPhUc61L3R2eh4sz7QzC6NWK\",\n                \"name\": \"test2\"\n            }\n       ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/apigateway.GetRestApis_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"hackathon-starter-devo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 51\n                }, \n                \"id\": \"11j2q35yf8\", \n                \"name\": \"hackathon-starter-devo\"\n            }, \n            {\n                \"description\": \"poops2js-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 8\n                }, \n                \"id\": \"1yae9gfwab\", \n                \"name\": \"poops2js-dev\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"hackathon-starter-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 7, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 46\n                }, \n                \"id\": \"7s8qhskdc2\", \n                \"name\": \"hackathon-starter-dev\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"issue110-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 2, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 29\n                }, \n                \"id\": \"bo02obhd7c\", \n                \"name\": \"issue110-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 14\n                }, \n                \"id\": \"cc1o38ldtb\", \n                \"name\": \"serverless-imagehost-nob\"\n            }, \n            {\n                \"description\": \"oort-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 28\n                }, \n                \"id\": \"cdvt3njuhk\", \n                \"name\": \"oort-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-devuh Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"ezjhledye7\", \n                \"name\": \"serverless-imagehost-devuh\"\n            }, \n            {\n                \"description\": \"website-production Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 7\n                }, \n                \"id\": \"fhbea4d5o6\", \n                \"name\": \"website-production\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"website-derp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 40, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 7, \n                    \"minute\": 45\n                }, \n                \"id\": \"i75y1kwi47\", \n                \"name\": \"website-derp\"\n            }, \n            {\n                \"description\": \"zappa-testerinooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 11\n                }, \n                \"id\": \"ijs8po6ul8\", \n                \"name\": \"zappa-testerinooo\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-dever Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 6\n                }, \n                \"id\": \"jr75b74ip8\", \n                \"name\": \"serverless-imagehost-dever\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"flask-test-eventer Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 26, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 0\n                }, \n                \"id\": \"lsw93ibofa\", \n                \"name\": \"flask-test-eventer\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"demo-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 8, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 17\n                }, \n                \"id\": \"m8atxlc1j9\", \n                \"name\": \"demo-dev\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"zappa-ttt666 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 6, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 2, \n                    \"minute\": 0\n                }, \n                \"id\": \"mj9gnteqc9\", \n                \"name\": \"zappa-ttt666\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"restful-demo-dev4 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 3, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 19\n                }, \n                \"id\": \"oo8j6uj6i1\", \n                \"name\": \"restful-demo-dev4\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"baby-flask-devor Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 17\n                }, \n                \"id\": \"rdrde6pecd\", \n                \"name\": \"baby-flask-devor\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-nob2 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 5, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 54\n                }, \n                \"id\": \"s6svfqprs6\", \n                \"name\": \"serverless-imagehost-nob2\"\n            }, \n            {\n                \"description\": \"zappa-tester Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 31\n                }, \n                \"id\": \"sibzbaomqb\", \n                \"name\": \"zappa-tester\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodope Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 9, \n                    \"minute\": 46\n                }, \n                \"id\": \"sx5ifzldel\", \n                \"name\": \"django-helloworld-prodope\"\n            }, \n            {\n                \"description\": \"zappa-testerinoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 0\n                }, \n                \"id\": \"tkfhn7uh1j\", \n                \"name\": \"zappa-testerinoo\"\n            }, \n            {\n                \"description\": \"1453992953 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 55\n                }, \n                \"id\": \"tpwx2chyc9\", \n                \"name\": \"1453992953\"\n            }, \n            {\n                \"description\": \"flask-blog-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 20, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"u5k6g8qxu4\", \n                \"name\": \"flask-blog-dev\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"flask-test-test Zappa\", \n                \"createdDate\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 46\n                }, \n                \"id\": \"vna1tr18s7\", \n                \"name\": \"flask-test-test\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"zappa-ttt222 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 13, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 45\n                }, \n                \"id\": \"vzxj8vvejc\", \n                \"name\": \"zappa-ttt222\"\n            }, \n            {\n                \"description\": \"django-helloworld-prodo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 4, \n                    \"second\": 18, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 8, \n                    \"minute\": 48\n                }, \n                \"id\": \"wx029jbtva\", \n                \"name\": \"django-helloworld-prodo\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"zappa-testerino Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 25, \n                    \"minute\": 44\n                }, \n                \"id\": \"yxm125wqua\", \n                \"name\": \"zappa-testerino\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }, \n            {\n                \"description\": \"serverless-imagehost-demodemo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 10\n                }, \n                \"id\": \"zhrsy6zhl7\", \n                \"name\": \"serverless-imagehost-demodemo\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"91c49bff-5ffb-11e6-afc2-854f31b98fbf\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"91c49bff-5ffb-11e6-afc2-854f31b98fbf\", \n                \"date\": \"Thu, 11 Aug 2016 19:41:16 GMT\", \n                \"content-length\": \"6585\", \n                \"content-type\": \"application/json\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/events.DescribeRule_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ScheduleExpression\": \"rate(1 minute)\", \n        \"Name\": \"app.event_me\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"926cea0c-5ffb-11e6-9780-4b9d2dcb5a98\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"926cea0c-5ffb-11e6-9780-4b9d2dcb5a98\", \n                \"date\": \"Thu, 11 Aug 2016 19:41:17 GMT\", \n                \"content-length\": \"236\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"RoleArn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"State\": \"ENABLED\", \n        \"Arn\": \"arn:aws:events:us-east-1:724336686645:rule/app.event_me\", \n        \"Description\": \"app.event_me\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/events.ListRuleNamesByTarget_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"925b84b7-5ffb-11e6-9780-4b9d2dcb5a98\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"925b84b7-5ffb-11e6-9780-4b9d2dcb5a98\", \n                \"date\": \"Thu, 11 Aug 2016 19:41:17 GMT\", \n                \"content-length\": \"30\", \n                \"content-type\": \"application/x-amz-json-1.1\"\n            }\n        }, \n        \"RuleNames\": [\n            \"app.event_me\"\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/events.ListRules_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Rules\": [\n            {\n                \"ScheduleExpression\": \"rate(5 minutes)\", \n                \"Name\": \"zappa-keep-warm-zappa-ttt666\", \n                \"RoleArn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"State\": \"ENABLED\", \n                \"Arn\": \"arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666\", \n                \"Description\": \"Zappa Keep Warm - zappa-ttt666\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"afe859ba-28f4-11e6-aa28-4d9f2eb25de5\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/lambda.GetFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/baby-flask-devor-0ba7b1e0-d5f7-4c97-8505-0c87bc14acfd?x-amz-security-token=FQoDYXdzEEwaDIv4tcF%2F2xSicOq1SiK3A7fgryt%2BF1cKCoNU1pX0xyK3jEDV81HGpXAHhAYMD4R7XbnWN%2BeUfjieAaGkgoPbKkr2RZmA2iXjsazEdyq7sZIpZAo5VkhYSoSy1PBm0Apc6txwmnLB18n5WV5Ulyq90tdm0SplVgmaww%2FxHt9KgWMfRkl8uz7Zw5JfLz%2FPadYT7e4ZkJmKEL4upYSgBxnXXDgU3A1IafXfACcOd5GJ1JrOVR%2BYO4Kqud%2F6Q3BWhDYcLAFwO7xUZlaI2hzWRYxlVQk1wbNvIq7ZX98GAZzxnZFGhqoSs0xMo4wZ1kAPtwfBt%2BsquluiCQt9EntWPZmyfUvBktE0JKbaEl%2Fly01iL34mLB52wdCXYeCSid6xEHGrRiBgbUnuHGqMmXls5%2FS7PF0wbWZKsibdXylMrup%2F1sEqYS5r33yaS8em9kBcjHhbbkiBN2oYiCHB4B4xCe01hAiGUkx8DI0OZGCNn8ljyutKvBX1dlpU3LbxM%2F17CD9VVdXBq7Vp8SkNTckK284o%2Fa4a1PUyCCyYCq7SJVvJ72mWjmzNx0NYDGvlUPi4IUhQxm88874Pi6SFt7Ql8eir1FJPe3fXwagorZGzvQU%3D&AWSAccessKeyId=ASIAIPXCFPJ7VAQMZYGQ&Expires=1470945074&Signature=4c9u5HvYw6eVtgbuyT5teEB07gk%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"$LATEST\", \n            \"CodeSha256\": \"U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=\", \n            \"FunctionName\": \"baby-flask-devor\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 2882611, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-08-11T19:05:11.100+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"909b374b-5ffb-11e6-a630-0daa311dcaa5\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 11 Aug 2016 19:41:14 GMT\", \n                \"x-amzn-requestid\": \"909b374b-5ffb-11e6-a630-0daa311dcaa5\", \n                \"content-length\": \"1472\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/lambda.ListVersionsByFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9089f947-5ffb-11e6-8e26-cfa6e63f64ef\", \n            \"HTTPHeaders\": {\n                \"date\": \"Thu, 11 Aug 2016 19:41:13 GMT\", \n                \"x-amzn-requestid\": \"9089f947-5ffb-11e6-8e26-cfa6e63f64ef\", \n                \"content-length\": \"1582\", \n                \"content-type\": \"application/json\", \n                \"connection\": \"keep-alive\"\n            }\n        }, \n        \"Versions\": [\n            {\n                \"Version\": \"$LATEST\", \n                \"CodeSha256\": \"U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=\", \n                \"FunctionName\": \"baby-flask-devor\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 2882611, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:$LATEST\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-11T19:05:11.100+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"9\", \n                \"CodeSha256\": \"co4evUvVhHBjrUhoV6ZiDI5L20TDGStV1FUZrr7CK6M=\", \n                \"FunctionName\": \"baby-flask-devor\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 2881914, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:9\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-11T01:17:51.058+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"10\", \n                \"CodeSha256\": \"U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=\", \n                \"FunctionName\": \"baby-flask-devor\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 2882611, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:10\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-08-11T19:05:12.968+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/monitoring.GetMetricStatistics_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Datapoints\": [\n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 29\n                }, \n                \"Sum\": 14.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 24.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 19, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 1, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 24.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 41\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 44.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 25.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 1, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 24.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 47.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 5\n                }, \n                \"Sum\": 6.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 48.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 49.0, \n                \"Unit\": \"Count\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9113e934-5ffb-11e6-ac84-f3a13624f777\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9113e934-5ffb-11e6-ac84-f3a13624f777\", \n                \"date\": \"Thu, 11 Aug 2016 19:41:15 GMT\", \n                \"content-length\": \"7586\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"Label\": \"Invocations\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_aws_status/monitoring.GetMetricStatistics_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Datapoints\": [\n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 19, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 1, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 10, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 8, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 7, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 4, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 53\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 1, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 6, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 3, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 9, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 29\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 10, \n                    \"minute\": 5\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 17\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }, \n            {\n                \"Timestamp\": {\n                    \"hour\": 5, \n                    \"__class__\": \"datetime\", \n                    \"month\": 8, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 11, \n                    \"minute\": 41\n                }, \n                \"Sum\": 0.0, \n                \"Unit\": \"Count\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9129e2da-5ffb-11e6-81a6-1b774a17dc99\", \n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"9129e2da-5ffb-11e6-81a6-1b774a17dc99\", \n                \"date\": \"Thu, 11 Aug 2016 19:41:15 GMT\", \n                \"content-length\": \"7528\", \n                \"content-type\": \"text/xml\"\n            }\n        }, \n        \"Label\": \"Errors\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_cognito_triggers/cognito-idp.DescribeUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserPool\": {\n            \"Id\": \"us-east-1_9jUv74DH8\",\n            \"Name\": \"Zappa-Test\",\n            \"Policies\": {\n                \"PasswordPolicy\": {\n                    \"MinimumLength\": 8,\n                    \"RequireUppercase\": true,\n                    \"RequireLowercase\": true,\n                    \"RequireNumbers\": true,\n                    \"RequireSymbols\": true\n                }\n            },\n            \"LambdaConfig\": {\n                \"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n            },\n            \"LastModifiedDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 23,\n                \"second\": 34,\n                \"microsecond\": 969000\n            },\n            \"CreationDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 15,\n                \"second\": 36,\n                \"microsecond\": 195000\n            },\n            \"SchemaAttributes\": [\n                {\n                    \"Name\": \"sub\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": false,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"1\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"given_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"family_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"middle_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"nickname\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"preferred_username\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"profile\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"picture\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"website\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"gender\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"birthdate\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"10\",\n                        \"MaxLength\": \"10\"\n                    }\n                },\n                {\n                    \"Name\": \"zoneinfo\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"locale\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"address\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"updated_at\",\n                    \"AttributeDataType\": \"Number\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"NumberAttributeConstraints\": {\n                        \"MinValue\": \"0\"\n                    }\n                }\n            ],\n            \"AutoVerifiedAttributes\": [\n                \"email\"\n            ],\n            \"VerificationMessageTemplate\": {\n                \"DefaultEmailOption\": \"CONFIRM_WITH_CODE\"\n            },\n            \"MfaConfiguration\": \"OFF\",\n            \"EstimatedNumberOfUsers\": 0,\n            \"EmailConfiguration\": {},\n            \"UserPoolTags\": {},\n            \"AdminCreateUserConfig\": {\n                \"AllowAdminCreateUserOnly\": false,\n                \"UnusedAccountValidityDays\": 7\n            }\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:31 GMT\",\n                \"x-amzn-requestid\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n                \"content-length\": \"4132\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_cognito_triggers/cognito-idp.UpdateUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\",\n                \"x-amzn-requestid\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n                \"content-length\": \"2\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_cognito_triggers/lambda.AddPermission_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae983eab-d365-11e7-ba13-8135763ed363\",\n            \"HTTPStatusCode\": 201,\n            \"HTTPHeaders\": {\n                \"date\": \"Mon, 27 Nov 2017 11:25:33 GMT\",\n                \"content-type\": \"application/json\",\n                \"content-length\": \"361\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"ae983eab-d365-11e7-ba13-8135763ed363\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"Statement\": \"{\\\"Sid\\\":\\\"9UFS02MW\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"cognito-idp.amazonaws.com\\\"},\\\"Action\\\":\\\"lambda:InvokeFunction\\\",\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\\\",\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:cognito-idp:us-east-1:12345:userpool/us-east-1_9jUv74DH8\\\"}}}\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cli_cognito_triggers/sts.GetCallerIdentity_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserId\": \"RANDOMSTRING12314\",\n        \"Account\": \"12345\",\n        \"Arn\": \"arn:aws:iam::12345:user/test\",\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n                \"content-type\": \"text/xml\",\n                \"content-length\": \"401\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger/cognito-idp.DescribeUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserPool\": {\n            \"Id\": \"us-east-1_9jUv74DH8\",\n            \"Name\": \"Zappa-Test\",\n            \"Policies\": {\n                \"PasswordPolicy\": {\n                    \"MinimumLength\": 8,\n                    \"RequireUppercase\": true,\n                    \"RequireLowercase\": true,\n                    \"RequireNumbers\": true,\n                    \"RequireSymbols\": true\n                }\n            },\n            \"LambdaConfig\": {\n                \"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n            },\n            \"LastModifiedDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 23,\n                \"second\": 34,\n                \"microsecond\": 969000\n            },\n            \"CreationDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 15,\n                \"second\": 36,\n                \"microsecond\": 195000\n            },\n            \"SchemaAttributes\": [\n                {\n                    \"Name\": \"sub\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": false,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"1\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"given_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"family_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"middle_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"nickname\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"preferred_username\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"profile\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"picture\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"website\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"gender\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"birthdate\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"10\",\n                        \"MaxLength\": \"10\"\n                    }\n                },\n                {\n                    \"Name\": \"zoneinfo\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"locale\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"address\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"updated_at\",\n                    \"AttributeDataType\": \"Number\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"NumberAttributeConstraints\": {\n                        \"MinValue\": \"0\"\n                    }\n                }\n            ],\n            \"AutoVerifiedAttributes\": [\n                \"email\"\n            ],\n            \"VerificationMessageTemplate\": {\n                \"DefaultEmailOption\": \"CONFIRM_WITH_CODE\"\n            },\n            \"MfaConfiguration\": \"OFF\",\n            \"EstimatedNumberOfUsers\": 0,\n            \"EmailConfiguration\": {},\n            \"UserPoolTags\": {},\n            \"AdminCreateUserConfig\": {\n                \"AllowAdminCreateUserOnly\": false,\n                \"UnusedAccountValidityDays\": 7\n            }\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:31 GMT\",\n                \"x-amzn-requestid\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n                \"content-length\": \"4132\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger/cognito-idp.UpdateUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\",\n                \"x-amzn-requestid\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n                \"content-length\": \"2\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger/lambda.AddPermission_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae983eab-d365-11e7-ba13-8135763ed363\",\n            \"HTTPStatusCode\": 201,\n            \"HTTPHeaders\": {\n                \"date\": \"Mon, 27 Nov 2017 11:25:33 GMT\",\n                \"content-type\": \"application/json\",\n                \"content-length\": \"361\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"ae983eab-d365-11e7-ba13-8135763ed363\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"Statement\": \"{\\\"Sid\\\":\\\"9UFS02MW\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"cognito-idp.amazonaws.com\\\"},\\\"Action\\\":\\\"lambda:InvokeFunction\\\",\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\\\",\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:cognito-idp:us-east-1:12345:userpool/us-east-1_9jUv74DH8\\\"}}}\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger/sts.GetCallerIdentity_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserId\": \"RANDOMSTRING12314\",\n        \"Account\": \"12345\",\n        \"Arn\": \"arn:aws:iam::12345:user/test\",\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n                \"content-type\": \"text/xml\",\n                \"content-length\": \"401\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing/cognito-idp.DescribeUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserPool\": {\n            \"Id\": \"us-east-1_9jUv74DH8\",\n            \"Name\": \"Zappa-Test\",\n            \"Policies\": {\n                \"PasswordPolicy\": {\n                    \"MinimumLength\": 8,\n                    \"RequireUppercase\": true,\n                    \"RequireLowercase\": true,\n                    \"RequireNumbers\": true,\n                    \"RequireSymbols\": true\n                }\n            },\n            \"LambdaConfig\": {\n                \"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n            },\n            \"LastModifiedDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 23,\n                \"second\": 34,\n                \"microsecond\": 969000\n            },\n            \"CreationDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 15,\n                \"second\": 36,\n                \"microsecond\": 195000\n            },\n            \"SchemaAttributes\": [\n                {\n                    \"Name\": \"sub\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": false,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"1\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"given_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"family_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"middle_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"nickname\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"preferred_username\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"profile\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"picture\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"website\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"gender\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"birthdate\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"10\",\n                        \"MaxLength\": \"10\"\n                    }\n                },\n                {\n                    \"Name\": \"zoneinfo\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"locale\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"address\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"updated_at\",\n                    \"AttributeDataType\": \"Number\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"NumberAttributeConstraints\": {\n                        \"MinValue\": \"0\"\n                    }\n                }\n            ],\n            \"AutoVerifiedAttributes\": [\n                \"email\"\n            ],\n            \"VerificationMessageTemplate\": {\n                \"DefaultEmailOption\": \"CONFIRM_WITH_CODE\"\n            },\n            \"MfaConfiguration\": \"OFF\",\n            \"EstimatedNumberOfUsers\": 0,\n            \"EmailConfiguration\": {},\n            \"UserPoolTags\": {},\n            \"AdminCreateUserConfig\": {\n                \"AllowAdminCreateUserOnly\": false,\n                \"UnusedAccountValidityDays\": 7\n            },\n            \"LambdaConfig\": {\n\t\t\"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n\t    }\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:31 GMT\",\n                \"x-amzn-requestid\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n                \"content-length\": \"4132\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing/cognito-idp.UpdateUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\",\n                \"x-amzn-requestid\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n                \"content-length\": \"2\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing/lambda.AddPermission_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae983eab-d365-11e7-ba13-8135763ed363\",\n            \"HTTPStatusCode\": 201,\n            \"HTTPHeaders\": {\n                \"date\": \"Mon, 27 Nov 2017 11:25:33 GMT\",\n                \"content-type\": \"application/json\",\n                \"content-length\": \"361\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"ae983eab-d365-11e7-ba13-8135763ed363\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"Statement\": \"{\\\"Sid\\\":\\\"9UFS02MW\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"cognito-idp.amazonaws.com\\\"},\\\"Action\\\":\\\"lambda:InvokeFunction\\\",\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\\\",\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:cognito-idp:us-east-1:12345:userpool/us-east-1_9jUv74DH8\\\"}}}\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing/sts.GetCallerIdentity_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserId\": \"RANDOMSTRING12314\",\n        \"Account\": \"12345\",\n        \"Arn\": \"arn:aws:iam::12345:user/test\",\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n                \"content-type\": \"text/xml\",\n                \"content-length\": \"401\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/cognito-idp.DescribeUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserPool\": {\n            \"Id\": \"us-east-1_9jUv74DH8\",\n            \"Name\": \"Zappa-Test\",\n            \"Policies\": {\n                \"PasswordPolicy\": {\n                    \"MinimumLength\": 8,\n                    \"RequireUppercase\": true,\n                    \"RequireLowercase\": true,\n                    \"RequireNumbers\": true,\n                    \"RequireSymbols\": true,\n                    \"TemporaryPasswordValidityDays\": 7\n                }\n            },\n            \"LambdaConfig\": {\n                \"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n            },\n            \"LastModifiedDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 23,\n                \"second\": 34,\n                \"microsecond\": 969000\n            },\n            \"CreationDate\": {\n                \"__class__\": \"datetime\",\n                \"year\": 2017,\n                \"month\": 11,\n                \"day\": 27,\n                \"hour\": 11,\n                \"minute\": 15,\n                \"second\": 36,\n                \"microsecond\": 195000\n            },\n            \"SchemaAttributes\": [\n                {\n                    \"Name\": \"sub\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": false,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"1\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"given_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"family_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"middle_name\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"nickname\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"preferred_username\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"profile\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"picture\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"website\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": true,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"email_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"gender\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"birthdate\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"10\",\n                        \"MaxLength\": \"10\"\n                    }\n                },\n                {\n                    \"Name\": \"zoneinfo\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"locale\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"phone_number_verified\",\n                    \"AttributeDataType\": \"Boolean\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false\n                },\n                {\n                    \"Name\": \"address\",\n                    \"AttributeDataType\": \"String\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"StringAttributeConstraints\": {\n                        \"MinLength\": \"0\",\n                        \"MaxLength\": \"2048\"\n                    }\n                },\n                {\n                    \"Name\": \"updated_at\",\n                    \"AttributeDataType\": \"Number\",\n                    \"DeveloperOnlyAttribute\": false,\n                    \"Mutable\": true,\n                    \"Required\": false,\n                    \"NumberAttributeConstraints\": {\n                        \"MinValue\": \"0\"\n                    }\n                }\n            ],\n            \"AutoVerifiedAttributes\": [\n                \"email\"\n            ],\n            \"VerificationMessageTemplate\": {\n                \"DefaultEmailOption\": \"CONFIRM_WITH_CODE\"\n            },\n            \"MfaConfiguration\": \"OFF\",\n            \"EstimatedNumberOfUsers\": 0,\n            \"EmailConfiguration\": {},\n            \"UserPoolTags\": {},\n            \"AdminCreateUserConfig\": {\n                \"AllowAdminCreateUserOnly\": false\n            },\n            \"LambdaConfig\": {\n\t\t\"PreSignUp\": \"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\"\n\t    }\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:31 GMT\",\n                \"x-amzn-requestid\": \"ada5049e-d365-11e7-9a5a-2b0966933efa\",\n                \"content-length\": \"4132\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/cognito-idp.UpdateUserPool_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"content-type\": \"application/x-amz-json-1.1\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\",\n                \"x-amzn-requestid\": \"adc3afdf-d365-11e7-b51f-abb88dfb5619\",\n                \"content-length\": \"2\",\n                \"connection\": \"keep-alive\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/lambda.AddPermission_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae983eab-d365-11e7-ba13-8135763ed363\",\n            \"HTTPStatusCode\": 201,\n            \"HTTPHeaders\": {\n                \"date\": \"Mon, 27 Nov 2017 11:25:33 GMT\",\n                \"content-type\": \"application/json\",\n                \"content-length\": \"361\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"ae983eab-d365-11e7-ba13-8135763ed363\"\n            },\n            \"RetryAttempts\": 0\n        },\n        \"Statement\": \"{\\\"Sid\\\":\\\"9UFS02MW\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"cognito-idp.amazonaws.com\\\"},\\\"Action\\\":\\\"lambda:InvokeFunction\\\",\\\"Resource\\\":\\\"arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test\\\",\\\"Condition\\\":{\\\"ArnLike\\\":{\\\"AWS:SourceArn\\\":\\\"arn:aws:cognito-idp:us-east-1:12345:userpool/us-east-1_9jUv74DH8\\\"}}}\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/sts.GetCallerIdentity_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"UserId\": \"RANDOMSTRING12314\",\n        \"Account\": \"12345\",\n        \"Arn\": \"arn:aws:iam::12345:user/test\",\n        \"ResponseMetadata\": {\n            \"RequestId\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"x-amzn-requestid\": \"ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8\",\n                \"content-type\": \"text/xml\",\n                \"content-length\": \"401\",\n                \"date\": \"Mon, 27 Nov 2017 11:25:32 GMT\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.AbortMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204,\n            \"RetryAttempts\": 0,\n            \"HostId\": \"J61KH771JIvmpimO/UbQq7mpaBTi8isqV6ZB09PZT/acUplPw86JfzN2d3ajuAAqxL1pDq8X41U=\",\n            \"RequestId\": \"1D3CFD82C46C3516\",\n            \"HTTPHeaders\": {\n                \"x-amz-id-2\": \"J61KH771JIvmpimO/UbQq7mpaBTi8isqV6ZB09PZT/acUplPw86JfzN2d3ajuAAqxL1pDq8X41U=\",\n                \"date\": \"Tue, 08 Nov 2016 23:19:25 GMT\",\n                \"x-amz-request-id\": \"1D3CFD82C46C3516\",\n                \"server\": \"AmazonS3\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.CompleteMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"ETag\": \"\\\"86865b71093464f5a301e1027439491b-1\\\"\",\n        \"Bucket\": \"test_zappa_upload_s3\",\n        \"Location\": \"https://test_zappa_upload_s3.s3.amazonaws.com/lambda_package-1456273359.zip\",\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"HostId\": \"MRuE82ncxtI6IA04QwvcPHGZX/81kUhSZ+LwV7jAGsv674NknH9btnGPsUuLXBspNuqGtFbdWKY=\",\n            \"RequestId\": \"4BD122934F722C61\"\n        },\n        \"Key\": \"lambda_package-1456273359.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.CopyObject_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"CopyObjectResult\": {\n            \"LastModified\": {\n                \"hour\": 23,\n                \"__class__\": \"datetime\",\n                \"month\": 12,\n                \"second\": 29,\n                \"microsecond\": 0,\n                \"year\": 2016,\n                \"day\": 20,\n                \"minute\": 43\n            },\n            \"ETag\": \"\\\"b2e189abf85e809a51522cdb0e53083a\\\"\"\n        },\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RetryAttempts\": 0,\n            \"HostId\": \"xDC1DVrFVSxJNrdVsZrQ38WucHFdgeJiY2+W7kUZtORrfYb2RRA4aqWOQD5j2No4NOoXN9u8vxk=\",\n            \"RequestId\": \"9622D9960549D775\",\n            \"HTTPHeaders\": {\n                \"content-length\": \"234\",\n                \"x-amz-id-2\": \"xDC1DVrFVSxJNrdVsZrQ38WucHFdgeJiY2+W7kUZtORrfYb2RRA4aqWOQD5j2No4NOoXN9u8vxk=\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-request-id\": \"9622D9960549D775\",\n                \"date\": \"Tue, 20 Dec 2016 23:43:29 GMT\",\n                \"x-amz-server-side-encryption\": \"AES256\",\n                \"content-type\": \"application/xml\"\n            }\n        },\n        \"ServerSideEncryption\": \"AES256\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.CreateBucket_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Location\": \"/test_zappa_upload_s3\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"8sXq+Uc6Ao7tM6js+GCOK99fJGbL2cNEZsug+9karxoklp9ml5MxqSJiTOw6yHlCWEGDGv7BZFw=\", \n            \"RequestId\": \"B99377D822A42891\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.CreateMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"Bucket\": \"test_zappa_upload_s3\",\n        \"UploadId\": \"qPM3MaoOZRezVJwiULIVGtsj0K99hO9YbuPdzMJQVUzZ.XX3YdscjOUnnzBHbFi2XGBgZjeOBb2NryiJzKxlHRiVKyYVezXsc_o9PCRar.icz3ks66jij8A0tkuwp1o0\",\n        \"Key\": \"lambda_package-1456272533.zip\",\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"HostId\": \"1awKoHujZxpAAG1hGnOKHetwi4vY1Dszt4QvFiAcUMkENvnGHt7yDuJ4n6eR5sRK\",\n            \"RequestId\": \"7CE018CCC678149E\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.HeadBucket_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"bIWJow7rK8U4lxn9VTIz3/lH+agH9OA8BGD80vbICTWwHNqfEdGt4D3s2EmVWm/U01XtUZdq5OY=\", \n            \"RequestId\": \"501E18A0BFB1B76C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.HeadObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"AcceptRanges\": \"bytes\", \n        \"ContentType\": \"binary/octet-stream\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"PnlRCp+1zp2qblsjbRFvph/eBOb8dN/k9fTPmW45pfDP/6GoUs/Z7hfZIpFo5CjVgLtsuZk/IYw=\", \n            \"RequestId\": \"AD1ABEA37433B785\"\n        }, \n        \"LastModified\": {\n            \"hour\": 23, \n            \"__class__\": \"datetime\", \n            \"month\": 2, \n            \"second\": 10, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 23, \n            \"minute\": 32\n        }, \n        \"ContentLength\": 4507898, \n        \"ETag\": \"\\\"58098b238b9a6ed2b3a954601e9b8e5f\\\"\", \n        \"Metadata\": {}\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.PutObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"58098b238b9a6ed2b3a954601e9b8e5f\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"tedGhtpKSnTti2bVK33LeOe6Iy0D4uLMfZt8TqJJWFRK3XI35EahQd2F+ShUX9l6O0vw7yyEmMA=\", \n            \"RequestId\": \"D90365BC22767711\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_copy_on_s3/s3.UploadPart_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"781936e8a21849d38e955224ef70d71e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"/Dt2sy50X8WRf6CeE4OhoXMQftr4n5PUtT22ZblpVdfLkqo8pv7oeq6XaEoNCdjiPmN9+AtaXy0=\", \n            \"RequestId\": \"C3816300C7FA5E5F\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.CreateRole_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%0A%20%20%22Version%22%3A%20%222012-10-17%22%2C%0A%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Sid%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%22Principal%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22Service%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%22apigateway.amazonaws.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22lambda.amazonaws.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22events.amazonaws.com%22%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22Action%22%3A%20%22sts%3AAssumeRole%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D\",\n            \"RoleId\": \"AROAIJTKAN7OBBD7BF25O\", \n            \"CreateDate\": {\n                \"hour\": 1, \n                \"__class__\": \"datetime\", \n                \"month\": 2, \n                \"second\": 20, \n                \"microsecond\": 221000, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 28\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::123:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0da2623f-db5f-11e5-9d89-67e11bce6785\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.GetRolePolicy_1.json",
    "content": "{\n    \"status_code\": 404, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 404, \n            \"RequestId\": \"0e11c69f-db5f-11e5-aa20-65c7ceb91dfa\"\n        }, \n        \"Error\": {\n            \"Message\": \"The role policy with name zappa-permissions cannot be found.\", \n            \"Code\": \"NoSuchEntity\", \n            \"Type\": \"Sender\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.GetRolePolicy_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"RoleName\": \"ZappaLambdaExecution\", \n        \"PolicyDocument\": \"%7B%0A%20%20%20%20%22Version%22%3A%20%222012-10-17%22%2C%0A%20%20%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22logs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Alogs%3A%2A%3A%2A%3A%2A%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lambda%3AInvokeFunction%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AAttachNetworkInterface%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ACreateNetworkInterface%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADeleteNetworkInterface%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADescribeNetworkInterfaces%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3ADetachNetworkInterface%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AModifyNetworkInterfaceAttribute%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ec2%3AResetNetworkInterfaceAttribute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22s3%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3As3%3A%3A%3A%2A%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sqs%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Asqs%3A*%3A*%3A*%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22dynamodb%3A%2A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22arn%3Aaws%3Adynamodb%3A*%3A*%3A*%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22route53%3A*%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Resource%22%3A%20%22*%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"75ea0f95-123c-11e6-a7da-b932a8a18034\"\n        }, \n        \"PolicyName\": \"zappa-permissions\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.GetRole_1.json",
    "content": "{\n    \"status_code\": 404, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 404, \n            \"RequestId\": \"0d24322f-db5f-11e5-9d89-67e11bce6785\"\n        }, \n        \"Error\": {\n            \"Message\": \"The role with name ZappaLambdaExecution cannot be found.\", \n            \"Code\": \"NoSuchEntity\", \n            \"Type\": \"Sender\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.GetRole_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Role\": {\n            \"AssumeRolePolicyDocument\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22lambda.amazonaws.com%22%2C%22apigateway.amazonaws.com%22%2C%22events.amazonaws.com%22%5D%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D\", \n            \"RoleId\": \"AROAJP6JO7RI37FHZGQ6A\", \n            \"CreateDate\": {\n                \"hour\": 15, \n                \"__class__\": \"datetime\", \n                \"month\": 1, \n                \"second\": 29, \n                \"microsecond\": 0, \n                \"year\": 2016, \n                \"day\": 25, \n                \"minute\": 33\n            }, \n            \"RoleName\": \"ZappaLambdaExecution\", \n            \"Path\": \"/\", \n            \"Arn\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"75e22050-123c-11e6-a7da-b932a8a18034\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_iam_roles/iam.PutRolePolicy_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"0e619422-db5f-11e5-9d89-67e11bce6785\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.CreateAlias_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.CreateFunction_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=\", \n        \"FunctionName\": \"test_lmbda_function55\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"12b75ef1-e226-11e5-84a2-ad7ddc64ad40\"\n        }, \n        \"CodeSize\": 26585626, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::12345:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-03-04T16:28:06.633+0000\", \n        \"Handler\": \"runme.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.DeleteFunctionConcurrency_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.GetAlias_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.UpdateAlias_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_local/lambda.UpdateFunctionCode_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=\", \n        \"FunctionName\": \"test_lmbda_function55\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"153e09be-e226-11e5-a3b8-7b263f053e5a\"\n        }, \n        \"CodeSize\": 26585626, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:1\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::12345:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-03-04T16:28:06.633+0000\", \n        \"Handler\": \"runme.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.CreateAlias_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.CreateFunction_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"CodeSha256\": \"q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=\", \n        \"FunctionName\": \"test_lmbda_function55\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"12b75ef1-e226-11e5-84a2-ad7ddc64ad40\"\n        }, \n        \"CodeSize\": 26585626, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::12345:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-03-04T16:28:06.633+0000\", \n        \"Handler\": \"runme.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.DeleteFunctionConcurrency_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.GetAlias_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.UpdateAlias_1.json",
    "content": "{\n    \"status_code\": 201,\n    \"data\": {\n        \"AliasArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version\",\n        \"Description\": \"Zappa Deployment\",\n        \"FunctionVersion\": \"1\",\n        \"Name\": \"current-alb-version\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.UpdateFunctionCode_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=\", \n        \"FunctionName\": \"test_lmbda_function55\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"153e09be-e226-11e5-a3b8-7b263f053e5a\"\n        }, \n        \"CodeSize\": 26585626, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:1\", \n        \"Version\": \"1\", \n        \"Role\": \"arn:aws:iam::12345:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-03-04T16:28:06.633+0000\", \n        \"Handler\": \"runme.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.CreateDeployment_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"id\": \"cxn7hw\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"30cb0d0e-e22c-11e5-a1ee-672085005625\"\n        }, \n        \"createdDate\": {\n            \"hour\": 18, \n            \"__class__\": \"datetime\", \n            \"month\": 3, \n            \"second\": 53, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 4, \n            \"minute\": 11\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.CreateRestApi_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"id\": \"lavad5es4e\", \n        \"name\": \"1457111505\", \n        \"description\": \"1457111505 Zappa\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"2fabbac6-e22c-11e5-ba0a-f9eb2a31cd5c\"\n        }, \n        \"createdDate\": {\n            \"hour\": 18, \n            \"__class__\": \"datetime\", \n            \"month\": 3, \n            \"second\": 51, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 4, \n            \"minute\": 11\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetResources_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"path\": \"/\", \n                \"id\": \"zfvs53c2pl\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"2fd191fa-e22c-11e5-9e01-73fb17f4973b\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetRestApi_1.json",
    "content": "{\n    \"status_code\": 404, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 404, \n            \"RequestId\": \"2f960f7a-e22c-11e5-a1ee-672085005625\"\n        }, \n        \"Error\": {\n            \"Message\": \"Invalid REST API identifier specified\", \n            \"Code\": \"NotFoundException\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetRestApis_1.json",
    "content": "{\n    \"status_code\": 200,\n    \"data\": {\n        \"items\": [\n        ],\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200,\n            \"RequestId\": \"9ac03233-e231-11e5-8630-d13cf2bbed5d\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutIntegrationResponse_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"statusCode\": \"200\", \n        \"responseTemplates\": {\n            \"text/html\": \"#set($inputRoot = $input.path('$'))\\n$inputRoot.Content\"\n        }, \n        \"selectionPattern\": \"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"307d625c-e22c-11e5-9e01-73fb17f4973b\"\n        }, \n        \"responseParameters\": {\n            \"method.response.header.Content-Type\": \"integration.response.body.Content-Type\", \n            \"method.response.header.Location\": \"integration.response.body.Location\", \n            \"method.response.header.X-Frame-Options\": \"integration.response.body.X-Frame-Options\", \n            \"method.response.header.Status\": \"integration.response.body.Status\", \n            \"method.response.header.Set-Cookie\": \"integration.response.body.Set-Cookie\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutIntegration_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"cacheKeyParameters\": [], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"304ae08c-e22c-11e5-a1ee-672085005625\"\n        }, \n        \"uri\": \"arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:12345:function:django-helloworld-unicode/invocations\", \n        \"httpMethod\": \"POST\", \n        \"requestTemplates\": {\n            \"application/json\": \"{\\n  \\\"body\\\" : $input.json('$'),\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  }  \\n}\", \n            \"application/x-www-form-urlencoded\": \"#set($rawPostData = $input.path('$'))\\n{\\n  \\\"body\\\" : \\\"$rawPostData\\\",\\n  \\\"headers\\\": {\\n    #foreach($header in $input.params().header.keySet())\\n    \\\"$header\\\": \\\"$util.escapeJavaScript($input.params().header.get($header))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  },\\n  \\\"method\\\": \\\"$context.httpMethod\\\",\\n  \\\"params\\\": {\\n    #foreach($param in $input.params().path.keySet())\\n    \\\"$param\\\": \\\"$util.escapeJavaScript($input.params().path.get($param))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  },\\n  \\\"query\\\": {\\n    #foreach($queryParam in $input.params().querystring.keySet())\\n    \\\"$queryParam\\\": \\\"$util.escapeJavaScript($input.params().querystring.get($queryParam))\\\" #if($foreach.hasNext),#end\\n    \\n    #end\\n  }  \\n}\"\n        }, \n        \"cacheNamespace\": \"none\", \n        \"credentials\": \"arn:aws:iam::12345:role/ZappaLambdaExecution\", \n        \"type\": \"AWS\", \n        \"requestParameters\": {}\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutMethodResponse_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"responseModels\": {\n            \"text/html\": \"Empty\"\n        }, \n        \"statusCode\": \"200\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"306287a9-e22c-11e5-ba0a-f9eb2a31cd5c\"\n        }, \n        \"responseParameters\": {\n            \"method.response.header.Content-Type\": false, \n            \"method.response.header.Location\": false, \n            \"method.response.header.X-Frame-Options\": false, \n            \"method.response.header.Status\": false, \n            \"method.response.header.Set-Cookie\": false\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutMethod_1.json",
    "content": "{\n    \"status_code\": 201, \n    \"data\": {\n        \"apiKeyRequired\": false, \n        \"httpMethod\": \"GET\", \n        \"authorizationType\": \"NONE\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 201, \n            \"RequestId\": \"303053cb-e22c-11e5-9e01-73fb17f4973b\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.UpdateStage_1.json",
    "content": "{\n  \"status_code\": 201,\n  \"data\": {\n    \"deploymentId\" : \"aioOASIHD1h\",\n    \"stageName\" : \"ttt888\",\n    \"description\" : \"Deployed by Zappa.\",\n    \"cacheClusterEnabled\" : false,\n    \"cacheClusterSize\" : \"1\",\n    \"cacheClusterStatus\" : \"AVAILABLE\",\n    \"methodSettings\" : {\n      \"String\" : {\n        \"metricsEnabled\" : false,\n        \"loggingLevel\" : \"OFF\",\n        \"dataTraceEnabled\" : false,\n        \"throttlingBurstLimit\" : 100,\n        \"throttlingRateLimit\" : 100,\n        \"cachingEnabled\" : false,\n        \"cacheTtlInSeconds\" : 100,\n        \"cacheDataEncrypted\" : false,\n        \"requireAuthorizationForCacheControl\" : false\n      }\n    },\n    \"variables\" : {\n    },\n    \"createdDate\" : \"2011-01-01T01:01:01Z+0000\",\n    \"lastUpdatedDate\" : \"2011-01-01T01:01:01Z+0000\"\n  }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_fetch_logs/logs.DescribeLogStreams_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"logStreams\": [\n            {\n                \"firstEventTimestamp\": 1455666679725, \n                \"lastEventTimestamp\": 1455666679958, \n                \"creationTime\": 1455666678634, \n                \"uploadSequenceToken\": \"49540113880921962757517231072874083168075499101109640610\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\", \n                \"lastIngestionTime\": 1455666694754, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\", \n                \"storedBytes\": 247\n            }, \n            {\n                \"firstEventTimestamp\": 1455649410417, \n                \"lastEventTimestamp\": 1455650497148, \n                \"creationTime\": 1455649409642, \n                \"uploadSequenceToken\": \"49540113985133345070250697845503862755841532631883736754\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\", \n                \"lastIngestionTime\": 1455650512171, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\", \n                \"storedBytes\": 554\n            }, \n            {\n                \"firstEventTimestamp\": 1455649480031, \n                \"lastEventTimestamp\": 1455649480289, \n                \"creationTime\": 1455649479007, \n                \"uploadSequenceToken\": \"49540751433982745183295759382532773807925310381002604002\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\", \n                \"lastIngestionTime\": 1455649495052, \n                \"arn\": \"arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\", \n                \"storedBytes\": 246\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a1385218-e228-11e5-bc06-23d39c48cbaa\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_fetch_logs/logs.FilterLogEvents_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"searchedLogStreams\": [\n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"searchedCompletely\": true, \n                \"logStreamName\": \"2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\"\n            }\n        ], \n        \"events\": [\n            {\n                \"ingestionTime\": 1455649425452, \n                \"timestamp\": 1455649410417, \n                \"message\": \"START RequestId: f6d72ba2-d4df-11e5-bf75-3db99fd8bd4d Version: $LATEST\\n\", \n                \"eventId\": \"32462066600100845192455856822263785416533790667340972032\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455649425452, \n                \"timestamp\": 1455649410687, \n                \"message\": \"END RequestId: f6d72ba2-d4df-11e5-bf75-3db99fd8bd4d\\n\", \n                \"eventId\": \"32462066606122046396059125070478429350148848273955684353\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455649425452, \n                \"timestamp\": 1455649410687, \n                \"message\": \"REPORT RequestId: f6d72ba2-d4df-11e5-bf75-3db99fd8bd4d\\tDuration: 257.47 ms\\tBilled Duration: 300 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32462066606122046396059125070478429350148848273955684354\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455649495052, \n                \"timestamp\": 1455649480031, \n                \"message\": \"START RequestId: 20844441-d4e0-11e5-93d5-517f441c2397 Version: $LATEST\\n\", \n                \"eventId\": \"32462068152544921442966656281272578021728142002476744704\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\"\n            }, \n            {\n                \"ingestionTime\": 1455649495052, \n                \"timestamp\": 1455649480289, \n                \"message\": \"END RequestId: 20844441-d4e0-11e5-93d5-517f441c2397\\n\", \n                \"eventId\": \"32462068158298513704187557051788793336071419271019692033\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\"\n            }, \n            {\n                \"ingestionTime\": 1455649495052, \n                \"timestamp\": 1455649480289, \n                \"message\": \"REPORT RequestId: 20844441-d4e0-11e5-93d5-517f441c2397\\tDuration: 257.67 ms\\tBilled Duration: 300 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32462068158298513704187557051788793336071419271019692034\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10\"\n            }, \n            {\n                \"ingestionTime\": 1455650512171, \n                \"timestamp\": 1455650497125, \n                \"message\": \"START RequestId: 7f75c4e9-d4e2-11e5-a695-ad825bd23d32 Version: $LATEST\\n\", \n                \"eventId\": \"32462090834499058397272271028023736332668015516235137024\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455650512171, \n                \"timestamp\": 1455650497148, \n                \"message\": \"System check identified no issues (0 silenced).\\n\", \n                \"eventId\": \"32462090835011975536838475360279057852938927830872686593\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455650512171, \n                \"timestamp\": 1455650497148, \n                \"message\": \"END RequestId: 7f75c4e9-d4e2-11e5-a695-ad825bd23d32\\n\", \n                \"eventId\": \"32462090835011975536838475360279057852938927830872686594\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455650512171, \n                \"timestamp\": 1455650497148, \n                \"message\": \"REPORT RequestId: 7f75c4e9-d4e2-11e5-a695-ad825bd23d32\\tDuration: 21.36 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 28 MB\\t\\n\", \n                \"eventId\": \"32462090835011975536838475360279057852938927830872686595\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855\"\n            }, \n            {\n                \"ingestionTime\": 1455666694754, \n                \"timestamp\": 1455666679725, \n                \"message\": \"START RequestId: 2c419ba2-d508-11e5-9f1e-2be596b4591e Version: $LATEST\\n\", \n                \"eventId\": \"32462451718538308138934340807480632102522048575880101888\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\"\n            }, \n            {\n                \"ingestionTime\": 1455666694754, \n                \"timestamp\": 1455666679958, \n                \"message\": \"END RequestId: 2c419ba2-d508-11e5-9f1e-2be596b4591e\\n\", \n                \"eventId\": \"32462451723734381770191975999458454460049116806773538817\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\"\n            }, \n            {\n                \"ingestionTime\": 1455666694754, \n                \"timestamp\": 1455666679958, \n                \"message\": \"REPORT RequestId: 2c419ba2-d508-11e5-9f1e-2be596b4591e\\tDuration: 232.39 ms\\tBilled Duration: 300 ms \\tMemory Size: 512 MB\\tMax Memory Used: 27 MB\\t\\n\", \n                \"eventId\": \"32462451723734381770191975999458454460049116806773538818\", \n                \"logStreamName\": \"2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"a36395e1-e228-11e5-b098-a7148bebd5d9\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_get_api_url/apigateway.GetRestApis_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"items\": [\n            {\n                \"description\": \"helloworld-gamma Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 54\n                }, \n                \"id\": \"11uy9wa8he\", \n                \"name\": \"helloworld-gamma\"\n            }, \n            {\n                \"description\": \"helloworld-dello Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 24\n                }, \n                \"id\": \"19qz2k9mhj\", \n                \"name\": \"helloworld-dello\"\n            }, \n            {\n                \"description\": \"spheres-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 2, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 45, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 2, \n                    \"minute\": 20\n                }, \n                \"id\": \"2djdovx6f3\", \n                \"name\": \"spheres-beta\"\n            }, \n            {\n                \"description\": \"helloworld-zeta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 9, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 53\n                }, \n                \"id\": \"2uj5ini1yb\", \n                \"name\": \"helloworld-zeta\"\n            }, \n            {\n                \"description\": \"helloworld-dellooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"2yucw4zeee\", \n                \"name\": \"helloworld-dellooo\"\n            }, \n            {\n                \"description\": \"helloworld-q Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 43, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 1\n                }, \n                \"id\": \"393yunyphh\", \n                \"name\": \"helloworld-q\"\n            }, \n            {\n                \"description\": \"helloworld-admin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 21, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 21\n                }, \n                \"id\": \"3cwdkxrlr7\", \n                \"name\": \"helloworld-admin\"\n            }, \n            {\n                \"description\": \"helloworld-qqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 39, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 27\n                }, \n                \"id\": \"40msxbdjda\", \n                \"name\": \"helloworld-qqqq\"\n            }, \n            {\n                \"description\": \"helloworld-zzz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 6\n                }, \n                \"id\": \"434d9nax27\", \n                \"name\": \"helloworld-zzz\"\n            }, \n            {\n                \"description\": \"helloworld-dvlper Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 10, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"5c33uqnbei\", \n                \"name\": \"helloworld-dvlper\"\n            }, \n            {\n                \"description\": \"helloworld-delta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 33\n                }, \n                \"id\": \"5dicqc3gnc\", \n                \"name\": \"helloworld-delta\"\n            }, \n            {\n                \"description\": \"helloworld-pp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"5k8g1isoxc\", \n                \"name\": \"helloworld-pp\"\n            }, \n            {\n                \"description\": \"helloworld-develoo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 46\n                }, \n                \"id\": \"5mt7r6iuul\", \n                \"name\": \"helloworld-develoo\"\n            }, \n            {\n                \"description\": \"helloworld-develoooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 7\n                }, \n                \"id\": \"5u1yirbfj1\", \n                \"name\": \"helloworld-develoooo\"\n            }, \n            {\n                \"description\": \"settings-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 7, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 24, \n                    \"minute\": 9\n                }, \n                \"id\": \"60fhpa4pz2\", \n                \"name\": \"settings-dev\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 57, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 29\n                }, \n                \"id\": \"60sck4xxob\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-beta Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 3, \n                    \"minute\": 1\n                }, \n                \"id\": \"67urt9dyf3\", \n                \"name\": \"helloworld-beta\"\n            }, \n            {\n                \"description\": \"wsgi\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 29\n                }, \n                \"id\": \"7k6anj0k99\", \n                \"name\": \"wsgi\"\n            }, \n            {\n                \"description\": \"django-helloworld-unicode Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 35, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 39\n                }, \n                \"id\": \"arb9clq9k9\", \n                \"name\": \"django-helloworld-unicode\"\n            }, \n            {\n                \"description\": \"helloworld-develooo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 56\n                }, \n                \"id\": \"b5ufkxk4m9\", \n                \"name\": \"helloworld-develooo\"\n            }, \n            {\n                \"description\": \"1453842588 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 50, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 9\n                }, \n                \"id\": \"bx9xk46vg1\", \n                \"name\": \"1453842588\"\n            }, \n            {\n                \"description\": \"1457111415 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 10\n                }, \n                \"id\": \"dndpw65n63\", \n                \"name\": \"1457111415\"\n            }, \n            {\n                \"description\": \"helloworld-post Zappa\", \n                \"createdDate\": {\n                    \"hour\": 16, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 30\n                }, \n                \"id\": \"dx6ixedawa\", \n                \"name\": \"helloworld-post\"\n            }, \n            {\n                \"description\": \"helloworld-dvlpe Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 54, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 28\n                }, \n                \"id\": \"ede32wm7p6\", \n                \"name\": \"helloworld-dvlpe\"\n            }, \n            {\n                \"description\": \"Created by AWS Lambda\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 20, \n                    \"minute\": 32\n                }, \n                \"id\": \"erya05p8t3\", \n                \"name\": \"LambdaMicroservice\"\n            }, \n            {\n                \"description\": \"helloworld-r Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 42, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 2\n                }, \n                \"id\": \"fohrtychu1\", \n                \"name\": \"helloworld-r\"\n            }, \n            {\n                \"description\": \"django-helloworld-omega Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 30\n                }, \n                \"id\": \"g6qdo0yttg\", \n                \"name\": \"django-helloworld-omega\"\n            }, \n            {\n                \"description\": \"helloworld-radmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 38\n                }, \n                \"id\": \"h0ttqz46qc\", \n                \"name\": \"helloworld-radmin\"\n            }, \n            {\n                \"description\": \"helloworld-dvlp Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 0, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 49\n                }, \n                \"id\": \"h7twhyqkie\", \n                \"name\": \"helloworld-dvlp\"\n            }, \n            {\n                \"description\": \"helloworld-devel Zappa\", \n                \"createdDate\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 30\n                }, \n                \"id\": \"hbj992tfwl\", \n                \"name\": \"helloworld-devel\"\n            }, \n            {\n                \"description\": \"Spheres-demonstration Zappa\", \n                \"createdDate\": {\n                    \"hour\": 19, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 25, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 16, \n                    \"minute\": 53\n                }, \n                \"id\": \"ho43d1vcyb\", \n                \"name\": \"Spheres-demonstration\"\n            }, \n            {\n                \"description\": \"helloworld-qq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"hro3nhl7t4\", \n                \"name\": \"helloworld-qq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 36, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 12\n                }, \n                \"id\": \"i2zrw3wku1\", \n                \"name\": \"helloworld-dvlperr\"\n            }, \n            {\n                \"description\": \"helloworld-delloo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 47, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 38\n                }, \n                \"id\": \"j3rs1jti9g\", \n                \"name\": \"helloworld-delloo\"\n            }, \n            {\n                \"description\": \"1453976638 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 11, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 59, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 23\n                }, \n                \"id\": \"kwzshzpitk\", \n                \"name\": \"1453976638\"\n            }, \n            {\n                \"description\": \"1457111505 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 3, \n                    \"second\": 51, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 4, \n                    \"minute\": 11\n                }, \n                \"id\": \"lavad5es4e\", \n                \"name\": \"1457111505\"\n            }, \n            {\n                \"description\": \"1453989570 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 32, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 59\n                }, \n                \"id\": \"lkiug68ek9\", \n                \"name\": \"1453989570\"\n            }, \n            {\n                \"description\": \"1453845110 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 52, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 51\n                }, \n                \"id\": \"lo9vjezry6\", \n                \"name\": \"1453845110\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 37, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 0\n                }, \n                \"id\": \"lphfaxj84g\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"1454007920 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 5\n                }, \n                \"id\": \"lryqityf9c\", \n                \"name\": \"1454007920\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 22, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 35\n                }, \n                \"id\": \"lvc59j5puf\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-qqqqq Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 34, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 16\n                }, \n                \"id\": \"lwbaruqt91\", \n                \"name\": \"helloworld-qqqqq\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 16, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 31\n                }, \n                \"id\": \"mco06c7adh\", \n                \"name\": \"helloworld-dvlperrrr\"\n            }, \n            {\n                \"description\": \"helloworld-rr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 20, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 6, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 28\n                }, \n                \"id\": \"mgo7ssfnr8\", \n                \"name\": \"helloworld-rr\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 44, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 21\n                }, \n                \"id\": \"nsrpfnr93g\", \n                \"name\": \"helloworld-dvlperrr\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 58, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 6, \n                    \"minute\": 37\n                }, \n                \"id\": \"o48rplzmre\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-badmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 13, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 49, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 59\n                }, \n                \"id\": \"owo37s7o0l\", \n                \"name\": \"helloworld-badmin\"\n            }, \n            {\n                \"description\": \"1453987169 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 19\n                }, \n                \"id\": \"p22u4b4hn9\", \n                \"name\": \"1453987169\"\n            }, \n            {\n                \"description\": \"1453847710 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 23, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 12, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 26, \n                    \"minute\": 35\n                }, \n                \"id\": \"pzdx6f20o9\", \n                \"name\": \"1453847710\"\n            }, \n            {\n                \"description\": \"helloworld-develo Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 33\n                }, \n                \"id\": \"qhikml2l0a\", \n                \"name\": \"helloworld-develo\"\n            }, \n            {\n                \"description\": \"1453992020 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 22, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 40\n                }, \n                \"id\": \"rmlote5cec\", \n                \"name\": \"1453992020\"\n            }, \n            {\n                \"description\": \"Spheres-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 18, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 28, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 5, \n                    \"minute\": 38\n                }, \n                \"id\": \"ry7mtnfmo3\", \n                \"name\": \"Spheres-dev\"\n            }, \n            {\n                \"description\": \"helloworld-fadmin Zappa\", \n                \"createdDate\": {\n                    \"hour\": 14, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 38, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 47\n                }, \n                \"id\": \"swe19z3zr7\", \n                \"name\": \"helloworld-fadmin\"\n            }, \n            {\n                \"description\": \"1453992953 Zappa\", \n                \"createdDate\": {\n                    \"hour\": 15, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 56, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 28, \n                    \"minute\": 55\n                }, \n                \"id\": \"tpwx2chyc9\", \n                \"name\": \"1453992953\"\n            }, \n            {\n                \"description\": \"helloworld-poste Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 1, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 31, \n                    \"minute\": 6\n                }, \n                \"id\": \"v3f3yz9ij6\", \n                \"name\": \"helloworld-poste\"\n            }, \n            {\n                \"description\": \"helloworld-dvlperrrrr Zappa\", \n                \"createdDate\": {\n                    \"hour\": 12, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 30, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 41\n                }, \n                \"id\": \"voekyyz7v7\", \n                \"name\": \"helloworld-dvlperrrrr\"\n            }, \n            {\n                \"description\": \"helloworld-postal Zappa\", \n                \"createdDate\": {\n                    \"hour\": 0, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 55, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 1, \n                    \"minute\": 22\n                }, \n                \"id\": \"xnozvcrt9f\", \n                \"name\": \"helloworld-postal\"\n            }, \n            {\n                \"description\": \"helloworld-zz Zappa\", \n                \"createdDate\": {\n                    \"hour\": 17, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 11, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 56\n                }, \n                \"id\": \"yxu3hk4ss8\", \n                \"name\": \"helloworld-zz\"\n            }, \n            {\n                \"description\": \"hello_django-dev Zappa\", \n                \"createdDate\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 2, \n                    \"second\": 53, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 29, \n                    \"minute\": 2\n                }, \n                \"id\": \"z64se9m9x4\", \n                \"name\": \"hello_django-dev\"\n            }, \n            {\n                \"description\": \"helloworld-p Zappa\", \n                \"createdDate\": {\n                    \"hour\": 21, \n                    \"__class__\": \"datetime\", \n                    \"month\": 1, \n                    \"second\": 17, \n                    \"microsecond\": 0, \n                    \"year\": 2016, \n                    \"day\": 30, \n                    \"minute\": 58\n                }, \n                \"id\": \"zdmxiapwh9\", \n                \"name\": \"helloworld-p\"\n            }\n        ], \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"9ac03233-e231-11e5-8630-d13cf2bbed5d\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_handler/s3.GetObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Body\": {\n            \"body\": \"{\\n\\t\\\"hello\\\": \\\"world\\\"\\n}\\n\", \n            \"__module__\": \"botocore.response\", \n            \"__class__\": \"StreamingBody\"\n        }, \n        \"AcceptRanges\": \"bytes\", \n        \"ContentType\": \"application/json\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"lVaFp3nkEtsVe+4Dm5eMCifL68dHBxqkCRU8pYt+H1A2no2oYcgeyTKOIDYnujWZK1CvUaRd2VY=\", \n            \"RequestId\": \"70200E61AF5D2966\", \n            \"HTTPHeaders\": {\n                \"content-length\": \"22\", \n                \"x-amz-id-2\": \"lVaFp3nkEtsVe+4Dm5eMCifL68dHBxqkCRU8pYt+H1A2no2oYcgeyTKOIDYnujWZK1CvUaRd2VY=\", \n                \"accept-ranges\": \"bytes\", \n                \"server\": \"AmazonS3\", \n                \"last-modified\": \"Thu, 30 Jun 2016 22:53:14 GMT\", \n                \"x-amz-request-id\": \"70200E61AF5D2966\", \n                \"etag\": \"\\\"4623dd8d925106bedd88a1b82f69f5b5\\\"\", \n                \"date\": \"Thu, 30 Jun 2016 22:53:27 GMT\", \n                \"content-type\": \"application/json\"\n            }\n        }, \n        \"LastModified\": {\n            \"hour\": 22, \n            \"__class__\": \"datetime\", \n            \"month\": 6, \n            \"second\": 14, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 30, \n            \"minute\": 53\n        }, \n        \"ContentLength\": 22, \n        \"ETag\": \"\\\"4623dd8d925106bedd88a1b82f69f5b5\\\"\", \n        \"Metadata\": {}\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_invoke_lambda_function/lambda.Invoke_1.json",
    "content": "{\n    \"status_code\": 202, \n    \"data\": {\n        \"Payload\": {\n            \"body\": \"\", \n            \"__module__\": \"botocore.response\", \n            \"__class__\": \"StreamingBody\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 202, \n            \"RequestId\": \"2b8fb03f-e231-11e5-977b-d973ae051f04\"\n        }, \n        \"StatusCode\": 202\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.GetFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Code\": {\n            \"RepositoryType\": \"S3\", \n            \"Location\": \"https://prod-04-2014-tasks.s3.amazonaws.com/snapshots/724336686645/django-helloworld-unicode-a0d56d69-de7c-421b-9527-f49e100a8613?x-amz-security-token=AQoDYXdzEEka4AOil22HD1z9lkxZ7yiced%2FbYEWzXJHbMHexq2zxzMQ7%2Fj2a06AP9z3nK0QgGPUADK2A6FUpFFl%2BjO7gBmP%2FKifl9jTvvaf72YhPbZDJTIrFvZZ%2B5NjhkDrfRgyK%2BhBROGNH85L46iJSShwZ5lmKgADTnnVMT9pZ2JXF3uNLUzrWoJTpf%2F7lDBMEoFO%2BNLer7MsLsuCiemzKV4Kcvo0Mu3qhkk1u2BfoRTj4xmiaWE7UfqD%2FeQkINdwkUgXeQ9SA1T2l70omZ1ss2l1y18xeUvCQde5OrE7ue5cVpENyjYr9dEwPYwm1wG9%2B%2FJE%2BMQZ8Lz6CNex%2BTVuBvY09JL8vTV7WpRxGhr96a7OIn5YCCQ7cJfNVIWpdBUrWmqnE8Jh9oL558TVA0e5RFP9YU%2BFYxJcA6fH%2B0DZBAAK9797XPltzhSXrUcB8JuHfa%2FC1n2w8X7HbsMTI8m1OAIkQQtppYHtl4T5o3012VcSTLRSv945sCodMOmueKsEwAZlc1gFflcwGXE4v4hB6YJjvcRj2SQiK7Yzw7ShODOroOsWT18te8p9Qjs2mL6akLt1%2Fo8tddWskKzqrfYfBTvfFL5Y0nU4sI96JUXM0KXmJotPRmCdFEktGk4Fre0wm%2FyAau0NdaDQg7NzmtgU%3D&AWSAccessKeyId=ASIAIQFLXUK7E7GUTQ2A&Expires=1457113092&Signature=%2FH0RMGKWk1tEGnK9R6CCPXQ6Y04%3D\"\n        }, \n        \"Configuration\": {\n            \"Version\": \"7\", \n            \"CodeSha256\": \"t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=\", \n            \"FunctionName\": \"django-helloworld-unicode\", \n            \"MemorySize\": 512, \n            \"CodeSize\": 12154784, \n            \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7\", \n            \"Handler\": \"handler.lambda_handler\", \n            \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n            \"Timeout\": 30, \n            \"LastModified\": \"2016-03-01T00:24:01.446+0000\", \n            \"Runtime\": \"python2.7\", \n            \"Description\": \"Zappa Deployment\"\n        }, \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"78da1863-e22e-11e5-a5ae-01cbfdebdc8f\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.ListVersionsByFunction_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"786c144e-e22e-11e5-86f4-4528d3e5269b\"\n        }, \n        \"Versions\": [\n            {\n                \"Version\": \"$LATEST\", \n                \"CodeSha256\": \"qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154778, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:$LATEST\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:55:35.845+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"1\", \n                \"CodeSha256\": \"eEW6OoZIm1g+3sLnoGqkfG9PcvYcXYoTd8uZYCMhA2U=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12102921, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:1\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:39:31.557+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"2\", \n                \"CodeSha256\": \"QXwkHDWCmczXTdDi9AYf6Ws74jkAI6zUJ+tf7s5zLzk=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12152312, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:2\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:47:04.499+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"3\", \n                \"CodeSha256\": \"Hpt/J6gyhnYXm7NVWwzomJoExr0i9II//4zaLm0DYgc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12152182, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:3\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:58:08.443+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"4\", \n                \"CodeSha256\": \"1ofpfK2Jonu13iPUBMeNYR962iWcD5vL1YrJazF9tF0=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154467, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:4\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T16:25:49.425+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"5\", \n                \"CodeSha256\": \"bwLhQSjeZOmNC10s2eMO0ljWJBNX5tT4S9MgkvBWjOM=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154507, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:5\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T16:34:47.988+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"6\", \n                \"CodeSha256\": \"uxHYC6Uf/sUl884TWUqlwi0WWE+ixfxhO964yPec5zM=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154780, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:6\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:12:28.708+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"7\", \n                \"CodeSha256\": \"t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154784, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:24:01.446+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"8\", \n                \"CodeSha256\": \"qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154778, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:8\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:55:35.845+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.ListVersionsByFunction_2.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"78c11231-e22e-11e5-bb00-6935e1456f05\"\n        }, \n        \"Versions\": [\n            {\n                \"Version\": \"$LATEST\", \n                \"CodeSha256\": \"qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154778, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:$LATEST\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:55:35.845+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"1\", \n                \"CodeSha256\": \"eEW6OoZIm1g+3sLnoGqkfG9PcvYcXYoTd8uZYCMhA2U=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12102921, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:1\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:39:31.557+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"2\", \n                \"CodeSha256\": \"QXwkHDWCmczXTdDi9AYf6Ws74jkAI6zUJ+tf7s5zLzk=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12152312, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:2\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:47:04.499+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"3\", \n                \"CodeSha256\": \"Hpt/J6gyhnYXm7NVWwzomJoExr0i9II//4zaLm0DYgc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12152182, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:3\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T14:58:08.443+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"4\", \n                \"CodeSha256\": \"1ofpfK2Jonu13iPUBMeNYR962iWcD5vL1YrJazF9tF0=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154467, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:4\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T16:25:49.425+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"5\", \n                \"CodeSha256\": \"bwLhQSjeZOmNC10s2eMO0ljWJBNX5tT4S9MgkvBWjOM=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154507, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:5\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-02-29T16:34:47.988+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"6\", \n                \"CodeSha256\": \"uxHYC6Uf/sUl884TWUqlwi0WWE+ixfxhO964yPec5zM=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154780, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:6\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:12:28.708+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"7\", \n                \"CodeSha256\": \"t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154784, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:24:01.446+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }, \n            {\n                \"Version\": \"8\", \n                \"CodeSha256\": \"qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=\", \n                \"FunctionName\": \"django-helloworld-unicode\", \n                \"MemorySize\": 512, \n                \"CodeSize\": 12154778, \n                \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:8\", \n                \"Handler\": \"handler.lambda_handler\", \n                \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n                \"Timeout\": 30, \n                \"LastModified\": \"2016-03-01T00:55:35.845+0000\", \n                \"Runtime\": \"python2.7\", \n                \"Description\": \"Zappa Deployment\"\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.UpdateFunctionCode_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"CodeSha256\": \"t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=\", \n        \"FunctionName\": \"django-helloworld-unicode\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"RequestId\": \"8ef0d90e-e22e-11e5-ae73-91491a1737c0\"\n        }, \n        \"CodeSize\": 12154784, \n        \"MemorySize\": 512, \n        \"FunctionArn\": \"arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:9\", \n        \"Version\": \"9\", \n        \"Role\": \"arn:aws:iam::724336686645:role/ZappaLambdaExecution\", \n        \"Timeout\": 30, \n        \"LastModified\": \"2016-03-04T17:31:54.534+0000\", \n        \"Handler\": \"handler.lambda_handler\", \n        \"Runtime\": \"python2.7\", \n        \"Description\": \"Zappa Deployment\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.CompleteMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"86865b71093464f5a301e1027439491b-1\\\"\", \n        \"Bucket\": \"test_zappa_upload_s3\", \n        \"Location\": \"https://test_zappa_upload_s3.s3.amazonaws.com/lambda_package-1456273359.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"MRuE82ncxtI6IA04QwvcPHGZX/81kUhSZ+LwV7jAGsv674NknH9btnGPsUuLXBspNuqGtFbdWKY=\", \n            \"RequestId\": \"4BD122934F722C61\"\n        }, \n        \"Key\": \"lambda_package-1456273359.zip\"\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.CreateBucket_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Location\": \"/test_zappa_upload_s3\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"8sXq+Uc6Ao7tM6js+GCOK99fJGbL2cNEZsug+9karxoklp9ml5MxqSJiTOw6yHlCWEGDGv7BZFw=\", \n            \"RequestId\": \"B99377D822A42891\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.CreateMultipartUpload_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"Bucket\": \"test_zappa_upload_s3\", \n        \"UploadId\": \"qPM3MaoOZRezVJwiULIVGtsj0K99hO9YbuPdzMJQVUzZ.XX3YdscjOUnnzBHbFi2XGBgZjeOBb2NryiJzKxlHRiVKyYVezXsc_o9PCRar.icz3ks66jij8A0tkuwp1o0\", \n        \"Key\": \"lambda_package-1456272533.zip\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"1awKoHujZxpAAG1hGnOKHetwi4vY1Dszt4QvFiAcUMkENvnGHt7yDuJ4n6eR5sRK\", \n            \"RequestId\": \"7CE018CCC678149E\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.DeleteObject_1.json",
    "content": "{\n    \"status_code\": 204,\n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 204, \n            \"HostId\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n            \"RequestId\": \"A112859017E5977B\",\n            \"RetryAttempts\": 0,\n            \"HTTPHeaders\": {\n                \"date\": \"Tue, 20 Sep 2016 19:58:20 GMT\",\n                \"server\": \"AmazonS3\",\n                \"x-amz-id-2\": \"ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=\", \n                \"x-amz-request-id\": \"A112859017E5977B\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.HeadBucket_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"bIWJow7rK8U4lxn9VTIz3/lH+agH9OA8BGD80vbICTWwHNqfEdGt4D3s2EmVWm/U01XtUZdq5OY=\", \n            \"RequestId\": \"501E18A0BFB1B76C\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.HeadObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"AcceptRanges\": \"bytes\", \n        \"ContentType\": \"binary/octet-stream\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"PnlRCp+1zp2qblsjbRFvph/eBOb8dN/k9fTPmW45pfDP/6GoUs/Z7hfZIpFo5CjVgLtsuZk/IYw=\", \n            \"RequestId\": \"AD1ABEA37433B785\"\n        }, \n        \"LastModified\": {\n            \"hour\": 23, \n            \"__class__\": \"datetime\", \n            \"month\": 2, \n            \"second\": 10, \n            \"microsecond\": 0, \n            \"year\": 2016, \n            \"day\": 23, \n            \"minute\": 32\n        }, \n        \"ContentLength\": 4507898, \n        \"ETag\": \"\\\"58098b238b9a6ed2b3a954601e9b8e5f\\\"\", \n        \"Metadata\": {}\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.PutObject_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"58098b238b9a6ed2b3a954601e9b8e5f\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"tedGhtpKSnTti2bVK33LeOe6Iy0D4uLMfZt8TqJJWFRK3XI35EahQd2F+ShUX9l6O0vw7yyEmMA=\", \n            \"RequestId\": \"D90365BC22767711\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/placebo/TestZappa.test_upload_remove_s3/s3.UploadPart_1.json",
    "content": "{\n    \"status_code\": 200, \n    \"data\": {\n        \"ETag\": \"\\\"781936e8a21849d38e955224ef70d71e\\\"\", \n        \"ResponseMetadata\": {\n            \"HTTPStatusCode\": 200, \n            \"HostId\": \"/Dt2sy50X8WRf6CeE4OhoXMQftr4n5PUtT22ZblpVdfLkqo8pv7oeq6XaEoNCdjiPmN9+AtaXy0=\", \n            \"RequestId\": \"C3816300C7FA5E5F\"\n        }\n    }\n}\n"
  },
  {
    "path": "tests/test_app.py",
    "content": "from zappa.asynchronous import task\ntry:\n    from urllib.parse import parse_qs\nexcept ImportError:\n    from cgi import parse_qs\n\ntry:\n    from html import escape\nexcept ImportError:\n    from cgi import escape\n\n\ndef hello_world(environ, start_response):\n    parameters = parse_qs(environ.get('QUERY_STRING', ''))\n    if 'subject' in parameters:\n        subject = escape(parameters['subject'][0])\n    else:\n        subject = 'World'\n    start_response('200 OK', [('Content-Type', 'text/html')])\n    return ['''Hello {subject!s}\n    Hello {subject!s}!\n\n'''.format(**{'subject': subject})]\n\n\ndef schedule_me():\n    return \"Hello!\"\n\n@task\ndef async_me(arg1, **kwargs):\n    return \"run async when on lambda %s%s\" % (arg1, kwargs.get('foo', ''))\n\n\n@task(remote_aws_lambda_function_name='test-app-dev', remote_aws_region='us-east-1')\ndef remote_async_me(arg1, **kwargs):\n    return \"run async always on lambda %s%s\" % (arg1, kwargs.get('foo', ''))\n\n\ndef callback(self):\n    print(\"this is a callback\")\n\n\ndef prebuild_me():\n    print(\"this is a prebuild script\")\n\n"
  },
  {
    "path": "tests/test_bad_circular_extends_settings.json",
    "content": "{\n    \"ttt888\": {\n       \"touch\": false,\n       \"extends\": \"extendo\",\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [\n           {\n               \"function\": \"tests.test_app.schedule_me\",\n               \"expression\": \"rate(1 minute)\"\n           },\n           {\n               \"function\": \"test.test_app.method\",\n               \"event_source\": {\n                   \"arn\": \"arn:aws:sns:::1\",\n                   \"events\": [\n                     \"sns:Publish\"\n                   ]\n               }\n           }\n       ]\n    },\n    \"devor\": {\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [{\n          \"function\": \"tests.test_app.schedule_me\",\n          \"expression\": \"rate(1 minute)\"\n       }]\n    },\n    \"extendo\": {\n       \"extends\": \"ttt888\",\n       \"touch\": true,\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"environment_variables\": {\n          \"EXTENDO\": \"You bet\"\n       }\n    },\n    \"extendofail\": {\n       \"extends\": \"failfail\",\n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"environment_variables\": {\n          \"EXTENDO\": \"You bet\"\n       }\n    }\n}\n"
  },
  {
    "path": "tests/test_bad_environment_vars.json",
    "content": "{\n    \"ttt888\": {\n       \"touch\": false,\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n        \"environment_variables\": {\n            \"REMOTE_HOST\": \"example.net\",\n            \"REMOTE_PORT\": 9004,\n        },\n    }\n}\n"
  },
  {
    "path": "tests/test_bad_settings.json",
    "content": "{\n    \"ttt888\": {\n       \"s3_bucket\": \"lmbda\"\n       // note: missing comma is not enough to make hjson raise\n       // ValueError, however missing quote is enough;\n       \"app_function\": \"tests.test_app.hello_world\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2, \n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [\n           {\n               \"function\": \"tests.test_app.schedule_me\",\n               \"expression\": \"rate(1 minute)\"\n           },\n           {\n               \"function\": \"test.test_app.method\",\n               \"event_source\": {\n                   \"arn\": \"arn:aws:sns:::1\",\n                   \"events\": [\n                     \"sns:Publish\"\n                   ]\n               }\n           }\n       ]\n    },\n    \"devor\": {\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2, \n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [{\n          \"function\": \"tests.test_app.schedule_me\",\n          \"expression\": \"rate(1 minute)\"\n       }]\n    }\n}\n"
  },
  {
    "path": "tests/test_bad_stage_name_settings.json",
    "content": "{\n    \"ttt-888\": {\n       \"touch\": false,\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2, \n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [\n           {\n               \"function\": \"tests.test_app.schedule_me\",\n               \"expression\": \"rate(1 minute)\"\n           },\n           {\n               \"function\": \"test.test_app.method\",\n               \"event_source\": {\n                   \"arn\": \"arn:aws:sns:::1\",\n                   \"events\": [\n                     \"sns:Publish\"\n                   ]\n               }\n           }\n       ]\n    },\n    \"devor\": {\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2, \n       \"prebuild_script\": \"test_settings.prebuild_me\",\n       \"events\": [{\n          \"function\": \"tests.test_app.schedule_me\",\n          \"expression\": \"rate(1 minute)\"\n       }]\n    }\n}\n"
  },
  {
    "path": "tests/test_bot_exception_handler_settings.py",
    "content": "API_STAGE = 'dev'\nAPP_FUNCTION = 'app'\nAPP_MODULE = 'tests.test_wsgi_script_name_app'\nBINARY_SUPPORT = False\nCONTEXT_HEADER_MAPPINGS = {}\nDEBUG = 'True'\nDJANGO_SETTINGS = None\nDOMAIN = 'api.example.com'\nENVIRONMENT_VARIABLES = {}\nLOG_LEVEL = 'DEBUG'\nPROJECT_NAME = 'wsgi_script_name_settings'\nCOGNITO_TRIGGER_MAPPING = {}\nAWS_BOT_EVENT_MAPPING = {'intent-name:DialogCodeHook': 'tests.test_handler.raises_exception'}\nEXCEPTION_HANDLER = 'tests.test_handler.mocked_exception_handler'\n"
  },
  {
    "path": "tests/test_bot_handler_being_triggered.py",
    "content": "API_STAGE = 'dev'\nAPP_FUNCTION = 'app'\nAPP_MODULE = 'tests.test_wsgi_script_name_app'\nBINARY_SUPPORT = False\nCONTEXT_HEADER_MAPPINGS = {}\nDEBUG = 'True'\nDJANGO_SETTINGS = None\nDOMAIN = 'api.example.com'\nENVIRONMENT_VARIABLES = {}\nLOG_LEVEL = 'DEBUG'\nPROJECT_NAME = 'wsgi_script_name_settings'\nCOGNITO_TRIGGER_MAPPING = {}\nAWS_BOT_EVENT_MAPPING = {'intent-name:DialogCodeHook': 'tests.test_handler.handle_bot_intent'}\n"
  },
  {
    "path": "tests/test_event_script_app.py",
    "content": "from __future__ import print_function\n\n\ndef handler_for_events(event, context):\n    print('Event:', event)\n    return True\n"
  },
  {
    "path": "tests/test_event_script_settings.py",
    "content": "API_STAGE = 'dev'\nAPP_FUNCTION = 'handler_for_events'\nAPP_MODULE = 'tests.test_event_script_app'\nDEBUG = 'True'\nDJANGO_SETTINGS = None\nDOMAIN = 'api.example.com'\nENVIRONMENT_VARIABLES = {}\nLOG_LEVEL = 'DEBUG'\nPROJECT_NAME = 'test_event_script_app'\nCOGNITO_TRIGGER_MAPPING = {}\n"
  },
  {
    "path": "tests/test_exception_handler_settings.py",
    "content": "API_STAGE = 'dev'\nAPP_FUNCTION = 'raises_exception'\nAPP_MODULE = 'tests.test_handler'\nBINARY_SUPPORT = False\nCONTEXT_HEADER_MAPPINGS = {}\nDEBUG = 'True'\nDJANGO_SETTINGS = None\nDOMAIN = 'api.example.com'\nENVIRONMENT_VARIABLES = {}\nLOG_LEVEL = 'DEBUG'\nPROJECT_NAME = 'raises_exception'\nCOGNITO_TRIGGER_MAPPING = {}\nEXCEPTION_HANDLER = 'tests.test_handler.mocked_exception_handler'\n"
  },
  {
    "path": "tests/test_handler.py",
    "content": "from mock import Mock\nimport sys\nimport unittest\nfrom zappa.handler import LambdaHandler\nfrom zappa.utilities import merge_headers\n\n\ndef no_args():\n    return\n\n\ndef one_arg(first):\n    return first\n\n\ndef two_args(first, second):\n    return first, second\n\n\ndef var_args(*args):\n    return args\n\n\ndef var_args_with_one(first, *args):\n    return first, args[0]\n\n\ndef unsupported(first, second, third):\n    return first, second, third\n\n\ndef raises_exception(*args, **kwargs):\n    raise Exception('app exception')\n\n\ndef handle_bot_intent(event, context):\n    return \"Success\"\n\n\nmocked_exception_handler = Mock()\n\n\nclass TestZappa(unittest.TestCase):\n\n    def setUp(self):\n        mocked_exception_handler.reset_mock()\n\n    def tearDown(self):\n        LambdaHandler._LambdaHandler__instance = None\n        LambdaHandler.settings = None\n        LambdaHandler.settings_name = None\n\n    def test_run_function(self):\n        self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c'))\n        self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e')\n        self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c'))\n        self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c'))\n        self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c'))\n\n        try:\n            LambdaHandler.run_function(unsupported, 'e', 'c')\n            self.fail('Exception expected')\n        except RuntimeError as e:\n            pass\n\n    def test_run_fuction_with_type_hint(self):\n        scope = {}\n        exec('def f_with_type_hint() -> None: return', scope)\n        f_with_type_hint = scope['f_with_type_hint']\n        self.assertIsNone(LambdaHandler.run_function(f_with_type_hint, 'e', 'c'))\n\n    def test_wsgi_script_name_on_aws_url(self):\n        \"\"\"\n        Ensure that requests to the amazonaws.com host for an API with a\n        domain have the correct request.url\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'queryStringParameters': {},\n            'headers': {\n                'Host': '1234567890.execute-api.us-east-1.amazonaws.com',\n            },\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 200)\n        self.assertEqual(\n            response['body'],\n            'https://1234567890.execute-api.us-east-1.amazonaws.com/dev/return/request/url'\n        )\n\n    def test_wsgi_script_name_on_domain_url(self):\n        \"\"\"\n        Ensure that requests to the amazonaws.com host for an API with a\n        domain have the correct request.url\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'queryStringParameters': {},\n            'headers': {\n                'Host': 'example.com',\n            },\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 200)\n        self.assertEqual(\n            response['body'],\n            'https://example.com/return/request/url'\n        )\n\n    def test_wsgi_script_name_with_multi_value_header(self):\n        \"\"\"\n        Ensure that requests generated with multivalued headers (such as\n        from an ALB with Multi Valued Headers enabled) succeed.\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'queryStringParameters': {},\n            'multiValueHeaders': {\n                'Host': ['example.com'],\n            },\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n        response = lh.handler(event, None)\n        self.assertEqual(response['statusCode'], 200)\n        self.assertIn('multiValueHeaders', response)\n\n    def test_wsgi_script_name_with_multi_value_querystring(self):\n        \"\"\"\n        Ensure that requests generated with multivalue querystrings succeed.\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'multiValueQueryStringParameters': {\n                'multi': ['value', 'qs']\n            },\n            'multiValueHeaders': {\n                'Host': ['example.com'],\n            },\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 200)\n        self.assertEqual(\n            response['body'],\n            'https://example.com/return/request/url?multi=value&multi=qs'\n        )\n\n    def test_wsgi_script_name_on_test_request(self):\n        \"\"\"\n        Ensure that requests sent by the \"Send test request\" button behaves\n        sensibly\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'queryStringParameters': {},\n            'headers': {},\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 200)\n        self.assertEqual(\n            response['body'],\n            'https://zappa:80/return/request/url'\n        )\n\n    def test_exception_handler_on_web_request(self):\n        \"\"\"\n        Ensure that app exceptions triggered by web requests use the exception_handler.\n        \"\"\"\n        lh = LambdaHandler('tests.test_exception_handler_settings')\n\n        event = {\n            'body': '',\n            'resource': '/{proxy+}',\n            'requestContext': {},\n            'queryStringParameters': {},\n            'headers': {\n                'Host': '1234567890.execute-api.us-east-1.amazonaws.com',\n            },\n            'pathParameters': {\n                'proxy': 'return/request/url'\n            },\n            'httpMethod': 'GET',\n            'stageVariables': {},\n            'path': '/return/request/url'\n        }\n\n        mocked_exception_handler.assert_not_called()\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 500)\n        mocked_exception_handler.assert_called()\n\n    def test_wsgi_script_on_cognito_event_request(self):\n        \"\"\"\n        Ensure that requests sent by cognito behave sensibly\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {'version': '1',\n                 'region': 'eu-west-1',\n                 'userPoolId': 'region_poolID',\n                 'userName': 'uuu-id-here',\n                 'callerContext': {'awsSdkVersion': 'aws-sdk-js-2.149.0',\n                                   'clientId': 'client-id-here'},\n                 'triggerSource': 'PreSignUp_SignUp',\n                 'request': {'userAttributes':\n                                 {'email': 'email@example.com'}, 'validationData': None},\n                 'response': {'autoConfirmUser': False,\n                              'autoVerifyEmail': False,\n                              'autoVerifyPhone': False}}\n\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['response']['autoConfirmUser'], False)\n\n    def test_bot_triggered_event(self):\n        \"\"\"\n        Ensure that bot triggered events are handled as in the settings\n        \"\"\"\n        lh = LambdaHandler('tests.test_bot_handler_being_triggered')\n        # from : https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-lex\n        event = {\n            \"messageVersion\": \"1.0\",\n            \"invocationSource\": \"DialogCodeHook\",\n            \"userId\": \"user-id specified in the POST request to Amazon Lex.\",\n            \"sessionAttributes\": {\n                \"key1\": \"value1\",\n                \"key2\": \"value2\",\n            },\n            \"bot\": {\n                \"name\": \"bot-name\",\n                \"alias\": \"bot-alias\",\n                \"version\": \"bot-version\"\n            },\n            \"outputDialogMode\": \"Text or Voice, based on ContentType request header in runtime API request\",\n            \"currentIntent\": {\n                \"name\": \"intent-name\",\n                \"slots\": {\n                    \"slot-name\": \"value\",\n                    \"slot-name\": \"value\",\n                    \"slot-name\": \"value\"\n                },\n                \"confirmationStatus\": \"None, Confirmed, or Denied (intent confirmation, if configured)\"\n            }\n        }\n\n        response = lh.handler(event, None)\n\n        self.assertEqual(response, 'Success')\n\n    def test_exception_in_bot_triggered_event(self):\n        \"\"\"\n        Ensure that bot triggered exceptions are handled as defined in the settings.\n        \"\"\"\n        lh = LambdaHandler('tests.test_bot_exception_handler_settings')\n        # from : https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-lex\n        event = {\n            \"messageVersion\": \"1.0\",\n            \"invocationSource\": \"DialogCodeHook\",\n            \"userId\": \"user-id specified in the POST request to Amazon Lex.\",\n            \"sessionAttributes\": {\n                \"key1\": \"value1\",\n                \"key2\": \"value2\",\n            },\n            \"bot\": {\n                \"name\": \"bot-name\",\n                \"alias\": \"bot-alias\",\n                \"version\": \"bot-version\"\n            },\n            \"outputDialogMode\": \"Text or Voice, based on ContentType request header in runtime API request\",\n            \"currentIntent\": {\n                \"name\": \"intent-name\",\n                \"slots\": {\n                    \"slot-name\": \"value\",\n                    \"slot-name\": \"value\",\n                    \"slot-name\": \"value\"\n                },\n                \"confirmationStatus\": \"None, Confirmed, or Denied (intent confirmation, if configured)\"\n            }\n        }\n\n        response = lh.lambda_handler(event, None)\n        mocked_exception_handler.assert_called\n\n    def test_wsgi_script_name_on_alb_event(self):\n        \"\"\"\n        Ensure ALB-triggered events are properly handled by LambdaHandler\n        ALB-forwarded events have a slightly different request structure than API-Gateway\n        https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html\n        \"\"\"\n        lh = LambdaHandler('tests.test_wsgi_script_name_settings')\n\n        event = {\n            'requestContext': {\n                'elb': {\n                    'targetGroupArn': 'arn:aws:elasticloadbalancing:region:123456789012:targetgroup/my-target-group/6d0ecf831eec9f09'\n                }\n            },\n            'httpMethod': 'GET',\n            'path': '/return/request/url',\n            'queryStringParameters': {},\n            'headers': {\n                'accept': 'text/html,application/xhtml+xml',\n                'accept-language': 'en-US,en;q=0.8',\n                'content-type': 'text/plain',\n                'cookie': 'cookies',\n                'host': '1234567890.execute-api.us-east-1.amazonaws.com',\n                'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)',\n                'x-amzn-trace-id': 'Root=1-5bdb40ca-556d8b0c50dc66f0511bf520',\n                'x-forwarded-for': '72.21.198.66',\n                'x-forwarded-port': '443',\n                'x-forwarded-proto': 'https'\n            },\n            'isBase64Encoded': False,\n            'body': ''\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response['statusCode'], 200)\n        self.assertEqual(response['statusDescription'], '200 OK')\n        self.assertEqual(response['isBase64Encoded'], False)\n        self.assertEqual(\n            response['body'],\n            'https://1234567890.execute-api.us-east-1.amazonaws.com/return/request/url'\n        )\n\n    def test_merge_headers_no_multi_value(self):\n        event = {\n            'headers': {\n                'a': 'b'\n            }\n        }\n\n        merged = merge_headers(event)\n        self.assertEqual(merged['a'], 'b')\n\n    def test_merge_headers_combine_values(self):\n        event = {\n            'headers': {\n                'a': 'b',\n                'z': 'q'\n            },\n            'multiValueHeaders': {\n                'a': ['c'],\n                'x': ['y']\n            }\n        }\n\n        merged = merge_headers(event)\n        self.assertEqual(merged['a'], 'c')\n        self.assertEqual(merged['x'], 'y')\n        self.assertEqual(merged['z'], 'q')\n\n    def test_merge_headers_no_single_value(self):\n        event = {\n            'multiValueHeaders': {\n                'a': ['c', 'd'],\n                'x': ['y', 'z', 'f']\n            }\n        }\n        merged = merge_headers(event)\n        self.assertEqual(merged['a'], 'c, d')\n        self.assertEqual(merged['x'], 'y, z, f')\n\n    def test_cloudwatch_subscription_event(self):\n        \"\"\"\n        Test that events sent in the format used by CloudWatch logs via\n        subscription filters are handled properly.\n        The actual payload that Lambda receives is in the following format\n        { \"awslogs\": {\"data\": \"BASE64ENCODED_GZIP_COMPRESSED_DATA\"} }\n        https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html\n        \"\"\"\n        lh = LambdaHandler('tests.test_event_script_settings')\n\n        event = {\n            'awslogs': {\n                'data': \"some-data-not-important-for-test\"\n            }\n        }\n        response = lh.handler(event, None)\n\n        self.assertEqual(response, True)\n"
  },
  {
    "path": "tests/test_non_ascii_environment_var_key.json",
    "content": "{\n    \"ttt888\": {\n       \"touch\": false,\n       \"s3_bucket\": \"lmbda\",\n       \"app_function\": \"tests.test_app.hello_world\",\n       \"callbacks\": {\n           \"settings\": \"test_settings.callback\",\n           \"post\": \"test_settings.callback\",\n           \"zip\": \"test_settings.callback\"\n       },\n       \"delete_local_zip\": true,\n       \"debug\": true,\n       \"parameter_depth\": 2,\n        \"environment_variables\": {\n            \"REMOTE_HOST☣\": \"example.net\"\n        },\n    }\n}\n"
  },
  {
    "path": "tests/test_one_env.json",
    "content": "{\n    \"lonely\": {\n\t\"s3_bucket\": \"lmbda\",\n\t\"app_function\": \"app.app\",\n\t\"delete_zip\": true \n    }\n}\n"
  },
  {
    "path": "tests/test_settings.toml",
    "content": "[ttt888]\napp_function = \"tests.test_app.hello_world\"\ndebug = true\ndelete_local_zip = true\nparameter_depth = 2\nprebuild_script = \"test_settings.prebuild_me\"\ns3_bucket = \"lmbda\"\ntouch = false\nuse_precompiled_packages = false\n[ttt888.events]\n\tfunction = \"tests.test_app.schedule_me\" \n\texpression = \"rate(1 minute)\"\n"
  },
  {
    "path": "tests/test_settings.yaml",
    "content": "---\nttt888:\n  touch: false\n  s3_bucket: lmbda\n  app_function: tests.test_app.hello_world\n  callbacks:\n    settings: test_settings.callback\n    post: test_settings.callback\n    zip: test_settings.callback\n  delete_local_zip: true\n  debug: true\n  parameter_depth: 2\n  prebuild_script: test_settings.prebuild_me\n  events:\n  - function: tests.test_app.schedule_me\n    expression: rate(1 minute)\n  - function: test.test_app.method\n    event_source:\n      arn: arn:aws:sns:::1\n      events:\n      - sns:Publish\ndevor:\n  s3_bucket: lmbda\n  app_function: tests.test_app.hello_world\n  callbacks:\n    settings: tests.test_app.callback\n    post: tests.test_app.callback\n    zip: test_settings.callback\n  delete_local_zip: true\n  debug: true\n  parameter_depth: 2\n  prebuild_script: test_settings.prebuild_me\n  events:\n  - function: tests.test_app.schedule_me\n    expression: rate(1 minute)\nextendo:\n  extends: ttt888\n  touch: true\n  prebuild_script: test_settings.prebuild_me\n  environment_variables:\n    EXTENDO: You bet\nextendo2:\n  extends: extendo\n  s3_bucket: lmbda2\ndeprecated_remote_env:\n  s3_bucket: lmbda\n  remote_env_bucket: lmbda-env\n  remote_env_file: dev/env.json\nremote_env:\n  s3_bucket: lmbda\n  remote_env: s3://lmbda-env/prod/env.json\nextendofail:\n  extends: failfail\n  prebuild_script: test_settings.prebuild_me\n  environment_variables:\n    EXTENDO: You bet\n\n"
  },
  {
    "path": "tests/test_settings.yml",
    "content": "---\nttt888:\n  touch: false\n  s3_bucket: lmbda\n  app_function: tests.test_app.hello_world\n  callbacks:\n    settings: test_settings.callback\n    post: test_settings.callback\n    zip: test_settings.callback\n  delete_local_zip: true\n  debug: true\n  parameter_depth: 2\n  prebuild_script: test_settings.prebuild_me\n  events:\n  - function: tests.test_app.schedule_me\n    expression: rate(1 minute)\n  - function: test.test_app.method\n    event_source:\n      arn: arn:aws:sns:::1\n      events:\n      - sns:Publish\ndevor:\n  s3_bucket: lmbda\n  app_function: tests.test_app.hello_world\n  callbacks:\n    settings: tests.test_app.callback\n    post: tests.test_app.callback\n    zip: test_settings.callback\n  delete_local_zip: true\n  debug: true\n  parameter_depth: 2\n  prebuild_script: test_settings.prebuild_me\n  events:\n  - function: tests.test_app.schedule_me\n    expression: rate(1 minute)\nextendo:\n  extends: ttt888\n  touch: true\n  prebuild_script: test_settings.prebuild_me\n  environment_variables:\n    EXTENDO: You bet\nextendo2:\n  extends: extendo\n  s3_bucket: lmbda2\ndeprecated_remote_env:\n  s3_bucket: lmbda\n  remote_env_bucket: lmbda-env\n  remote_env_file: dev/env.json\nremote_env:\n  s3_bucket: lmbda\n  remote_env: s3://lmbda-env/prod/env.json\nextendofail:\n  extends: failfail\n  prebuild_script: test_settings.prebuild_me\n  environment_variables:\n    EXTENDO: You bet\n\n"
  },
  {
    "path": "tests/test_wsgi_script_name_app.py",
    "content": "from flask import Flask, request\n\napp = Flask(__name__)\n\n\n@app.route('/return/request/url', methods=['GET', 'POST'])\ndef return_request_url():\n    return request.url\n"
  },
  {
    "path": "tests/test_wsgi_script_name_settings.py",
    "content": "API_STAGE = 'dev'\nAPP_FUNCTION = 'app'\nAPP_MODULE = 'tests.test_wsgi_script_name_app'\nBINARY_SUPPORT = False\nCONTEXT_HEADER_MAPPINGS = {}\nDEBUG = 'True'\nDJANGO_SETTINGS = None\nDOMAIN = 'api.example.com'\nENVIRONMENT_VARIABLES = {}\nLOG_LEVEL = 'DEBUG'\nPROJECT_NAME = 'wsgi_script_name_settings'\nCOGNITO_TRIGGER_MAPPING = {}\n"
  },
  {
    "path": "tests/tests.py",
    "content": "# -*- coding: utf8 -*-\nimport collections\nimport json\n\nfrom io import BytesIO\nimport botocore\nimport botocore.stub\nimport flask\nimport mock\nimport os\nimport random\nimport string\nimport zipfile\nimport unittest\nimport shutil\nimport sys\nimport tempfile\nimport uuid\n\nfrom click.globals import resolve_color_default\nfrom click.exceptions import ClickException\n\nfrom zappa.cli import ZappaCLI, shamelessly_promote, disable_click_colors\nfrom zappa.core import ALB_LAMBDA_ALIAS\nfrom zappa.ext.django_zappa import get_django_wsgi\nfrom zappa.letsencrypt import get_cert_and_update_domain, create_domain_key, create_domain_csr, \\\n    create_chained_certificate, cleanup, parse_account_key, parse_csr, sign_certificate, encode_certificate,\\\n    register_account, verify_challenge, gettempdir\nfrom zappa.utilities import (\n    conflicts_with_a_neighbouring_module, contains_python_files_or_subdirs,\n    detect_django_settings, detect_flask_apps, get_venv_from_python_version,\n    human_size, InvalidAwsLambdaName, parse_s3_url, string_to_timestamp,\n    titlecase_keys, is_valid_bucket_name, validate_name\n)\nfrom zappa.wsgi import create_wsgi_request, common_log\nfrom zappa.core import Zappa, ASSUME_POLICY, ATTACH_POLICY\n\n\ndef random_string(length):\n    return ''.join(random.choice(string.printable) for _ in range(length))\n\n\nclass TestZappa(unittest.TestCase):\n    def setUp(self):\n        self.sleep_patch = mock.patch('time.sleep', return_value=None)\n        # Tests expect us-east-1.\n        # If the user has set a different region in env variables, we set it aside for now and use us-east-1\n        self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None)\n        os.environ['AWS_DEFAULT_REGION'] = 'us-east-1'\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.start()\n\n    def tearDown(self):\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.stop()\n        del os.environ['AWS_DEFAULT_REGION']\n        if self.users_current_region_name is not None:\n            # Give the user their AWS region back, we're done testing with us-east-1.\n            os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name\n\n    ##\n    # Sanity Tests\n    ##\n\n    def test_test(self):\n        self.assertTrue(True)\n    ##\n    # Basic Tests\n    ##\n\n    def test_zappa(self):\n        self.assertTrue(True)\n        Zappa()\n\n    def test_disable_click_colors(self):\n        disable_click_colors()\n        assert resolve_color_default() is False\n\n    @mock.patch('zappa.core.find_packages')\n    @mock.patch('os.remove')\n    def test_copy_editable_packages(self, mock_remove, mock_find_packages):\n        virtual_env = os.environ.get(\"VIRTUAL_ENV\")\n        if not virtual_env:\n            return self.skipTest(\n                \"test_copy_editable_packages must be run in a virtualenv\")\n\n        temp_package_dir = tempfile.mkdtemp()\n        try:\n            egg_links = [os.path.join(\n                virtual_env, \"lib\", get_venv_from_python_version(),\n                \"site-packages\", \"test-copy-editable-packages.egg-link\")]\n            egg_path = \"/some/other/directory/package\"\n            mock_find_packages.return_value = [\n                \"package\", \"package.subpackage\", \"package.another\"]\n            temp_egg_link = os.path.join(\n                temp_package_dir, 'package-python.egg-link')\n\n            z = Zappa()\n            mock_open = mock.mock_open(read_data=egg_path.encode(\"utf-8\"))\n            with mock.patch(\"zappa.core.open\", mock_open), \\\n                    mock.patch(\"glob.glob\") as mock_glob, \\\n                    mock.patch(\"zappa.core.copytree\") as mock_copytree:\n                # we use glob.glob to get the egg-links in the temp packages\n                # directory\n                mock_glob.return_value = [temp_egg_link]\n\n                z.copy_editable_packages(egg_links, temp_package_dir)\n\n                # make sure we copied the right directories\n                mock_copytree.assert_called_with(\n                    os.path.join(egg_path, 'package'),\n                    os.path.join(temp_package_dir, 'package'),\n                    metadata=False, symlinks=False\n                )\n                self.assertEqual(mock_copytree.call_count, 1)\n\n                # make sure it removes the egg-link from the temp packages\n                # directory\n                mock_remove.assert_called_with(temp_egg_link)\n                self.assertEqual(mock_remove.call_count, 1)\n        finally:\n            shutil.rmtree(temp_package_dir)\n\n        return\n\n    def test_create_lambda_package(self):\n        # mock the pkg_resources.WorkingSet() to include a known package in lambda_packages so that the code\n        # for zipping pre-compiled packages gets called\n        mock_installed_packages = {'psycopg2': '2.6.1'}\n        with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):\n            z = Zappa(runtime='python3.6')\n            path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))\n            self.assertTrue(os.path.isfile(path))\n            os.remove(path)\n\n    def test_get_manylinux_python36(self):\n        z = Zappa(runtime='python3.6')\n        self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2', '2.7.1'))\n        self.assertIsNone(z.get_cached_manylinux_wheel('derpderpderpderp', '0.0'))\n\n        # mock with a known manylinux wheel package so that code for downloading them gets invoked\n        mock_installed_packages = {'psycopg2': '2.7.1'}\n        with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):\n            z = Zappa(runtime='python3.6')\n            path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))\n            self.assertTrue(os.path.isfile(path))\n            os.remove(path)\n\n    def test_get_manylinux_python37(self):\n        z = Zappa(runtime='python3.7')\n        self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2', '2.7.6'))\n        self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0'))\n\n        # mock with a known manylinux wheel package so that code for downloading them gets invoked\n        mock_installed_packages = {'psycopg2': '2.7.6'}\n        with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):\n            z = Zappa(runtime='python3.7')\n            path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))\n            self.assertTrue(os.path.isfile(path))\n            os.remove(path)\n\n    def test_get_manylinux_python38(self):\n        z = Zappa(runtime='python3.8')\n        self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2-binary', '2.8.4'))\n        self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0'))\n\n        # mock with a known manylinux wheel package so that code for downloading them gets invoked\n        mock_installed_packages = {'psycopg2-binary': '2.8.4'}\n        with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):\n            z = Zappa(runtime='python3.8')\n            path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))\n            self.assertTrue(os.path.isfile(path))\n            os.remove(path)\n\n        # same, but with an ABI3 package\n        mock_installed_packages = {'cryptography': '2.8'}\n        with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):\n            z = Zappa(runtime='python3.8')\n            path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))\n            self.assertTrue(os.path.isfile(path))\n            os.remove(path)\n\n    def test_getting_installed_packages(self, *args):\n        z = Zappa(runtime='python3.6')\n\n        # mock pkg_resources call to be same as what our mocked site packages dir has\n        mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location'])\n        mock_pip_installed_packages = [mock_package('super_package', '0.1', '/venv/site-packages')]\n\n        with mock.patch('os.path.isdir', return_value=True):\n            with mock.patch('os.listdir', return_value=['super_package']):\n                import pkg_resources  # this gets called in non-test Zappa mode\n                with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages):\n                    self.assertDictEqual(z.get_installed_packages('',''), {'super_package' : '0.1'})\n\n    def test_getting_installed_packages_mixed_case_location(self, *args):\n        z = Zappa(runtime='python3.6')\n\n        # mock pip packages call to be same as what our mocked site packages dir has\n        mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location'])\n        mock_pip_installed_packages = [\n            mock_package('SuperPackage', '0.1', '/Venv/site-packages'),\n            mock_package('SuperPackage64', '0.1', '/Venv/site-packages64'),\n        ]\n\n        with mock.patch('os.path.isdir', return_value=True):\n            with mock.patch('os.listdir', return_value=[]):\n                import pkg_resources  # this gets called in non-test Zappa mode\n                with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages):\n                    self.assertDictEqual(z.get_installed_packages('/venv/Site-packages','/venv/site-packages64'), {\n                       'superpackage': '0.1',\n                       'superpackage64': '0.1',\n                })\n\n    def test_getting_installed_packages_mixed_case(self, *args):\n        z = Zappa(runtime='python3.6')\n\n        # mock pkg_resources call to be same as what our mocked site packages dir has\n        mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location'])\n        mock_pip_installed_packages = [mock_package('SuperPackage', '0.1', '/venv/site-packages')]\n\n        with mock.patch('os.path.isdir', return_value=True):\n            with mock.patch('os.listdir', return_value=['superpackage']):\n                import pkg_resources  # this gets called in non-test Zappa mode\n                with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages):\n                    self.assertDictEqual(z.get_installed_packages('',''), {'superpackage' : '0.1'})\n\n\n    def test_load_credentials(self):\n        z = Zappa()\n        z.aws_region = 'us-east-1'\n        z.load_credentials()\n        self.assertEqual(z.boto_session.region_name, 'us-east-1')\n        self.assertEqual(z.aws_region, 'us-east-1')\n\n        z.aws_region = 'eu-west-1'\n        z.profile_name = 'default'\n        z.load_credentials()\n        self.assertEqual(z.boto_session.region_name, 'eu-west-1')\n        self.assertEqual(z.aws_region, 'eu-west-1')\n\n        creds = {\n            'AWS_ACCESS_KEY_ID': 'AK123',\n            'AWS_SECRET_ACCESS_KEY': 'JKL456',\n            'AWS_DEFAULT_REGION': 'us-west-1'\n        }\n        with mock.patch.dict('os.environ', creds):\n            z.aws_region = None\n            z.load_credentials()\n            loaded_creds = z.boto_session._session.get_credentials()\n\n        self.assertEqual(loaded_creds.access_key, 'AK123')\n        self.assertEqual(loaded_creds.secret_key, 'JKL456')\n        self.assertEqual(z.boto_session.region_name, 'us-west-1')\n\n    def test_create_api_gateway_routes_with_different_auth_methods(self):\n        z = Zappa()\n        z.parameter_depth = 1\n        z.integration_response_codes = [200]\n        z.method_response_codes = [200]\n        z.http_methods = ['GET']\n        z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n        lambda_arn = 'arn:aws:lambda:us-east-1:12345:function:helloworld'\n\n        # No auth at all\n        z.create_stack_template(lambda_arn, 'helloworld', False, False, None)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"NONE\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"NONE\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"ApiKeyRequired\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"ApiKeyRequired\"])\n\n        # IAM auth\n        z.create_stack_template(lambda_arn, 'helloworld', False, True, None)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"ApiKeyRequired\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"ApiKeyRequired\"])\n\n        # CORS with auth\n        z.create_stack_template(lambda_arn, 'helloworld', False, True, None, True)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"NONE\", parsable_template[\"Resources\"][\"OPTIONS0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"NONE\", parsable_template[\"Resources\"][\"OPTIONS1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"MOCK\", parsable_template[\"Resources\"][\"OPTIONS0\"][\"Properties\"][\"Integration\"][\"Type\"])\n        self.assertEqual(\"MOCK\", parsable_template[\"Resources\"][\"OPTIONS1\"][\"Properties\"][\"Integration\"][\"Type\"])\n        self.assertEqual(\"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'\",\n                         parsable_template[\"Resources\"][\"OPTIONS0\"][\"Properties\"][\"Integration\"][\"IntegrationResponses\"][0][\"ResponseParameters\"][\"method.response.header.Access-Control-Allow-Headers\"])\n        self.assertEqual(\"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'\",\n                         parsable_template[\"Resources\"][\"OPTIONS1\"][\"Properties\"][\"Integration\"][\"IntegrationResponses\"][0][\"ResponseParameters\"][\"method.response.header.Access-Control-Allow-Headers\"])\n        self.assertTrue(parsable_template[\"Resources\"][\"OPTIONS0\"][\"Properties\"][\"MethodResponses\"][0][\"ResponseParameters\"][\"method.response.header.Access-Control-Allow-Headers\"])\n        self.assertTrue(parsable_template[\"Resources\"][\"OPTIONS1\"][\"Properties\"][\"MethodResponses\"][0][\"ResponseParameters\"][\"method.response.header.Access-Control-Allow-Headers\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"ApiKeyRequired\"])\n        self.assertEqual(False, parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"ApiKeyRequired\"])\n\n        # API Key auth\n        z.create_stack_template(lambda_arn, 'helloworld', True, True, None)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(True, parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"ApiKeyRequired\"])\n        self.assertEqual(True, parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"ApiKeyRequired\"])\n\n        # Authorizer and IAM\n        authorizer = {\n            \"function\": \"runapi.authorization.gateway_authorizer.evaluate_token\",\n            \"result_ttl\": 300,\n            \"token_header\": \"Authorization\",\n            \"validation_expression\": \"xxx\"\n        }\n        z.create_stack_template(lambda_arn, 'helloworld', False, True, authorizer)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"AWS_IAM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        with self.assertRaises(KeyError):\n            parsable_template[\"Resources\"][\"Authorizer\"]\n\n        # Authorizer with validation expression\n        invocations_uri = 'arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/' + lambda_arn + '/invocations'\n        z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"CUSTOM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"CUSTOM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"TOKEN\", parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"Type\"])\n        self.assertEqual(\"ZappaAuthorizer\", parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"Name\"])\n        self.assertEqual(300, parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"AuthorizerResultTtlInSeconds\"])\n        self.assertEqual(invocations_uri, parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"AuthorizerUri\"])\n        self.assertEqual(z.credentials_arn, parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"AuthorizerCredentials\"])\n        self.assertEqual(\"xxx\", parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"IdentityValidationExpression\"])\n\n        # Authorizer without validation expression\n        authorizer.pop('validation_expression', None)\n        z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual(\"CUSTOM\", parsable_template[\"Resources\"][\"GET0\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"CUSTOM\", parsable_template[\"Resources\"][\"GET1\"][\"Properties\"][\"AuthorizationType\"])\n        self.assertEqual(\"TOKEN\", parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"Type\"])\n        with self.assertRaises(KeyError):\n            parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"IdentityValidationExpression\"]\n\n        # Authorizer with arn\n        authorizer = {\n            \"arn\": \"arn:aws:lambda:us-east-1:123456789012:function:my-function\",\n        }\n        z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer)\n        parsable_template = json.loads(z.cf_template.to_json())\n        self.assertEqual('arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:my-function/invocations', parsable_template[\"Resources\"][\"Authorizer\"][\"Properties\"][\"AuthorizerUri\"])\n\n    def test_policy_json(self):\n        # ensure the policy docs are valid JSON\n        json.loads(ASSUME_POLICY)\n        json.loads(ATTACH_POLICY)\n\n    def test_schedule_events(self):\n        z = Zappa()\n        path = os.getcwd()\n      # z.schedule_events # TODO\n\n\n    def test_update_aws_env_vars(self):\n        z = Zappa()\n        z.credentials_arn = object()\n\n        with mock.patch.object(z, \"lambda_client\") as mock_client:\n            # Simulate already having some AWS env vars remotely\n            mock_client.get_function_configuration.return_value = {\"Environment\": {\"Variables\": {\"REMOTE_ONLY\": \"AAA\", \"CHANGED_REMOTE\" : \"BBB\"}}}\n            z.update_lambda_configuration(\"test\", \"test\", \"test\", aws_environment_variables={\"CHANGED_REMOTE\" : \"ZZ\", \"LOCAL_ONLY\" : \"YY\"})\n            end_result_should_be = {\"REMOTE_ONLY\": \"AAA\", \"CHANGED_REMOTE\" : \"ZZ\", \"LOCAL_ONLY\" : \"YY\"}\n            self.assertEqual(mock_client.update_function_configuration.call_args[1][\"Environment\"], { \"Variables\": end_result_should_be})\n\n        with mock.patch.object(z, \"lambda_client\") as mock_client:\n            # Simulate already having some AWS env vars remotely but none set in aws_environment_variables\n            mock_client.get_function_configuration.return_value = {\n                \"Environment\": {\"Variables\": {\"REMOTE_ONLY_1\": \"AAA\", \"REMOTE_ONLY_2\": \"BBB\"}}}\n            z.update_lambda_configuration(\"test\", \"test\", \"test\")\n            end_result_should_be = {\"REMOTE_ONLY_1\": \"AAA\", \"REMOTE_ONLY_2\": \"BBB\"}\n            self.assertEqual(mock_client.update_function_configuration.call_args[1][\"Environment\"],\n                             {\"Variables\": end_result_should_be})\n\n\n    def test_update_layers(self):\n        z = Zappa()\n        z.credentials_arn = object()\n\n        with mock.patch.object(z, \"lambda_client\") as mock_client:\n            mock_client.get_function_configuration.return_value = {}\n            z.update_lambda_configuration(\"test\", \"test\", \"test\", layers=[\"Layer1\", \"Layer2\"])\n            self.assertEqual(mock_client.update_function_configuration.call_args[1][\"Layers\"], [\"Layer1\", \"Layer2\"])\n        with mock.patch.object(z, \"lambda_client\") as mock_client:\n            mock_client.get_function_configuration.return_value = {}\n            z.update_lambda_configuration(\"test\", \"test\", \"test\")\n            self.assertEqual(mock_client.update_function_configuration.call_args[1][\"Layers\"], [])\n\n\n    def test_update_empty_aws_env_hash(self):\n        z = Zappa()\n        z.credentials_arn = object()\n\n        with mock.patch.object(z, \"lambda_client\") as mock_client:\n            # Simulate having no AWS env vars remotely\n            mock_client.get_function_configuration.return_value = {}\n            z.update_lambda_configuration(\"test\", \"test\", \"test\", aws_environment_variables={\"LOCAL_ONLY\" : \"LZ\", \"SHOW_AND_TELL\" : \"SHA\"})\n            end_result_should_be = {\"LOCAL_ONLY\" : \"LZ\", \"SHOW_AND_TELL\" : \"SHA\"}\n            self.assertEqual(mock_client.update_function_configuration.call_args[1][\"Environment\"], { \"Variables\": end_result_should_be})\n\n\n    ##\n    # Logging\n    ##\n\n    def test_logging(self):\n        \"\"\"\n        TODO\n        \"\"\"\n        Zappa()\n\n    ##\n    # Mapping and pattern tests\n    # Deprecated\n    ##\n\n    # def test_redirect_pattern(self):\n    #     test_urls = [\n    #         # a regular endpoint url\n    #         'https://asdf1234.execute-api.us-east-1.amazonaws.com/env/path/to/thing',\n    #         # an external url (outside AWS)\n    #         'https://github.com/Miserlou/zappa/issues?q=is%3Aissue+is%3Aclosed',\n    #         # a local url\n    #         '/env/path/to/thing'\n    #     ]\n\n    #     for code in ['301', '302']:\n    #         pattern = Zappa.selection_pattern(code)\n\n    #         for url in test_urls:\n    #             self.assertRegexpMatches(url, pattern)\n\n    # def test_b64_pattern(self):\n    #     head = '\\{\"http_status\": '\n\n    #     for code in ['400', '401', '402', '403', '404', '500']:\n    #         pattern = Zappa.selection_pattern(code)\n\n    #         document = head + code + random_string(50)\n    #         self.assertRegexpMatches(document, pattern)\n\n    #         for bad_code in ['200', '301', '302']:\n    #             document = base64.b64encode(head + bad_code + random_string(50))\n    #             self.assertNotRegexpMatches(document, pattern)\n\n    # def test_200_pattern(self):\n    #     pattern = Zappa.selection_pattern('200')\n    #     self.assertEqual(pattern, '')\n\n    ##\n    # WSGI\n    ##\n\n    def test_wsgi_event(self):\n\n        ## This is a pre-proxy+ event\n        # event = {\n        #     \"body\": \"\",\n        #     \"headers\": {\n        #         \"Via\": \"1.1 e604e934e9195aaf3e36195adbcb3e18.cloudfront.net (CloudFront)\",\n        #         \"Accept-Language\": \"en-US,en;q=0.5\",\n        #         \"Accept-Encoding\": \"gzip\",\n        #         \"CloudFront-Is-SmartTV-Viewer\": \"false\",\n        #         \"CloudFront-Forwarded-Proto\": \"https\",\n        #         \"X-Forwarded-For\": \"109.81.209.118, 216.137.58.43\",\n        #         \"CloudFront-Viewer-Country\": \"CZ\",\n        #         \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n        #         \"X-Forwarded-Proto\": \"https\",\n        #         \"X-Amz-Cf-Id\": \"LZeP_TZxBgkDt56slNUr_H9CHu1Us5cqhmRSswOh1_3dEGpks5uW-g==\",\n        #         \"CloudFront-Is-Tablet-Viewer\": \"false\",\n        #         \"X-Forwarded-Port\": \"443\",\n        #         \"CloudFront-Is-Mobile-Viewer\": \"false\",\n        #         \"CloudFront-Is-Desktop-Viewer\": \"true\",\n        #         \"Content-Type\": \"application/json\"\n        #     },\n        #     \"params\": {\n        #         \"parameter_1\": \"asdf1\",\n        #         \"parameter_2\": \"asdf2\",\n        #     },\n        #     \"method\": \"POST\",\n        #     \"query\": {\n        #         \"dead\": \"beef\"\n        #     }\n        # }\n\n        event = {\n            'body': None,\n            'resource': '/',\n            'requestContext': {\n                'resourceId': '6cqjw9qu0b',\n                'apiId': '9itr2lba55',\n                'resourcePath': '/',\n                'httpMethod': 'GET',\n                'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5',\n                'accountId': '724336686645',\n                'identity': {\n                    'apiKey': None,\n                    'userArn': None,\n                    'cognitoAuthenticationType': None,\n                    'caller': None,\n                    'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0',\n                    'user': None,\n                    'cognitoIdentityPoolId': None,\n                    'cognitoIdentityId': None,\n                    'cognitoAuthenticationProvider': None,\n                    'sourceIp': '50.191.225.98',\n                    'accountId': None,\n                    },\n                'stage': 'devorr',\n                },\n            'queryStringParameters': None,\n            'httpMethod': 'GET',\n            'pathParameters': None,\n            'headers': {\n                'Via': '1.1 6801928d54163af944bf854db8d5520e.cloudfront.net (CloudFront)',\n                'Accept-Language': 'en-US,en;q=0.5',\n                'Accept-Encoding': 'gzip, deflate, br',\n                'CloudFront-Is-SmartTV-Viewer': 'false',\n                'CloudFront-Forwarded-Proto': 'https',\n                'X-Forwarded-For': '50.191.225.98, 204.246.168.101',\n                'CloudFront-Viewer-Country': 'US',\n                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n                'Upgrade-Insecure-Requests': '1',\n                'Host': '9itr2lba55.execute-api.us-east-1.amazonaws.com',\n                'X-Forwarded-Proto': 'https',\n                'X-Amz-Cf-Id': 'qgNdqKT0_3RMttu5KjUdnvHI3OKm1BWF8mGD2lX8_rVrJQhhp-MLDw==',\n                'CloudFront-Is-Tablet-Viewer': 'false',\n                'X-Forwarded-Port': '443',\n                'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0',\n                'CloudFront-Is-Mobile-Viewer': 'false',\n                'CloudFront-Is-Desktop-Viewer': 'true',\n                },\n            'stageVariables': None,\n            'path': '/',\n            }\n\n        request = create_wsgi_request(event)\n\n    def test_wsgi_path_info_unquoted(self):\n        event = {\n                \"body\": {},\n                \"headers\": {},\n                \"pathParameters\": {},\n                \"path\": '/path%3A1', # encoded /path:1\n                \"httpMethod\": \"GET\",\n                \"queryStringParameters\": {},\n                \"requestContext\": {}\n            }\n        request = create_wsgi_request(event, trailing_slash=True)\n        self.assertEqual(\"/path:1\", request['PATH_INFO'])\n\n    def test_wsgi_latin1(self):\n        event = {\n            \"body\": {},\n            \"headers\": {},\n            \"pathParameters\": {},\n            \"path\": '/path/%E4%BB%8A%E6%97%A5%E3%81%AF',\n            \"httpMethod\": \"GET\",\n            \"queryStringParameters\": {\"a\": \"%E4%BB%8A%E6%97%A5%E3%81%AF\"},\n            \"requestContext\": {}\n        }\n        request = create_wsgi_request(event, script_name=\"%E4%BB%8A%E6%97%A5%E3%81%AF\")\n        # verify that the path, query params and script name can be encoded in iso-8859-1\n        request['PATH_INFO'].encode('iso-8859-1')\n        request['QUERY_STRING'].encode('iso-8859-1')\n        request['SCRIPT_NAME'].encode('iso-8859-1')\n\n    def test_wsgi_logging(self):\n        # event = {\n        #     \"body\": {},\n        #     \"headers\": {},\n        #     \"params\": {\n        #         \"parameter_1\": \"asdf1\",\n        #         \"parameter_2\": \"asdf2\",\n        #     },\n        #     \"httpMethod\": \"GET\",\n        #     \"query\": {}\n        # }\n\n        event = {'body': None, 'resource': '/{proxy+}', 'requestContext': {'resourceId': 'dg451y', 'apiId': '79gqbxq31c', 'resourcePath': '/{proxy+}', 'httpMethod': 'GET', 'requestId': '766df67f-8991-11e6-b2c4-d120fedb94e5', 'accountId': '724336686645', 'identity': {'apiKey': None, 'userArn': None, 'cognitoAuthenticationType': None, 'caller': None, 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0', 'user': None, 'cognitoIdentityPoolId': None, 'cognitoIdentityId': None, 'cognitoAuthenticationProvider': None, 'sourceIp': '96.90.37.59', 'accountId': None}, 'stage': 'devorr'}, 'queryStringParameters': None, 'httpMethod': 'GET', 'pathParameters': {'proxy': 'asdf1/asdf2'}, 'headers': {'Via': '1.1 b2aeb492548a8a2d4036401355f928dd.cloudfront.net (CloudFront)', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'X-Forwarded-Port': '443', 'X-Forwarded-For': '96.90.37.59, 54.240.144.50', 'CloudFront-Viewer-Country': 'US', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Upgrade-Insecure-Requests': '1', 'Host': '79gqbxq31c.execute-api.us-east-1.amazonaws.com', 'X-Forwarded-Proto': 'https', 'X-Amz-Cf-Id': 'BBFP-RhGDrQGOzoCqjnfB2I_YzWt_dac9S5vBcSAEaoM4NfYhAQy7Q==', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0', 'CloudFront-Forwarded-Proto': 'https'}, 'stageVariables': None, 'path': '/asdf1/asdf2'}\n\n        environ = create_wsgi_request(event, trailing_slash=False)\n        response_tuple = collections.namedtuple('Response', ['status_code', 'content'])\n        response = response_tuple(200, 'hello')\n        le = common_log(environ, response, response_time=True)\n        le = common_log(environ, response, response_time=False)\n\n    def test_wsgi_multipart(self):\n        #event = {'body': 'LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03Njk1MjI4NDg0Njc4MTc2NTgwNjMwOTYxDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9Im15c3RyaW5nIg0KDQpkZGQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tNzY5NTIyODQ4NDY3ODE3NjU4MDYzMDk2MS0tDQo=', 'headers': {'Content-Type': 'multipart/form-data; boundary=---------------------------7695228484678176580630961', 'Via': '1.1 38205a04d96d60185e88658d3185ccee.cloudfront.net (CloudFront)', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'CloudFront-Is-SmartTV-Viewer': 'false', 'CloudFront-Forwarded-Proto': 'https', 'X-Forwarded-For': '71.231.27.57, 104.246.180.51', 'CloudFront-Viewer-Country': 'US', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0', 'Host': 'xo2z7zafjh.execute-api.us-east-1.amazonaws.com', 'X-Forwarded-Proto': 'https', 'Cookie': 'zappa=AQ4', 'CloudFront-Is-Tablet-Viewer': 'false', 'X-Forwarded-Port': '443', 'Referer': 'https://xo8z7zafjh.execute-api.us-east-1.amazonaws.com/former/post', 'CloudFront-Is-Mobile-Viewer': 'false', 'X-Amz-Cf-Id': '31zxcUcVyUxBOMk320yh5NOhihn5knqrlYQYpGGyOngKKwJb0J0BAQ==', 'CloudFront-Is-Desktop-Viewer': 'true'}, 'params': {'parameter_1': 'post'}, 'method': 'POST', 'query': {}}\n\n        event = {\n            'body': 'LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03Njk1MjI4NDg0Njc4MTc2NTgwNjMwOTYxDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9Im15c3RyaW5nIg0KDQpkZGQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tNzY5NTIyODQ4NDY3ODE3NjU4MDYzMDk2MS0tDQo=',\n            'resource': '/',\n            'requestContext': {\n                'resourceId': '6cqjw9qu0b',\n                'apiId': '9itr2lba55',\n                'resourcePath': '/',\n                'httpMethod': 'POST',\n                'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5',\n                'accountId': '724336686645',\n                'identity': {\n                    'apiKey': None,\n                    'userArn': None,\n                    'cognitoAuthenticationType': None,\n                    'caller': None,\n                    'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0',\n                    'user': None,\n                    'cognitoIdentityPoolId': None,\n                    'cognitoIdentityId': None,\n                    'cognitoAuthenticationProvider': None,\n                    'sourceIp': '50.191.225.98',\n                    'accountId': None,\n                    },\n                'stage': 'devorr',\n                },\n            'queryStringParameters': None,\n            'httpMethod': 'POST',\n            'pathParameters': None,\n            'headers': {'Content-Type': 'multipart/form-data; boundary=---------------------------7695228484678176580630961', 'Via': '1.1 38205a04d96d60185e88658d3185ccee.cloudfront.net (CloudFront)', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'CloudFront-Is-SmartTV-Viewer': 'false', 'CloudFront-Forwarded-Proto': 'https', 'X-Forwarded-For': '71.231.27.57, 104.246.180.51', 'CloudFront-Viewer-Country': 'US', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0', 'Host': 'xo2z7zafjh.execute-api.us-east-1.amazonaws.com', 'X-Forwarded-Proto': 'https', 'Cookie': 'zappa=AQ4', 'CloudFront-Is-Tablet-Viewer': 'false', 'X-Forwarded-Port': '443', 'Referer': 'https://xo8z7zafjh.execute-api.us-east-1.amazonaws.com/former/post', 'CloudFront-Is-Mobile-Viewer': 'false', 'X-Amz-Cf-Id': '31zxcUcVyUxBOMk320yh5NOhihn5knqrlYQYpGGyOngKKwJb0J0BAQ==', 'CloudFront-Is-Desktop-Viewer': 'true'},\n            'stageVariables': None,\n            'path': '/',\n            }\n\n        environ = create_wsgi_request(event, trailing_slash=False)\n        response_tuple = collections.namedtuple('Response', ['status_code', 'content'])\n        response = response_tuple(200, 'hello')\n\n\n    def test_wsgi_without_body(self):\n        event = {\n            'body': None,\n            'resource': '/',\n            'requestContext': {\n                'resourceId': '6cqjw9qu0b',\n                'apiId': '9itr2lba55',\n                'resourcePath': '/',\n                'httpMethod': 'POST',\n                'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5',\n                'accountId': '724336686645',\n                'identity': {\n                    'apiKey': None,\n                    'userArn': None,\n                    'cognitoAuthenticationType': None,\n                    'caller': None,\n                    'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0',\n                    'user': None,\n                    'cognitoIdentityPoolId': None,\n                    'cognitoIdentityId': None,\n                    'cognitoAuthenticationProvider': None,\n                    'sourceIp': '50.191.225.98',\n                    'accountId': None,\n                    },\n                'stage': 'devorr',\n                },\n            'queryStringParameters': None,\n            'httpMethod': 'POST',\n            'pathParameters': None,\n            'headers': {'Via': '1.1 38205a04d96d60185e88658d3185ccee.cloudfront.net (CloudFront)', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'CloudFront-Is-SmartTV-Viewer': 'false', 'CloudFront-Forwarded-Proto': 'https', 'X-Forwarded-For': '71.231.27.57, 104.246.180.51', 'CloudFront-Viewer-Country': 'US', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0', 'Host': 'xo2z7zafjh.execute-api.us-east-1.amazonaws.com', 'X-Forwarded-Proto': 'https', 'Cookie': 'zappa=AQ4', 'CloudFront-Is-Tablet-Viewer': 'false', 'X-Forwarded-Port': '443', 'Referer': 'https://xo8z7zafjh.execute-api.us-east-1.amazonaws.com/former/post', 'CloudFront-Is-Mobile-Viewer': 'false', 'X-Amz-Cf-Id': '31zxcUcVyUxBOMk320yh5NOhihn5knqrlYQYpGGyOngKKwJb0J0BAQ==', 'CloudFront-Is-Desktop-Viewer': 'true'},\n            'stageVariables': None,\n            'path': '/',\n            'isBase64Encoded': True\n            }\n\n        environ = create_wsgi_request(event, trailing_slash=False)\n        response_tuple = collections.namedtuple('Response', ['status_code', 'content'])\n        response = response_tuple(200, 'hello')\n\n\n    def test_wsgi_from_apigateway_testbutton(self):\n        \"\"\"\n        API Gateway resources have a \"test bolt\" button on methods.\n        This button sends some empty dicts as 'null' instead of '{}'.\n        \"\"\"\n        event = {\n            \"resource\": \"/\",\n            \"path\": \"/\",\n            \"httpMethod\": \"GET\",\n            \"headers\": None,\n            \"queryStringParameters\": None,\n            \"pathParameters\": None,\n            \"stageVariables\": None,\n            \"requestContext\":{\n                \"accountId\": \"0123456\",\n                \"resourceId\": \"qwertyasdf\",\n                \"stage\": \"test-invoke-stage\",\n                \"requestId\": \"test-invoke-request\",\n                \"identity\":{\n                    \"cognitoIdentityPoolId\": None,\n                    \"accountId\": \"0123456\",\n                    \"cognitoIdentityId\": None,\n                    \"caller\": \"MYCALLERID\",\n                    \"apiKey\": \"test-invoke-api-key\",\n                    \"sourceIp\": \"test-invoke-source-ip\",\n                    \"accessKey\": \"MYACCESSKEY\",\n                    \"cognitoAuthenticationType\": None,\n                    \"cognitoAuthenticationProvider\": None,\n                    \"userArn\": \"arn:aws:iam::fooo:user/my.username\",\n                    \"userAgent\": \"Apache-HttpClient/4.5.x (Java/1.8.0_112)\",\n                    \"user\": \"MYCALLERID\"\n                },\n                \"resourcePath\": \"/\",\n                \"httpMethod\": \"GET\",\n                \"apiId\": \"myappid\"\n            },\n            \"body\": None,\n            \"isBase64Encoded\": False\n        }\n\n        environ = create_wsgi_request(event, trailing_slash=False)\n        response_tuple = collections.namedtuple('Response', ['status_code', 'content'])\n        response = response_tuple(200, 'hello')\n\n    ##\n    # Handler\n    ##\n\n    ##\n    # CLI\n    ##\n\n    def test_cli_sanity(self):\n        zappa_cli = ZappaCLI()\n        return\n\n    def test_load_settings(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual(False, zappa_cli.stage_config['touch'])\n\n    def test_load_extended_settings(self):\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'extendo'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket'])\n        self.assertEqual(True, zappa_cli.stage_config['touch'])\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'extendofail'\n        with self.assertRaises(ClickException):\n            zappa_cli.load_settings('test_settings.json')\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        with self.assertRaises(RuntimeError):\n            zappa_cli.load_settings('tests/test_bad_circular_extends_settings.json')\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'extendo2'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual('lmbda2', zappa_cli.stage_config['s3_bucket'])  # Second Extension\n        self.assertTrue(zappa_cli.stage_config['touch'])  # First Extension\n        self.assertTrue(zappa_cli.stage_config['delete_local_zip'])  # The base\n\n    def test_load_settings__lambda_concurrency_enabled(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'lambda_concurrency_enabled'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual(6, zappa_cli.stage_config['lambda_concurrency'])\n\n    def test_load_settings_yml(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('tests/test_settings.yml')\n        self.assertEqual(False, zappa_cli.stage_config['touch'])\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'extendo'\n        zappa_cli.load_settings('tests/test_settings.yml')\n        self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket'])\n        self.assertEqual(True, zappa_cli.stage_config['touch'])\n\n    def test_load_settings_yaml(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('tests/test_settings.yaml')\n        self.assertEqual(False, zappa_cli.stage_config['touch'])\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'extendo'\n        zappa_cli.load_settings('tests/test_settings.yaml')\n        self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket'])\n        self.assertEqual(True, zappa_cli.stage_config['touch'])\n\n    def test_load_settings_toml(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('tests/test_settings.toml')\n        self.assertEqual(False, zappa_cli.stage_config['touch'])\n\n    def test_settings_extension(self):\n        \"\"\"\n        Make sure Zappa uses settings in the proper order: JSON, TOML, YAML.\n        \"\"\"\n        tempdir = tempfile.mkdtemp(prefix=\"zappa-test-settings\")\n        shutil.copy(\"tests/test_one_env.json\", tempdir + \"/zappa_settings.json\")\n        shutil.copy(\"tests/test_settings.yml\", tempdir + \"/zappa_settings.yml\")\n        shutil.copy(\"tests/test_settings.yml\", tempdir + \"/zappa_settings.yaml\")\n        shutil.copy(\"tests/test_settings.toml\", tempdir + \"/zappa_settings.toml\")\n\n        orig_cwd = os.getcwd()\n        os.chdir(tempdir)\n        try:\n            zappa_cli = ZappaCLI()\n\n            # With all three, we should get the JSON file first.\n            self.assertEqual(zappa_cli.get_json_or_yaml_settings(),\n                             \"zappa_settings.json\")\n            zappa_cli.load_settings_file()\n            self.assertIn(\"lonely\", zappa_cli.zappa_settings)\n            os.unlink(\"zappa_settings.json\")\n\n            # Without the JSON file, we should get the TOML file.\n            self.assertEqual(zappa_cli.get_json_or_yaml_settings(),\n                             \"zappa_settings.toml\")\n            zappa_cli.load_settings_file()\n            self.assertIn(\"ttt888\", zappa_cli.zappa_settings)\n            self.assertNotIn(\"devor\", zappa_cli.zappa_settings)\n            os.unlink(\"zappa_settings.toml\")\n\n            # With just the YAML file, we should get it.\n            self.assertEqual(zappa_cli.get_json_or_yaml_settings(),\n                             \"zappa_settings.yml\")\n            zappa_cli.load_settings_file()\n            self.assertIn(\"ttt888\", zappa_cli.zappa_settings)\n            self.assertIn(\"devor\", zappa_cli.zappa_settings)\n            os.unlink(\"zappa_settings.yml\")\n\n            self.assertEqual(zappa_cli.get_json_or_yaml_settings(),\n                             \"zappa_settings.yaml\")\n            zappa_cli.load_settings_file()\n            self.assertIn(\"ttt888\", zappa_cli.zappa_settings)\n            self.assertIn(\"devor\", zappa_cli.zappa_settings)\n            os.unlink(\"zappa_settings.yaml\")\n\n            # Without anything, we should get an exception.\n            self.assertRaises(\n                ClickException, zappa_cli.get_json_or_yaml_settings)\n        finally:\n            os.chdir(orig_cwd)\n            shutil.rmtree(tempdir)\n\n    def test_cli_utility(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('test_settings.json')\n        zappa_cli.create_package()\n        zappa_cli.remove_local_zip()\n        logs = [\n            {\n                'timestamp': '12345',\n                'message': '[START RequestId] test'\n            },\n            {\n                'timestamp': '12345',\n                'message': '[REPORT RequestId] test'\n            },\n            {\n                'timestamp': '12345',\n                'message': '[END RequestId] test'\n            },\n            {\n                'timestamp': '12345',\n                'message': 'test'\n            },\n            {\n                'timestamp': '1480001341214',\n                'message': '[INFO] 2016-11-24T15:29:13.326Z c0cb52d1-b25a-11e6-9b73-f940ce24319a 59.111.125.48 - -  [24/Nov/2016:15:29:13 +0000] \"GET / HTTP/1.1\" 200 2590 \"\" \"python-requests/2.11.0\" 0/4.672'\n            },\n            {\n                'timestamp': '1480001341214',\n                'message': '[INFO] 2016-11-24T15:29:13.326Z c0cb52d1-b25a-11e6-9b73-f940ce24319a 59.111.125.48 - -  [24/Nov/2016:15:29:13 +0000] \"GET / HTTP/1.1\" 400 2590 \"\" \"python-requests/2.11.0\" 0/4.672'\n            },\n            {\n                'timestamp': '1480001341215',\n                'message': '[1480001341258] [DEBUG] 2016-11-24T15:29:01.258Z b890d8f6-b25a-11e6-b6bc-718f7ec807df Zappa Event: {}'\n            }\n        ]\n        zappa_cli.print_logs(logs)\n        zappa_cli.print_logs(logs, colorize=False)\n        zappa_cli.print_logs(logs, colorize=False, http=True)\n        zappa_cli.print_logs(logs, colorize=True, http=True)\n        zappa_cli.print_logs(logs, colorize=True, http=False)\n        zappa_cli.print_logs(logs, colorize=True, non_http=True)\n        zappa_cli.print_logs(logs, colorize=True, non_http=False)\n        zappa_cli.print_logs(logs, colorize=True, non_http=True, http=True)\n        zappa_cli.print_logs(logs, colorize=True, non_http=False, http=False)\n        zappa_cli.print_logs(logs, colorize=False, force_colorize=False)\n        zappa_cli.print_logs(logs, colorize=False, force_colorize=True)\n        zappa_cli.print_logs(logs, colorize=True, force_colorize=False)\n        zappa_cli.print_logs(logs, colorize=True, non_http=False, http=False, force_colorize=True)\n        zappa_cli.check_for_update()\n\n    def test_cli_format_invoke_command(self):\n        zappa_cli = ZappaCLI()\n        plain_string = \"START RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f Version: $LATEST\\n[DEBUG]\\t2017-06-15T23:39:27.638Z\\tdef8808e-5223-11e7-b3b7-4919f6e7dd4f\\tZappa Event: {'raw_command': 'import datetime; print(datetime.datetime.now())'}\\n2017-06-15 23:39:27.638296\\nEND RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f\\nREPORT RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f\\tDuration: 0.59 ms\\tBilled Duration: 100 ms \\tMemory Size: 512 MB\\tMax Memory Used: 53 MB\\t\\n\"\n        final_string = \"START RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f Version: $LATEST\\n[DEBUG] 2017-06-15T23:39:27.638Z def8808e-5223-11e7-b3b7-4919f6e7dd4f Zappa Event: {'raw_command': 'import datetime; print(datetime.datetime.now())'}\\n2017-06-15 23:39:27.638296\\nEND RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f\\nREPORT RequestId: def8808e-5223-11e7-b3b7-4919f6e7dd4f\\nDuration: 0.59 ms\\nBilled Duration: 100 ms \\nMemory Size: 512 MB\\nMax Memory Used: 53 MB\\n\"\n\n        formated_string = zappa_cli.format_invoke_command(plain_string)\n        self.assertEqual(final_string, formated_string)\n\n    def test_cli_colorize_invoke_command(self):\n        zappa_cli = ZappaCLI()\n        plain_string = \"START RequestId: dd81d3de-5225-11e7-a24f-59014f430ab3 Version: $LATEST\\n[DEBUG] 2017-06-15T23:53:44.194Z dd81d3de-5225-11e7-a24f-59014f430ab3 Zappa Event: {'raw_command': 'import datetime; print(datetime.datetime.now())'}\\n2017-06-15 23:53:44.195012\\nEND RequestId: dd81d3de-5225-11e7-a24f-59014f430ab3\\nREPORT RequestId: dd81d3de-5225-11e7-a24f-59014f430ab3\\nDuration: 0.63 ms\\nBilled Duration: 100 ms \\nMemory Size: 512 MB\\nMax Memory Used: 53 MB\\n\"\n        final_string = \"\\x1b[36m\\x1b[1m[START]\\x1b[0m \\x1b[32m\\x1b[1mRequestId:\\x1b[0m \\x1b[35m\\x1b[35mdd81d3de-5225-11e7-a24f-59014f430ab3\\x1b[0m\\x1b[0m \\x1b[32m\\x1b[1mVersion:\\x1b[0m $LATEST\\n\\x1b[36m\\x1b[1m[DEBUG]\\x1b[0m 2017-06-15T23:53:44.194Z \\x1b[35m\\x1b[35mdd81d3de-5225-11e7-a24f-59014f430ab3\\x1b[0m\\x1b[0m \\x1b[32m\\x1b[1mZappa Event:\\x1b[0m {'raw_command': 'import datetime; print(datetime.datetime.now())'}\\n2017-06-15 23:53:44.195012\\n\\x1b[36m\\x1b[1m[END]\\x1b[0m \\x1b[32m\\x1b[1mRequestId:\\x1b[0m \\x1b[35m\\x1b[35mdd81d3de-5225-11e7-a24f-59014f430ab3\\x1b[0m\\x1b[0m\\n\\x1b[36m\\x1b[1m[REPORT]\\x1b[0m \\x1b[32m\\x1b[1mRequestId:\\x1b[0m \\x1b[35m\\x1b[35mdd81d3de-5225-11e7-a24f-59014f430ab3\\x1b[0m\\x1b[0m\\n\\x1b[32m\\x1b[1mDuration:\\x1b[0m 0.63 ms\\n\\x1b[32m\\x1b[1mBilled\\x1b[0m \\x1b[32m\\x1b[1mDuration:\\x1b[0m 100 ms \\n\\x1b[32m\\x1b[1mMemory Size:\\x1b[0m 512 MB\\n\\x1b[32m\\x1b[1mMax Memory Used:\\x1b[0m 53 MB\\n\"\n\n        colorized_string = zappa_cli.colorize_invoke_command(plain_string)\n        self.assertEqual(final_string, colorized_string)\n\n    def test_cli_colorize_whole_words_only(self):\n        zappa_cli = ZappaCLI()\n        plain_string = \"START RESTART END RENDER report [DEBUG] TEXT[DEBUG]TEXT\"\n        final_string = \"\\x1b[36m\\x1b[1m[START]\\x1b[0m RESTART \\x1b[36m\\x1b[1m[END]\\x1b[0m RENDER report \\x1b[36m\\x1b[1m[DEBUG]\\x1b[0m TEXT\\x1b[36m\\x1b[1m[DEBUG]\\x1b[0mTEXT\"\n\n        colorized_string = zappa_cli.colorize_invoke_command(plain_string)\n        self.assertEqual(final_string, colorized_string)\n\n    def test_cli_colorize_invoke_command_bad_string(self):\n        zappa_cli = ZappaCLI()\n        plain_string = \"Hey, I'm a plain string, won't be colorized\"\n        final_string = \"Hey, I'm a plain string, won't be colorized\"\n\n        colorized_string = zappa_cli.colorize_invoke_command(plain_string)\n        self.assertEqual(final_string, colorized_string)\n\n    # def test_cli_args(self):\n    #     zappa_cli = ZappaCLI()\n    #     # Sanity\n    #     argv = '-s test_settings.json derp ttt888'.split()\n    #     with self.assertRaises(SystemExit) as system_exit:\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 2)\n\n    # def test_cli_error_exit_code(self):\n    #     # Discussion: https://github.com/Miserlou/Zappa/issues/407\n    #     zappa_cli = ZappaCLI()\n    #     # Sanity\n    #     argv = '-s test_settings.json status devor'.split()\n    #     with self.assertRaises(SystemExit) as system_exit:\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 1)\n\n    # def test_cli_default(self):\n    #     # Discussion: https://github.com/Miserlou/Zappa/issues/422\n    #     zappa_cli = ZappaCLI()\n    #     argv = '-s tests/test_one_env.json status'.split()\n    #     # It'll fail, but at least it'll cover it.\n    #     with self.assertRaises(SystemExit) as system_exit:\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 1)\n\n    #     zappa_cli = ZappaCLI()\n    #     argv = '-s tests/test_one_env.json status --all'.split()\n    #     # It'll fail, but at least it'll cover it.\n    #     with self.assertRaises(SystemExit) as system_exit:\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 1)\n\n    #     zappa_cli = ZappaCLI()\n    #     argv = '-s test_settings.json status'.split()\n    #     with self.assertRaises(SystemExit) as system_exit:\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 2)\n\n    # def test_cli_negative_rollback(self):\n    #     zappa_cli = ZappaCLI()\n    #     argv = '-s test_settings.json rollback -n -1 dev'.split()\n    #     output = StringIO()\n    #     old_stderr, sys.stderr = sys.stderr, output\n    #     with self.assertRaises(SystemExit) as system_exit:\n\n    #         print argv\n\n    #         zappa_cli.handle(argv)\n    #     self.assertEqual(system_exit.exception.code, 2)\n\n    #     error_msg = output.getvalue().strip()\n    #     expected = r\".*This argument must be positive \\(got -1\\)$\"\n    #     self.assertRegexpMatches(error_msg, expected)\n    #     sys.stderr = old_stderr\n\n    # @mock.patch('zappa.cli.ZappaCLI.dispatch_command')\n    # def test_cli_invoke(self, _):\n    #     zappa_cli = ZappaCLI()\n    #     argv = '-s test_settings.json invoke '.split()\n    #     raw_tests = (\n    #         ['--raw', 'devor', '\"print 1+2\"'],\n    #         ['devor', '\"print 1+2\"', '--raw']\n    #     )\n\n    #     for cmd in raw_tests:\n    #         zappa_cli.handle(argv + cmd)\n    #         args = zappa_cli.vargs\n\n    #         self.assertFalse(args['all'])\n    #         self.assertTrue(args['raw'])\n    #         self.assertEquals(args['command_rest'], '\"print 1+2\"')\n    #         self.assertEquals(args['command_env'], 'devor')\n\n    #     all_raw_tests = (\n    #         ['--all', '--raw', '\"print 1+2\"'],\n    #         ['\"print 1+2\"', '--all', '--raw'],\n    #         ['--raw', '\"print 1+2\"', '--all'],\n    #         ['--all', '\"print 1+2\"', '--raw']\n    #     )\n    #     for cmd in all_raw_tests:\n    #         zappa_cli.handle(argv + cmd)\n    #         args = zappa_cli.vargs\n\n    #         self.assertTrue(args['all'])\n    #         self.assertTrue(args['raw'])\n    #         self.assertEquals(args['command_rest'], '\"print 1+2\"')\n    #         self.assertEquals(args['command_env'], None)\n\n    #     zappa_cli.handle(argv + ['devor', 'myapp.my_func'])\n    #     args = zappa_cli.vargs\n    #     self.assertEquals(args['command_rest'], 'myapp.my_func')\n\n    #     all_func_tests = (\n    #         ['--all', 'myapp.my_func'],\n    #         ['myapp.my_func', '--all']\n    #     )\n    #     for cmd in all_func_tests:\n    #         zappa_cli.handle(argv + cmd)\n    #         args = zappa_cli.vargs\n\n    #         self.assertTrue(args['all'])\n    #         self.assertEquals(args['command_rest'], 'myapp.my_func')\n\n\n    # @mock.patch('zappa.cli.ZappaCLI.dispatch_command')\n    # def test_cli_manage(self, _):\n    #     zappa_cli = ZappaCLI()\n    #     argv = '--settings test_settings.json manage'.split()\n    #     all_tests = (\n    #         ['--all', 'showmigrations', 'admin'],\n    #         ['showmigrations', 'admin', '--all']\n    #     )\n\n    #     for cmd in all_tests:\n\n    #         print argv\n    #         print cmd\n    #         print(argv + cmd)\n\n    #         zappa_cli.handle(argv + cmd)\n    #         args = zappa_cli.vargs\n\n\n    #         self.assertTrue(args['all'])\n    #         self.assertTrue(\n    #             args['command_rest'] == ['showmigrations', 'admin']\n    #         )\n\n    #     cmd = ['devor', 'showmigrations', 'admin']\n    #     zappa_cli.handle(argv + cmd)\n    #     args = zappa_cli.vargs\n\n    #     self.assertFalse(args['all'])\n    #     self.assertTrue(\n    #         args['command_rest'] == ['showmigrations', 'admin']\n    #     )\n\n    #     cmd = ['devor', '\"shell --version\"']\n    #     zappa_cli.handle(argv + cmd)\n    #     args = zappa_cli.vargs\n\n    #     self.assertFalse(args['all'])\n    #     self.assertTrue(args['command_rest'] == ['\"shell --version\"'])\n\n    def test_bad_json_catch(self):\n        zappa_cli = ZappaCLI()\n        self.assertRaises(ValueError, zappa_cli.load_settings_file, 'tests/test_bad_settings.json')\n\n    def test_bad_stage_name_catch(self):\n        zappa_cli = ZappaCLI()\n        self.assertRaises(ValueError, zappa_cli.load_settings, 'tests/test_bad_stage_name_settings.json')\n\n    def test_bad_environment_vars_catch(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        self.assertRaises(ValueError, zappa_cli.load_settings, 'tests/test_bad_environment_vars.json')\n\n    # @mock.patch('botocore.session.Session.full_config', new_callable=mock.PropertyMock)\n    # def test_cli_init(self, mock_config):\n\n    #     # Coverage for all profile detection paths\n    #     mock_config.side_effect = [\n    #         { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } },\n    #         { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } },\n    #         { 'profiles' : {\n    #             'default' : {\n    #                 'region' : 'us-east-1'\n    #             },\n    #             'another' : {\n    #                 'region' : 'us-east-1'\n    #             }\n    #         } },\n    #         { 'profiles' : {\n    #             'radical' : {\n    #                 'region' : 'us-east-1'\n    #             },\n    #             'another' : {\n    #                 'region' : 'us-east-1'\n    #             }\n    #         } },\n    #         { 'profiles': {} },\n    #         { 'profiles': {} },\n    #         { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } },\n    #     ]\n\n    #     if os.path.isfile('zappa_settings.json'):\n    #         os.remove('zappa_settings.json')\n\n    #     # Test directly\n    #     zappa_cli = ZappaCLI()\n    #     # Via http://stackoverflow.com/questions/2617057/how-to-supply-stdin-files-and-environment-variable-inputs-to-python-unit-tests\n    #     inputs = ['dev', 'lmbda', 'test_settings', 'y', '']\n\n    #     def test_for(inputs):\n    #         input_generator = (i for i in inputs)\n    #         bi = 'builtins.input'\n\n    #         with mock.patch(bi, lambda prompt: next(input_generator)):\n    #             zappa_cli.init()\n\n    #         if os.path.isfile('zappa_settings.json'):\n    #             os.remove('zappa_settings.json')\n\n    #     test_for(inputs)\n    #     test_for(['dev', 'lmbda', 'test_settings', 'n', ''])\n    #     test_for(['dev', 'default', 'lmbda', 'test_settings', '', ''])\n    #     test_for(['dev', 'radical', 'lmbda', 'test_settings', 'p', ''])\n    #     test_for(['dev', 'lmbda', 'test_settings', 'y', ''])\n    #     test_for(['dev', 'lmbda', 'test_settings', 'p', 'n'])\n\n\n    #     # Test via handle()\n    #     input_generator = (i for i in inputs)\n    #     bi = 'builtins.input'\n    #     with mock.patch(bi, lambda prompt: next(input_generator)):\n    #         zappa_cli = ZappaCLI()\n    #         argv = ['init']\n    #         zappa_cli.handle(argv)\n\n    #     if os.path.isfile('zappa_settings.json'):\n    #         os.remove('zappa_settings.json')\n\n    def test_domain_name_match(self):\n        # Simple sanity check\n        zone = Zappa.get_best_match_zone(all_zones={ 'HostedZones': [\n            {\n                'Name': 'example.com.au.',\n                'Id': 'zone-correct',\n                'Config': {\n                    'PrivateZone': False\n                }\n            }\n        ]},\n            domain='www.example.com.au')\n        assert zone == 'zone-correct'\n\n        # No match test\n        zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [\n            {\n                'Name': 'example.com.au.',\n                'Id': 'zone-incorrect',\n                'Config': {\n                    'PrivateZone': False\n                }\n            }\n        ]},\n            domain='something-else.com.au')\n        assert zone is None\n\n        # More involved, better match should win.\n        zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [\n            {\n                'Name': 'example.com.au.',\n                'Id': 'zone-incorrect',\n                'Config': {\n                    'PrivateZone': False\n                }\n            },\n            {\n                'Name': 'subdomain.example.com.au.',\n                'Id': 'zone-correct',\n                'Config': {\n                    'PrivateZone': False\n                }\n            }\n        ]},\n            domain='www.subdomain.example.com.au')\n        assert zone == 'zone-correct'\n\n        # Check private zone is not matched\n        zone = Zappa.get_best_match_zone(all_zones={ 'HostedZones': [\n            {\n                'Name': 'example.com.au.',\n                'Id': 'zone-private',\n                'Config': {\n                    'PrivateZone': True\n                }\n            }\n        ]},\n            domain='www.example.com.au')\n        assert zone is None\n\n        # More involved, should ignore the private zone and match the public.\n        zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [\n            {\n                'Name': 'subdomain.example.com.au.',\n                'Id': 'zone-private',\n                'Config': {\n                    'PrivateZone': True\n                }\n            },\n            {\n                'Name': 'subdomain.example.com.au.',\n                'Id': 'zone-public',\n                'Config': {\n                    'PrivateZone': False\n                }\n            }\n        ]},\n            domain='www.subdomain.example.com.au')\n        assert zone == 'zone-public'\n\n    ##\n    # Let's Encrypt / ACME\n    ##\n\n    def test_lets_encrypt_sanity(self):\n        # We need a fake account key and crt\n        import subprocess\n        devnull = open(os.devnull, 'wb')\n        out = subprocess.check_output(['openssl', 'genrsa', '2048'], stderr=devnull)\n        with open(os.path.join(gettempdir(), 'account.key'), 'wb') as f:\n            f.write(out)\n\n        cmd = [\n            'openssl', 'req',\n            '-x509',\n            '-newkey', 'rsa:2048',\n            '-subj', '/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com',\n            '-passout', 'pass:foo',\n            '-keyout', os.path.join(gettempdir(), 'key.key'),\n            '-out', os.path.join(gettempdir(), 'signed.crt'),\n            '-days', '1'\n        ]\n        devnull = open(os.devnull, 'wb')\n        subprocess.check_call(cmd, stdout=devnull, stderr=devnull)\n\n        DEFAULT_CA = \"https://acme-staging.api.letsencrypt.org\"\n        CA = \"https://acme-staging.api.letsencrypt.org\"\n\n        try:\n            result = register_account()\n        except ValueError as e:\n            pass # that's fine.\n\n        create_domain_key()\n        create_domain_csr('herp.derp.wtf')\n        parse_account_key()\n        parse_csr()\n        create_chained_certificate()\n\n        try:\n            result = sign_certificate()\n        except ValueError as e:\n            pass # that's fine.\n\n        # This service fails due to remote \"over-quota\" errors,\n        # so let's retire it until we can find a better provider.\n\n        # result = verify_challenge('http://echo.jsontest.com/status/valid')\n        # try:\n        #     result = verify_challenge('http://echo.jsontest.com/status/fail')\n        # except ValueError as e:\n        #     pass # that's fine.\n        # try:\n        #     result = verify_challenge('http://bing.com')\n        # except ValueError as e:\n        #     pass # that's fine.\n\n        encode_certificate(b'123')\n\n        # without domain testing..\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('test_settings.json')\n        get_cert_and_update_domain(zappa_cli, 'kerplah', 'zzzz', domain=None)\n\n\n    def test_certify_sanity_checks(self):\n        \"\"\"\n        Make sure 'zappa certify':\n        * Errors out when a deployment hasn't taken place.\n        * Writes errors when certificate settings haven't been specified.\n        * Calls Zappa correctly for creates vs. updates.\n        \"\"\"\n        old_stdout = sys.stderr\n\n        try:\n            zappa_cli = ZappaCLI()\n            zappa_cli.domain = \"test.example.com\"\n            try:\n                zappa_cli.certify()\n            except AttributeError:\n                # Since zappa_cli.zappa isn't initialized, the certify() call\n                # fails when it tries to inspect what Zappa has deployed.\n                pass\n\n            # Set up a core.Zappa mock and let us save some state about\n            # domains and lambdas\n            zappa_mock = mock.create_autospec(Zappa)\n            zappa_mock.function_versions = []\n            zappa_mock.domain_names = {}\n            def get_lambda_function_versions(_function_name, *_args, **_kwargs):\n                return zappa_mock.function_versions\n            def get_domain_name(domain, *_args, **_kwargs):\n                return zappa_mock.domain_names.get(domain)\n            zappa_mock.get_domain_name.side_effect = get_domain_name\n            zappa_mock.get_lambda_function_versions.side_effect = get_lambda_function_versions\n\n            zappa_cli.zappa = zappa_mock\n            self.assertRaises(ClickException, zappa_cli.certify)\n\n            # Make sure we get an error if we don't configure the domain.\n            zappa_cli.zappa.function_versions = [\"$LATEST\"]\n            zappa_cli.api_stage = \"stage\"\n            zappa_cli.zappa_settings = {\"stage\": {}}\n            zappa_cli.api_stage = \"stage\"\n            zappa_cli.domain = \"test.example.com\"\n\n            try:\n                zappa_cli.certify()\n            except ClickException as e:\n                log_output = str(e)\n                self.assertIn(\"Can't certify a domain without\", log_output)\n                self.assertIn(\"domain\", log_output)\n\n            # Without any LetsEncrypt settings, we should get a message about\n            # not having a lets_encrypt_key setting.\n            zappa_cli.zappa_settings[\"stage\"][\"domain\"] = \"test.example.com\"\n            try:\n                zappa_cli.certify()\n                self.fail(\"Expected a ClickException\")\n            except ClickException as e:\n                log_output = str(e)\n                self.assertIn(\"Can't certify a domain without\", log_output)\n                self.assertIn(\"lets_encrypt_key\", log_output)\n\n            # With partial settings, we should get a message about not having\n            # certificate, certificate_key, and certificate_chain\n            zappa_cli.zappa_settings[\"stage\"][\"certificate\"] = \"foo\"\n            try:\n                zappa_cli.certify()\n                self.fail(\"Expected a ClickException\")\n            except ClickException as e:\n                log_output = str(e)\n                self.assertIn(\"Can't certify a domain without\", log_output)\n                self.assertIn(\"certificate_key\", log_output)\n                self.assertIn(\"certificate_chain\", log_output)\n\n            zappa_cli.zappa_settings[\"stage\"][\"certificate_key\"] = \"key\"\n            try:\n                zappa_cli.certify()\n                self.fail(\"Expected a ClickException\")\n            except ClickException as e:\n                log_output = str(e)\n                self.assertIn(\"Can't certify a domain without\", log_output)\n                self.assertIn(\"certificate_key\", log_output)\n                self.assertIn(\"certificate_chain\", log_output)\n\n            zappa_cli.zappa_settings[\"stage\"][\"certificate_chain\"] = \"chain\"\n            del zappa_cli.zappa_settings[\"stage\"][\"certificate_key\"]\n            try:\n                zappa_cli.certify()\n                self.fail(\"Expected a ClickException\")\n            except ClickException as e:\n                log_output = str(e)\n                self.assertIn(\"Can't certify a domain without\", log_output)\n                self.assertIn(\"certificate_key\", log_output)\n                self.assertIn(\"certificate_chain\", log_output)\n\n            # With all certificate settings, make sure Zappa's domain calls\n            # are executed.\n            cert_file = tempfile.NamedTemporaryFile()\n            cert_file.write(b\"Hello world\")\n            cert_file.flush()\n\n            zappa_cli.zappa_settings[\"stage\"].update({\n                \"certificate\": cert_file.name,\n                \"certificate_key\": cert_file.name,\n                \"certificate_chain\": cert_file.name\n            })\n            sys.stdout.truncate(0)\n            zappa_cli.certify()\n            zappa_cli.zappa.create_domain_name.assert_called_once()\n            zappa_cli.zappa.update_route53_records.assert_called_once()\n            zappa_cli.zappa.update_domain_name.assert_not_called()\n            log_output = sys.stdout.getvalue()\n            self.assertIn(\"Created a new domain name\", log_output)\n\n            zappa_cli.zappa.reset_mock()\n            zappa_cli.zappa.domain_names[\"test.example.com\"] = \"*.example.com\"\n            sys.stdout.truncate(0)\n            zappa_cli.certify()\n            zappa_cli.zappa.update_domain_name.assert_called_once()\n            zappa_cli.zappa.update_route53_records.assert_not_called()\n            zappa_cli.zappa.create_domain_name.assert_not_called()\n            log_output = sys.stdout.getvalue()\n            self.assertNotIn(\"Created a new domain name\", log_output)\n\n            # Test creating domain without Route53\n            zappa_cli.zappa_settings[\"stage\"].update({\n                \"route53_enabled\": False,\n            })\n            zappa_cli.zappa.reset_mock()\n            zappa_cli.zappa.domain_names[\"test.example.com\"] = \"\"\n            sys.stdout.truncate(0)\n            zappa_cli.certify()\n            zappa_cli.zappa.create_domain_name.assert_called_once()\n            zappa_cli.zappa.update_route53_records.assert_not_called()\n            zappa_cli.zappa.update_domain_name.assert_not_called()\n            log_output = sys.stdout.getvalue()\n            self.assertIn(\"Created a new domain name\", log_output)\n        finally:\n            sys.stdout = old_stdout\n\n    @mock.patch('troposphere.Template')\n    @mock.patch('botocore.client')\n    def test_get_domain_respects_route53_setting(self, client, template):\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n        zappa_core.apigateway_client = mock.Mock()\n        zappa_core.route53 = mock.Mock()\n\n        # Check it returns valid and exits early\n        record = zappa_core.get_domain_name('test_domain', route53=False)\n        self.assertIsNotNone(record)\n        zappa_core.apigateway_client.get_domain_name.assert_called_once()\n        zappa_core.route53.list_hosted_zones.assert_not_called()\n\n        zappa_core.apigateway_client.reset_mock()\n        zappa_core.route53.reset_mock()\n\n        # And that the route53 path still works\n        zappa_core.route53.list_hosted_zones.return_value = {\n            'IsTruncated': False,\n            'HostedZones': [\n                {\n                    'Id': 'somezone'\n                }\n            ]\n        }\n        zappa_core.route53.list_resource_record_sets.return_value = {\n            'ResourceRecordSets': [{\n                'Type': 'CNAME',\n                'Name': 'test_domain1'\n            }]\n        }\n\n        record = zappa_core.get_domain_name('test_domain')\n        self.assertIsNotNone(record)\n        zappa_core.apigateway_client.get_domain_name.assert_called_once()\n        zappa_core.route53.list_hosted_zones.assert_called_once()\n        zappa_core.route53.list_resource_record_sets.assert_called_once_with(\n            HostedZoneId='somezone')\n\n    @mock.patch('botocore.client')\n    def test_get_all_zones_normal_case(self, client):\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n        zappa_core.route53 = mock.Mock()\n\n        # Check that it handle the normal case\n        zappa_core.route53.list_hosted_zones.return_value = {\n            'IsTruncated': False,\n            'HostedZones': [\n                {\n                    'Id': 'somezone'\n                }\n            ]\n        }\n\n        zones = zappa_core.get_all_zones()\n        zappa_core.route53.list_hosted_zones.assert_called_with(MaxItems='100')\n        self.assertListEqual(zones['HostedZones'], [{'Id': 'somezone'}])\n\n    @mock.patch('botocore.client')\n    def test_get_all_zones_two_pages(self, client):\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n        zappa_core.route53 = mock.Mock()\n\n        # Check that it handle the normal case\n        zappa_core.route53.list_hosted_zones.side_effect = [\n            {\n                'IsTruncated': True,\n                'HostedZones': [\n                    {\n                        'Id': 'zone1'\n                    }\n                ],\n                'NextMarker': \"101\"\n            },\n            {\n                'IsTruncated': False,\n                'HostedZones': [\n                    {\n                        'Id': 'zone2'\n                    }\n                ]\n            }\n        ]\n\n        zones = zappa_core.get_all_zones()\n        zappa_core.route53.list_hosted_zones.assert_has_calls(\n            [\n                mock.call(MaxItems='100'),\n                mock.call(MaxItems='100', Marker='101'),\n            ]\n        )\n        self.assertListEqual(zones['HostedZones'], [{'Id': 'zone1'}, {'Id': 'zone2'}])\n\n    ##\n    # Django\n    ##\n\n    def test_detect_dj(self):\n        # Sanity\n        settings_modules = detect_django_settings()\n\n    def test_dj_wsgi(self):\n        # Sanity\n        settings_modules = detect_django_settings()\n\n        settings = \"\"\"\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'alskdfjalsdkf=0*%do-ayvy*m2k=vss*$7)j8q!@u0+d^na7mi2(^!l!d'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nTEMPLATE_DEBUG = True\n\nALLOWED_HOSTS = []\n\n# Application definition\n\nINSTALLED_APPS = (\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n)\n\nROOT_URLCONF = 'blah.urls'\nWSGI_APPLICATION = 'hackathon_starter.wsgi.application'\n\n# Database\n# https://docs.djangoproject.com/en/1.7/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n    }\n}\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.7/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\nTIME_ZONE = 'UTC'\nUSE_I18N = True\nUSE_L10N = True\nUSE_TZ = True\n        \"\"\"\n\n        djts = open(\"dj_test_settings.py\", \"w\")\n        djts.write(settings)\n        djts.close()\n\n        app = get_django_wsgi('dj_test_settings')\n        try:\n            os.remove('dj_test_settings.py')\n            os.remove('dj_test_settings.pyc')\n        except Exception as e:\n            pass\n\n    ##\n    # Util / Misc\n    ##\n\n    def test_human_units(self):\n        human_size(1)\n        human_size(9999999999999)\n\n    def test_string_to_timestamp(self):\n        boo = string_to_timestamp(\"asdf\")\n        self.assertTrue(boo == 0)\n\n        yay = string_to_timestamp(\"1h\")\n        self.assertTrue(type(yay) == int)\n        self.assertTrue(yay > 0)\n\n        yay = string_to_timestamp(\"4m\")\n        self.assertTrue(type(yay) == int)\n        self.assertTrue(yay > 0)\n\n        yay = string_to_timestamp(\"1mm\")\n        self.assertTrue(type(yay) == int)\n        self.assertTrue(yay > 0)\n\n        yay = string_to_timestamp(\"1mm1w1d1h1m1s1ms1us\")\n        self.assertTrue(type(yay) == int)\n        self.assertTrue(yay > 0)\n\n    def test_event_name(self):\n        zappa = Zappa()\n        truncated = zappa.get_event_name(\"basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf\", \"this.is.my.dang.function.wassup.yeah.its.long\")\n        self.assertTrue(len(truncated) <= 64)\n        self.assertTrue(truncated.endswith(\"this.is.my.dang.function.wassup.yeah.its.long\"))\n        truncated = zappa.get_event_name(\"basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf\", \"thisidoasdfaljksdfalskdjfalsdkfjasldkfjalsdkfjalsdkfjalsdfkjalasdfasdfasdfasdklfjasldkfjalsdkjfaslkdfjasldkfjasdflkjdasfskdj\")\n        self.assertTrue(len(truncated) <= 64)\n        truncated = zappa.get_event_name(\"a\", \"b\")\n        self.assertTrue(len(truncated) <= 64)\n        self.assertEqual(truncated, \"a-b\")\n\n    def test_hashed_rule_name(self):\n        zappa = Zappa()\n        truncated = zappa.get_event_name(\n            \"basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf\",\n            \"this.is.my.dang.function.wassup.yeah.its.long\")\n        self.assertTrue(len(truncated) == 64)\n\n        rule_name = zappa.get_hashed_rule_name(\n            event=dict(name='some-event-name'),\n            function=\"this.is.my.dang.function.wassup.yeah.its.long\",\n            lambda_name=\"basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf\")\n        self.assertTrue(len(rule_name) <= 64)\n        self.assertTrue(rule_name.endswith(\"-this.is.my.dang.function.wassup.yeah.its.long\"))\n\n    def test_detect_dj(self):\n        # Sanity\n        settings_modules = detect_django_settings()\n\n    def test_detect_flask(self):\n        # Sanity\n        settings_modules = detect_flask_apps()\n\n    def test_shameless(self):\n        shamelessly_promote()\n\n\n    def test_s3_url_parser(self):\n        remote_bucket, remote_file = parse_s3_url('s3://my-project-config-files/filename.json')\n        self.assertEqual(remote_bucket, 'my-project-config-files')\n        self.assertEqual(remote_file, 'filename.json')\n\n        remote_bucket, remote_file = parse_s3_url('s3://your-bucket/account.key')\n        self.assertEqual(remote_bucket, 'your-bucket')\n        self.assertEqual(remote_file, 'account.key')\n\n        remote_bucket, remote_file = parse_s3_url('s3://my-config-bucket/super-secret-config.json')\n        self.assertEqual(remote_bucket, 'my-config-bucket')\n        self.assertEqual(remote_file, 'super-secret-config.json')\n\n        remote_bucket, remote_file = parse_s3_url('s3://your-secure-bucket/account.key')\n        self.assertEqual(remote_bucket, 'your-secure-bucket')\n        self.assertEqual(remote_file, 'account.key')\n\n        remote_bucket, remote_file = parse_s3_url('s3://your-bucket/subfolder/account.key')\n        self.assertEqual(remote_bucket, 'your-bucket')\n        self.assertEqual(remote_file, 'subfolder/account.key')\n\n        # Sad path\n        remote_bucket, remote_file = parse_s3_url('/dev/null')\n        self.assertEqual(remote_bucket, '')\n\n\n    def test_remote_env_package(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'deprecated_remote_env'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual('lmbda-env', zappa_cli.stage_config['remote_env_bucket'])\n        self.assertEqual('dev/env.json', zappa_cli.stage_config['remote_env_file'])\n        zappa_cli.create_package()\n        with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip:\n            content = lambda_zip.read('zappa_settings.py')\n        zappa_cli.remove_local_zip()\n        # m = re.search(\"REMOTE_ENV='(.*)'\", content)\n        # self.assertEqual(m.group(1), 's3://lmbda-env/dev/env.json')\n\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'remote_env'\n        zappa_cli.load_settings('test_settings.json')\n        self.assertEqual('s3://lmbda-env/prod/env.json', zappa_cli.stage_config['remote_env'])\n        zappa_cli.create_package()\n        with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip:\n            content = lambda_zip.read('zappa_settings.py')\n        zappa_cli.remove_local_zip()\n        # m = re.search(\"REMOTE_ENV='(.*)'\", content)\n        # self.assertEqual(m.group(1), 's3://lmbda-env/prod/env.json')\n\n    def test_package_only(self):\n\n        for delete_local_zip in [True, False]:\n            zappa_cli = ZappaCLI()\n            if delete_local_zip:\n                zappa_cli.api_stage = 'build_package_only_delete_local_zip_true'\n            else:\n                zappa_cli.api_stage = 'build_package_only_delete_local_zip_false'\n            zappa_cli.load_settings('test_settings.json')\n            zappa_cli.package()\n            zappa_cli.on_exit()  # simulate the command exits\n            # the zip should never be removed\n            self.assertEqual(os.path.isfile(zappa_cli.zip_path), True)\n\n            # cleanup\n            os.remove(zappa_cli.zip_path)\n\n    def test_package_output(self):\n\n        for delete_local_zip in [True]:\n            zappa_cli = ZappaCLI()\n            if delete_local_zip:\n                zappa_cli.api_stage = 'build_package_only_delete_local_zip_true'\n            zappa_cli.load_settings('test_settings.json')\n            zappa_cli.package(output=\"oh-boy.zip\")\n            zappa_cli.on_exit()  # simulate the command exits\n            # the zip should never be removed\n            self.assertEqual(os.path.isfile(zappa_cli.zip_path), True)\n\n            # cleanup\n            os.remove(zappa_cli.zip_path)\n\n    def test_package_does_not_load_credentials(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n\n        with mock.patch('zappa.core.Zappa.load_credentials') as LoadCredentialsMock:\n            # load_credentials is set in ZappaCLI.handler; simulates 'zappa package'\n            zappa_cli.load_credentials = False\n            zappa_cli.load_settings('test_settings.json')\n            zappa_cli.package()\n            zappa_cli.on_exit()  # simulate the command exits\n\n            # credentials should not be loaded for package command\n            self.assertFalse(zappa_cli.load_credentials)\n            self.assertFalse(LoadCredentialsMock.called)\n\n        # cleanup\n        os.remove(zappa_cli.zip_path)\n\n\n    def test_flask_logging_bug(self):\n        \"\"\"\n        This checks whether Flask can write errors sanely.\n        https://github.com/Miserlou/Zappa/issues/283\n        \"\"\"\n        event = {\n                \"body\": {},\n                \"headers\": {},\n                \"pathParameters\": {},\n                \"path\": '/',\n                \"httpMethod\": \"GET\",\n                \"queryStringParameters\": {},\n                \"requestContext\": {}\n            }\n\n        old_stderr = sys.stderr\n        sys.stderr = BytesIO()\n        try:\n            environ = create_wsgi_request(event)\n            app = flask.Flask(__name__)\n            with app.request_context(environ):\n                app.logger.error(\"This is a test\")\n                log_output = sys.stderr.getvalue()\n        finally:\n            sys.stderr = old_stderr\n\n    def test_slim_handler(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'slim_handler'\n        zappa_cli.load_settings('test_settings.json')\n        zappa_cli.create_package()\n\n        self.assertTrue(os.path.isfile(zappa_cli.handler_path))\n        self.assertTrue(os.path.isfile(zappa_cli.zip_path))\n\n        zappa_cli.remove_local_zip()\n\n    def test_validate_name(self):\n        fname = 'tests/name_scenarios.json'\n        with open(fname, 'r') as f:\n            scenarios = json.load(f)\n        for scenario in scenarios:\n            value = scenario[\"value\"]\n            is_valid = scenario[\"is_valid\"]\n            if is_valid:\n                assert validate_name(value)\n            else:\n                with self.assertRaises(InvalidAwsLambdaName) as exc:\n                    validate_name(value)\n\n    def test_contains_python_files_or_subdirs(self):\n        self.assertTrue(contains_python_files_or_subdirs('tests/data'))\n        self.assertTrue(contains_python_files_or_subdirs('tests/data/test2'))\n        self.assertFalse(contains_python_files_or_subdirs('tests/data/test1'))\n\n    def test_conflicts_with_a_neighbouring_module(self):\n        self.assertTrue(conflicts_with_a_neighbouring_module('tests/data/test1'))\n        self.assertFalse(conflicts_with_a_neighbouring_module('tests/data/test2'))\n\n    def test_settings_py_generation(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('test_settings.json')\n        zappa_cli.create_package()\n        with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip:\n            content = lambda_zip.read('zappa_settings.py').decode(\"utf-8\")\n            settings = {}\n            exec(content, globals(), settings)\n\n            # validate environment variables\n            self.assertIn('ENVIRONMENT_VARIABLES', settings)\n            self.assertEqual(settings['ENVIRONMENT_VARIABLES']['TEST_ENV_VAR'], \"test_value\")\n\n            # validate Context header mappings\n            self.assertIn('CONTEXT_HEADER_MAPPINGS', settings)\n            self.assertEqual(settings['CONTEXT_HEADER_MAPPINGS']['CognitoIdentityId'], \"identity.cognitoIdentityId\")\n            self.assertEqual(settings['CONTEXT_HEADER_MAPPINGS']['APIStage'], \"stage\")\n\n        zappa_cli.remove_local_zip()\n\n    def test_only_ascii_env_var_allowed(self):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('tests/test_non_ascii_environment_var_key.json')\n        with self.assertRaises(ValueError) as context:\n            zappa_cli.create_package()\n        self.assertEqual('Environment variable keys must be ascii.', str(context.exception))\n\n\n    def test_titlecase_keys(self):\n        raw = {\n            'hOSt': 'github.com',\n            'ConnECtiOn': 'keep-alive',\n            'UpGRAde-InSecuRE-ReQueSts': '1',\n            'uSer-AGEnT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',\n            'cONtENt-TYPe': 'text/html; charset=utf-8',\n            'aCCEpT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',\n            'ACcePT-encoDInG': 'gzip, deflate, br',\n            'AcCEpT-lAnGUagE': 'en-US,en;q=0.9'\n        }\n        transformed= titlecase_keys(raw)\n        expected = {\n            'Host': 'github.com',\n            'Connection': 'keep-alive',\n            'Upgrade-Insecure-Requests': '1',\n            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',\n            'Content-Type': 'text/html; charset=utf-8',\n            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',\n            'Accept-Encoding': 'gzip, deflate, br',\n            'Accept-Language': 'en-US,en;q=0.9'\n        }\n        self.assertEqual(expected, transformed)\n\n    def test_is_valid_bucket_name(self):\n        # Bucket names must be at least 3 and no more than 63 characters long.\n        self.assertFalse(is_valid_bucket_name(\"ab\"))\n        self.assertFalse(is_valid_bucket_name(\"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefhijlmn\"))\n        # Bucket names must not contain uppercase characters or underscores.\n        self.assertFalse(is_valid_bucket_name(\"aaaBaaa\"))\n        self.assertFalse(is_valid_bucket_name(\"aaa_aaa\"))\n        # Bucket names must start with a lowercase letter or number.\n        self.assertFalse(is_valid_bucket_name(\".abbbaba\"))\n        self.assertFalse(is_valid_bucket_name(\"abbaba.\"))\n        self.assertFalse(is_valid_bucket_name(\"-abbaba\"))\n        self.assertFalse(is_valid_bucket_name(\"ababab-\"))\n        # Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.).\n        # Each label must start and end with a lowercase letter or a number.\n        self.assertFalse(is_valid_bucket_name(\"aaa..bbbb\"))\n        self.assertFalse(is_valid_bucket_name(\"aaa.-bbb.ccc\"))\n        self.assertFalse(is_valid_bucket_name(\"aaa-.bbb.ccc\"))\n        # Bucket names must not be formatted as an IP address (for example, 192.168.5.4).\n        self.assertFalse(is_valid_bucket_name(\"192.168.5.4\"))\n        self.assertFalse(is_valid_bucket_name(\"127.0.0.1\"))\n        self.assertFalse(is_valid_bucket_name(\"255.255.255.255\"))\n\n        self.assertTrue(is_valid_bucket_name(\"valid-formed-s3-bucket-name\"))\n        self.assertTrue(is_valid_bucket_name(\"worst.bucket.ever\"))\n\n    # TODO: encountered error when vpc_config[\"SubnetIds\"] or vpc_config[\"SecurityGroupIds\"] is missing\n    # We need to make the code more robust in this case and avoid the KeyError\n    def test_zappa_core_deploy_lambda_alb_missing_cert_arn(self):\n        kwargs = {\n            \"lambda_arn\": \"adatok\",\n            \"lambda_name\": \"test\",\n            \"alb_vpc_config\": {\n                \"SubnetIds\": [],\n                \"SecurityGroupIds\": [],\n                \"CertificateArn\": None\n            },\n            'timeout': '30',\n        }\n\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n\n        with self.assertRaises(EnvironmentError) as context:\n            zappa_core.deploy_lambda_alb(**kwargs)\n\n    def test_zappa_core_deploy_lambda_alb(self):\n        kwargs = {\n            \"lambda_arn\": str(uuid.uuid4()),\n            \"lambda_name\": str(uuid.uuid4()),\n            \"alb_vpc_config\": {\n                \"SubnetIds\": [],\n                \"SecurityGroupIds\": [],\n                \"CertificateArn\": str(uuid.uuid4()),\n            },\n            \"timeout\": '30',\n        }\n\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n        zappa_core.elbv2_client = botocore.session.get_session().create_client(\"elbv2\")\n        zappa_core.lambda_client = botocore.session.get_session().create_client(\"lambda\")\n        elbv2_stubber = botocore.stub.Stubber(zappa_core.elbv2_client)\n        lambda_stubber = botocore.stub.Stubber(zappa_core.lambda_client)\n\n        loadbalancer_arn = str(uuid.uuid4())\n        targetgroup_arn = str(uuid.uuid4())\n\n        elbv2_stubber.add_response(\"create_load_balancer\",\n            expected_params={\n                \"Name\": kwargs[\"lambda_name\"],\n                \"Subnets\": kwargs[\"alb_vpc_config\"][\"SubnetIds\"],\n                \"SecurityGroups\": kwargs[\"alb_vpc_config\"][\"SecurityGroupIds\"],\n                \"Scheme\": \"internet-facing\",\n                \"Type\": \"application\",\n                \"IpAddressType\": \"ipv4\",\n            },\n            service_response={\n                \"LoadBalancers\": [{\n                    \"LoadBalancerArn\": loadbalancer_arn,\n                    \"DNSName\": \"test\",\n                    \"VpcId\": \"test\",\n                    \"State\": {\n                        \"Code\": \"OK\"\n                    }\n                }]\n            },\n        )\n        elbv2_stubber.add_response(\"describe_load_balancers\",\n            expected_params={\n                \"LoadBalancerArns\": [loadbalancer_arn],\n            },\n            service_response={\n                \"LoadBalancers\": [{\n                    \"LoadBalancerArn\": loadbalancer_arn,\n                    \"State\": {\n                        \"Code\": \"active\"\n                    }\n                }]\n            },\n        )\n        elbv2_stubber.add_response(\"modify_load_balancer_attributes\",\n            expected_params={\n                \"LoadBalancerArn\": loadbalancer_arn,\n                'Attributes': [{\n                    'Key': 'idle_timeout.timeout_seconds',\n                    'Value': kwargs['timeout']\n                }]\n            },\n            service_response={\n                'Attributes': [{\n                    'Key': 'idle_timeout.timeout_seconds',\n                    'Value': kwargs['timeout']\n                }]\n            },\n        )\n\n        elbv2_stubber.add_response(\"create_target_group\",\n            expected_params={\n                \"Name\": kwargs[\"lambda_name\"],\n                \"TargetType\": \"lambda\",\n            },\n            service_response={\n                \"TargetGroups\": [{\n                    \"TargetGroupArn\": targetgroup_arn,\n                }]\n            },\n        )\n        elbv2_stubber.add_response(\"modify_target_group_attributes\",\n            expected_params={\n                \"TargetGroupArn\": targetgroup_arn,\n                'Attributes': [{\n                    'Key': 'lambda.multi_value_headers.enabled',\n                    'Value': 'true'\n                }],\n            },\n            service_response={\n                'Attributes': [{\n                    'Key': 'lambda.multi_value_headers.enabled',\n                    'Value': 'true'\n                }],\n            },\n        )\n\n        lambda_stubber.add_response(\"add_permission\",\n            expected_params={\n                \"Action\": \"lambda:InvokeFunction\",\n                \"FunctionName\": \"{}:{}\".format(kwargs[\"lambda_arn\"], ALB_LAMBDA_ALIAS),\n                \"Principal\": \"elasticloadbalancing.amazonaws.com\",\n                \"SourceArn\": targetgroup_arn,\n                \"StatementId\": kwargs[\"lambda_name\"],\n            },\n            service_response={},\n        )\n        elbv2_stubber.add_response(\"register_targets\",\n            expected_params={\n                \"TargetGroupArn\": targetgroup_arn,\n                \"Targets\": [{\"Id\": \"{}:{}\".format(kwargs[\"lambda_arn\"], ALB_LAMBDA_ALIAS)}],\n            },\n            service_response={},\n        )\n        elbv2_stubber.add_response(\"create_listener\",\n            expected_params={\n                \"Certificates\": [{\"CertificateArn\": kwargs[\"alb_vpc_config\"][\"CertificateArn\"],}],\n                \"DefaultActions\": [{\n                    \"Type\": \"forward\",\n                    \"TargetGroupArn\": targetgroup_arn,\n                }],\n                \"LoadBalancerArn\": loadbalancer_arn,\n                \"Protocol\": \"HTTPS\",\n                \"Port\": 443,\n            },\n            service_response={},\n        )\n        lambda_stubber.activate()\n        elbv2_stubber.activate()\n        zappa_core.deploy_lambda_alb(**kwargs)\n\n    def test_zappa_core_undeploy_lambda_alb(self):\n        kwargs = {\n            \"lambda_name\": str(uuid.uuid4()),\n        }\n\n        zappa_core = Zappa(\n            boto_session=mock.Mock(),\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=False\n        )\n        zappa_core.elbv2_client = botocore.session.get_session().create_client(\"elbv2\")\n        zappa_core.lambda_client = botocore.session.get_session().create_client(\"lambda\")\n        elbv2_stubber = botocore.stub.Stubber(zappa_core.elbv2_client)\n        lambda_stubber = botocore.stub.Stubber(zappa_core.lambda_client)\n\n        loadbalancer_arn = str(uuid.uuid4())\n        listener_arn = str(uuid.uuid4())\n        function_arn = str(uuid.uuid4())\n        targetgroup_arn = str(uuid.uuid4())\n\n        lambda_stubber.add_response(\"remove_permission\",\n            expected_params={\n                \"FunctionName\": kwargs[\"lambda_name\"],\n                \"StatementId\": kwargs[\"lambda_name\"],\n            },\n            service_response={},\n        )\n        elbv2_stubber.add_response(\"describe_load_balancers\",\n            expected_params={\n                \"Names\": [kwargs[\"lambda_name\"]],\n            },\n            service_response={\n                \"LoadBalancers\": [{\n                    \"LoadBalancerArn\": loadbalancer_arn,\n                }]\n            },\n        )\n        elbv2_stubber.add_response(\"describe_listeners\",\n            expected_params={\n                \"LoadBalancerArn\": loadbalancer_arn,\n            },\n            service_response={\n                \"Listeners\": [{\n                    \"ListenerArn\": listener_arn,\n                }]\n            },\n        )\n        elbv2_stubber.add_response(\"delete_listener\",\n            expected_params={\n                \"ListenerArn\": listener_arn,\n            },\n            service_response={},\n        )\n        elbv2_stubber.add_response(\"delete_load_balancer\",\n            expected_params={\n                \"LoadBalancerArn\": loadbalancer_arn,\n            },\n            service_response={},\n        )\n        elbv2_stubber.add_client_error(\"describe_load_balancers\",\n            service_error_code=\"LoadBalancerNotFound\",\n        )\n        lambda_stubber.add_response(\"get_function\",\n            expected_params={\n                \"FunctionName\": kwargs[\"lambda_name\"],\n            },\n            service_response={\n                \"Configuration\": {\"FunctionArn\": function_arn}\n            },\n        )\n        elbv2_stubber.add_response(\"describe_target_groups\",\n            expected_params={\n                \"Names\": [kwargs[\"lambda_name\"]],\n            },\n            service_response={\n                \"TargetGroups\": [{\"TargetGroupArn\": targetgroup_arn}],\n            },\n        )\n        elbv2_stubber.add_response(\"deregister_targets\",\n            service_response={},\n        )\n        elbv2_stubber.add_client_error(\"describe_target_health\",\n            service_error_code=\"InvalidTarget\",\n        )\n        elbv2_stubber.add_response(\"delete_target_group\",\n            expected_params={\n                \"TargetGroupArn\": targetgroup_arn,\n            },\n            service_response={},\n        )\n        lambda_stubber.activate()\n        elbv2_stubber.activate()\n        zappa_core.undeploy_lambda_alb(**kwargs)\n\n\n    @mock.patch('botocore.client')\n    def test_set_lambda_concurrency(self, client):\n        boto_mock = mock.MagicMock()\n        zappa_core = Zappa(\n            boto_session=boto_mock,\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=True\n        )\n        zappa_core.lambda_client.create_function.return_value = {\n            \"FunctionArn\": \"abc\",\n            \"Version\": 1,\n        }\n        access_logging_patch = zappa_core.create_lambda_function(\n            concurrency=5,\n        )\n        boto_mock.client().put_function_concurrency.assert_called_with(\n            FunctionName=\"abc\",\n            ReservedConcurrentExecutions=5,\n        )\n\n    @mock.patch('botocore.client')\n    def test_update_lambda_concurrency(self, client):\n        boto_mock = mock.MagicMock()\n        zappa_core = Zappa(\n            boto_session=boto_mock,\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=True\n        )\n        zappa_core.lambda_client.create_function.return_value = {\n            \"FunctionArn\": \"abc\",\n            \"Version\": 1,\n        }\n        access_logging_patch = zappa_core.update_lambda_function(\n            bucket=\"test\",\n            function_name=\"abc\",\n            concurrency=5,\n        )\n        boto_mock.client().put_function_concurrency.assert_called_with(\n            FunctionName=\"abc\",\n            ReservedConcurrentExecutions=5,\n        )\n        boto_mock.client().delete_function_concurrency.assert_not_called()\n\n    @mock.patch('botocore.client')\n    def test_delete_lambda_concurrency(self, client):\n        boto_mock = mock.MagicMock()\n        zappa_core = Zappa(\n            boto_session=boto_mock,\n            profile_name=\"test\",\n            aws_region=\"test\",\n            load_credentials=True\n        )\n        zappa_core.lambda_client.create_function.return_value = {\n            \"FunctionArn\": \"abc\",\n            \"Version\": 1,\n        }\n        access_logging_patch = zappa_core.update_lambda_function(\n            bucket=\"test\",\n            function_name=\"abc\",\n        )\n        boto_mock.client().put_function_concurrency.assert_not_called()\n        boto_mock.client().delete_function_concurrency.assert_called_with(\n            FunctionName=\"abc\",\n        )\n\nif __name__ == '__main__':\n    unittest.main()\n"
  },
  {
    "path": "tests/tests_async.py",
    "content": "# -*- coding: utf8 -*-\nimport boto3\nimport mock\nimport os\nimport unittest\n\ntry:\n    from mock import patch\nexcept ImportError:\n    from unittest.mock import patch\n\nfrom zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse\nfrom zappa.asynchronous import import_and_get_task, get_func_task_path\n\n\nclass TestZappa(unittest.TestCase):\n    def setUp(self):\n        self.sleep_patch = mock.patch('time.sleep', return_value=None)\n        # Tests expect us-east-1.\n        # If the user has set a different region in env variables, we set it aside for now and use us-east-1\n        self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None)\n        os.environ['AWS_DEFAULT_REGION'] = 'us-east-1'\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.start()\n\n    def tearDown(self):\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.stop()\n        del os.environ['AWS_DEFAULT_REGION']\n        if self.users_current_region_name is not None:\n            # Give the user their AWS region back, we're done testing with us-east-1.\n            os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name\n\n    ##\n    # Sanity Tests\n    ##\n\n    def test_test(self):\n        self.assertTrue(True)\n        self.assertFalse(False)\n\n    def test_nofails_classes(self):\n\n        boto_session = boto3.Session(region_name=os.environ['AWS_DEFAULT_REGION'])\n\n        a = AsyncException()\n        l = LambdaAsyncResponse(boto_session=boto_session)\n        # s = SnsAsyncResponse()\n        s = SnsAsyncResponse(arn=\"arn:abc:def\", boto_session=boto_session)\n\n    def test_nofails_funcs(self):\n        funk = import_and_get_task(\"tests.test_app.async_me\")\n        get_func_task_path(funk)\n        self.assertEqual(funk.__name__, 'async_me')\n\n    ##\n    # Functional tests\n    ##\n    def test_sync_call(self):\n        funk = import_and_get_task(\"tests.test_app.async_me\")\n        self.assertEqual(funk.sync('123'), \"run async when on lambda 123\")\n\n    def test_async_call_with_defaults(self):\n        \"\"\"Change a task's asynchronousity at runtime.\"\"\"\n        # Import the task first to make sure it is decorated whilst the\n        # environment is unpatched.\n        async_me = import_and_get_task(\"tests.test_app.async_me\")\n        lambda_async_mock = mock.Mock()\n        lambda_async_mock.return_value.send.return_value = \"Running async!\"\n        with mock.patch.dict('zappa.asynchronous.ASYNC_CLASSES',\n                             {'lambda': lambda_async_mock}):\n            # First check that it still runs synchronously by default\n            self.assertEqual(async_me(\"123\"),\n                             \"run async when on lambda 123\")\n\n            # Now patch the environment to make it look like we are running on\n            # AWS Lambda\n            options = {\n                'AWS_LAMBDA_FUNCTION_NAME': 'MyLambda',\n                'AWS_REGION': 'us-east-1'\n            }\n            with mock.patch.dict(os.environ, options):\n                self.assertEqual(async_me(\"qux\"),\n                                 \"Running async!\")\n\n        # And check the dispatching class got called correctly\n        lambda_async_mock.assert_called_once()\n        lambda_async_mock.assert_called_with(aws_region='us-east-1',\n                                             capture_response=False,\n                                             lambda_function_name=\"MyLambda\")\n        lambda_async_mock.return_value.send.assert_called_with(\n            get_func_task_path(async_me), (\"qux\",), {})\n"
  },
  {
    "path": "tests/tests_async_old.py",
    "content": "# -*- coding: utf8 -*-\nimport boto3\nimport mock\nimport os\nimport unittest\n\ntry:\n    from mock import patch\nexcept ImportError:\n    from unittest.mock import patch\n\n# NOTE: zappa.async is deprecated.\n\n# It cannot be imported normally with Python 3.7\nzappa_async = __import__('zappa.async', fromlist=[\n    'AsyncException', 'LambdaAsyncResponse', 'SnsAsyncResponse',\n    'import_and_get_task', 'get_func_task_path'\n])\nAsyncException      = zappa_async.AsyncException\nLambdaAsyncResponse = zappa_async.LambdaAsyncResponse\nSnsAsyncResponse    = zappa_async.SnsAsyncResponse\nimport_and_get_task = zappa_async.import_and_get_task\nget_func_task_path  = zappa_async.get_func_task_path\n\n\nclass TestZappa(unittest.TestCase):\n    def setUp(self):\n        self.sleep_patch = mock.patch('time.sleep', return_value=None)\n        # Tests expect us-east-1.\n        # If the user has set a different region in env variables, we set it aside for now and use us-east-1\n        self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None)\n        os.environ['AWS_DEFAULT_REGION'] = 'us-east-1'\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.start()\n\n    def tearDown(self):\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.stop()\n        del os.environ['AWS_DEFAULT_REGION']\n        if self.users_current_region_name is not None:\n            # Give the user their AWS region back, we're done testing with us-east-1.\n            os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name\n\n    ##\n    # Sanity Tests\n    ##\n\n    def test_test(self):\n        self.assertTrue(True)\n        self.assertFalse(False)\n\n    def test_nofails_classes(self):\n\n        boto_session = boto3.Session(region_name=os.environ['AWS_DEFAULT_REGION'])\n\n        a = AsyncException()\n        l = LambdaAsyncResponse(boto_session=boto_session)\n        # s = SnsAsyncResponse()\n        s = SnsAsyncResponse(arn=\"arn:abc:def\", boto_session=boto_session)\n\n    def test_nofails_funcs(self):\n        funk = import_and_get_task(\"tests.test_app.async_me\")\n        get_func_task_path(funk)\n        self.assertEqual(funk.__name__, 'async_me')\n\n    ##\n    # Functional tests\n    ##\n    def test_sync_call(self):\n        funk = import_and_get_task(\"tests.test_app.async_me\")\n        self.assertEqual(funk.sync('123'), \"run async when on lambda 123\")\n\n    def test_async_call_with_defaults(self):\n        \"\"\"Change a task's asynchronousity at runtime.\"\"\"\n        # Import the task first to make sure it is decorated whilst the\n        # environment is unpatched.\n        async_me = import_and_get_task(\"tests.test_app.async_me\")\n        lambda_async_mock = mock.Mock()\n        lambda_async_mock.return_value.send.return_value = \"Running async!\"\n        with mock.patch.dict('zappa.async.ASYNC_CLASSES',\n                             {'lambda': lambda_async_mock}):\n            # First check that it still runs synchronously by default\n            self.assertEqual(async_me(\"123\"),\n                             \"run async when on lambda 123\")\n\n            # Now patch the environment to make it look like we are running on\n            # AWS Lambda\n            options = {\n                'AWS_LAMBDA_FUNCTION_NAME': 'MyLambda',\n                'AWS_REGION': 'us-east-1'\n            }\n            with mock.patch.dict(os.environ, options):\n                self.assertEqual(async_me(\"qux\"),\n                                 \"Running async!\")\n\n        # And check the dispatching class got called correctly\n        lambda_async_mock.assert_called_once()\n        lambda_async_mock.assert_called_with(aws_region='us-east-1',\n                                             capture_response=False,\n                                             lambda_function_name=\"MyLambda\")\n        lambda_async_mock.return_value.send.assert_called_with(\n            get_func_task_path(async_me), (\"qux\",), {})\n"
  },
  {
    "path": "tests/tests_docs.py",
    "content": "import unittest\nimport re\nfrom os import path, environ\nfrom copy import copy\n\n\nDIR = path.realpath(path.dirname(__file__))\n\nclass TestDocs(unittest.TestCase):\n\n    def test_readmetoc(self):\n\n        # this test serves as a reminder to update the README toc.\n        # More information here: https://github.com/Miserlou/Zappa/issues/1228\n\n        # borrowed in part from https://github.com/PrzemekWirkus/git-toc/blob/729fe22417d2b310b4131bb592cd18b235633a8c/gittoc/gittoc.py (Apache license)\n\n        start_marker = \"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\\n\"\n        end_marker = \"<!-- END doctoc generated TOC please keep comment here to allow auto update -->\\n\"\n        template = '''{prologue}{start_marker}<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n\n{toc}\n\n{end_marker}{epilogue}'''\n\n        prologue = ''\n        toc = []\n        epilogue = ''\n\n        state = \"prologue\"\n\n        with open(path.join(path.dirname(DIR), \"README.md\")) as f:\n            contents = f.readlines()\n            old_readme = copy(contents)\n            state = \"prologue\"\n\n            for line in contents:\n\n                if state == \"prologue\":\n\n                    if line == start_marker:\n                        state = \"toc\"\n                    else:\n                        prologue = prologue + line\n\n                elif state == \"toc\":\n\n                    # we don't need to capture the old TOC\n                    if line == end_marker:\n                        state = \"epilogue\"\n\n                elif state == \"epilogue\":\n\n                    epilogue = epilogue + line\n\n                    # we only capture TOC contents *after* the TOC markers\n                    m = re.search('^([#]{1,6}) (.*)$', line)\n                    if m is not None and m.groups():\n                        header = m.group(1)\n                        header_text = m.group(2)\n                        header_text_strip = re.sub(\"[^a-zA-Z0-9-_ ]\", \"\", header_text)\n\n                        if header_text_strip == \"\":\n                            # skip empty header\n                            continue\n\n                        header_text_no_spaces = header_text_strip.replace(' ','-').lower()\n                        toc_line = \"  \" * (len(header)-2) + \"- [%s](#%s)\"% (header_text, header_text_no_spaces.lower())\n                        toc.append(toc_line)\n\n        new_readme = template.format(\n            toc=\"\\n\".join(toc),\n            start_marker=start_marker,\n            end_marker=end_marker,\n            prologue=prologue,\n            epilogue=epilogue\n        )\n\n        if environ.get('ZAPPA_TEST_SAVE_README_NEW'):\n            with open(path.join(path.dirname(DIR), \"README.test.md\"), \"w\") as f:\n                f.write(new_readme)\n\n            msg = \"README.test.md written so you can manually compare.\"\n\n        else:\n            msg = \"You can set environ[ZAPPA_TEST_SAVE_README_NEW]=1 to generate\\n\" \\\n                \"  README.test.md to manually compare.\"\n\n\n        self.assertEquals(\"\".join(old_readme), new_readme, \"README doesn't match after regenerating TOC\\n\\n\" \\\n            \"You need to run doctoc after a heading change.\\n{}\".format(msg))\n"
  },
  {
    "path": "tests/tests_middleware.py",
    "content": "# -*- coding: utf8 -*-\nimport sys\nimport unittest\n\nfrom zappa.wsgi import create_wsgi_request\nfrom zappa.middleware import ZappaWSGIMiddleware, all_casings\n\n\nclass TestWSGIMockMiddleWare(unittest.TestCase):\n    \"\"\"\n    These tests can cheat and have access to the inner status and headers,\n    through _start_response.\n    \"\"\"\n    def setUp(self):\n        \"\"\"\n        Set the test up with default headers and status codes.\n        \"\"\"\n        self.headers = list()\n        self.status = list()\n\n    def _start_response(self, status, headers, exc_info=None):\n        self.status[:] = [status]\n        self.headers[:] = headers\n\n    def test_all_casings(self):\n\n        # 2^9\n        input_string = \"Set-Cookie\"\n        x = 0\n        for casing in all_casings(input_string):\n            x = x + 1\n        self.assertEqual(x, 512)\n\n        # 2^0\n        input_string = \"\"\n        x = 0\n        for casing in all_casings(input_string):\n            x = x + 1\n        self.assertEqual(x, 1)\n\n    def test_wsgi_middleware_uglystring(self):\n        ugly_string = \"˝ÓÔÒÚÆ☃ЗИЙКЛМФХЦЧШ차를 타고 온 펲시맨(╯°□°）╯︵ ┻━┻)\"\n\n        # Pass some unicode through the middleware body\n        def simple_app(environ, start_response):\n            # String of weird characters\n            status = '200 OK'\n            response_headers = []\n            start_response(status, response_headers)\n            return [ugly_string]\n\n        # Wrap the app with the middleware\n        app = ZappaWSGIMiddleware(simple_app)\n\n        # Call with empty WSGI Environment\n        resp = app(dict(), self._start_response)\n        print(''.join(resp))\n\n        # Pass some unicode through the middleware headers\n        def simple_app(environ, start_response):\n            # String of weird characters\n            status = '301 Moved Permanently'\n            response_headers = [('Location', f'http://zappa.com/elsewhere{ugly_string}')]\n            start_response(status, response_headers)\n            return [ugly_string]\n\n        # Wrap the app with the middleware\n        app = ZappaWSGIMiddleware(simple_app)\n\n        # Call with empty WSGI Environment\n        resp = app(dict(), self._start_response)\n        print(''.join(resp))\n\n    def test_wsgi_authorizer_handling(self):\n        # With user\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                'authorizer': {\n                    'principalId': 'user1'\n                }\n            },\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        self.assertEqual(environ['REMOTE_USER'], 'user1')\n\n        # With empty authorizer, should not include REMOTE_USER\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                'authorizer': {\n                    'principalId': ''\n                }\n            },\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        user = environ.get('REMOTE_USER', 'no_user')\n        self.assertEqual(user, 'no_user')\n\n        # With missing authorizer, should not include REMOTE_USER\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {},\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        user = environ.get('REMOTE_USER', 'no_user')\n        self.assertEqual(user, 'no_user')\n\n        # With empty authorizer, should not include REMOTE_USER\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                'authorizer': {}\n            },\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        user = environ.get('REMOTE_USER', 'no_user')\n        self.assertEqual(user, 'no_user')\n\n    def test_wsgi_map_context_headers_handling(self):\n\n        # Validate a single context value mapping is translated into a HTTP header\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                'authorizer': {\n                    'principalId': 'user1'\n                },\n\n            },\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False,\n                                      context_header_mappings={'PrincipalId': 'authorizer.principalId'})\n        self.assertEqual(environ['HTTP_PRINCIPALID'], 'user1')\n\n        # Validate multiple mappings with an invalid mapping\n        # Invalid mapping should be ignored\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': None,\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                \"resourceId\": \"123456\",\n                \"apiId\": \"1234567890\",\n                \"resourcePath\": \"/{proxy+}\",\n                \"httpMethod\": \"POST\",\n                \"requestId\": \"c6af9ac6-7b61-11e6-9a41-93e8deadbeef\",\n                \"accountId\": \"123456789012\",\n                \"identity\": {\n                    \"userAgent\": \"Custom User Agent String\",\n                    \"cognitoIdentityPoolId\": \"userpoolID\",\n                    \"cognitoIdentityId\": \"myCognitoID\",\n                    \"sourceIp\": \"127.0.0.1\",\n                },\n                \"stage\": \"prod\"\n            },\n            'query': {}\n        }\n\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False,\n                                      context_header_mappings={'CognitoIdentityID': 'identity.cognitoIdentityId',\n                                                               'APIStage': 'stage',\n                                                               'InvalidValue': 'identity.cognitoAuthenticationType',\n                                                               'OtherInvalid': 'nothinghere'})\n        self.assertEqual(environ['HTTP_COGNITOIDENTITYID'], 'myCognitoID')\n        self.assertEqual(environ['HTTP_APISTAGE'], 'prod')\n        self.assertNotIn('HTTP_INVALIDVALUE', environ)\n        self.assertNotIn('HTTP_OTHERINVALID', environ)\n\n    def test_should_allow_empty_query_params(self):\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': {},\n            'multiValueQueryStringParameters': {},\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                \"resourceId\": \"123456\",\n                \"apiId\": \"1234567890\",\n                \"resourcePath\": \"/{proxy+}\",\n                \"httpMethod\": \"POST\",\n                \"requestId\": \"c6af9ac6-7b61-11e6-9a41-93e8deadbeef\",\n                \"accountId\": \"123456789012\",\n                \"identity\": {\n                    \"userAgent\": \"Custom User Agent String\",\n                    \"cognitoIdentityPoolId\": \"userpoolID\",\n                    \"cognitoIdentityId\": \"myCognitoID\",\n                    \"sourceIp\": \"127.0.0.1\",\n                },\n                \"stage\": \"prod\"\n            },\n            'query': {}\n        }\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        self.assertEqual(environ['QUERY_STRING'], '')\n\n    def test_should_handle_multi_value_query_string_params(self):\n        event = {\n            'httpMethod': 'GET',\n            'queryStringParameters': {},\n            'multiValueQueryStringParameters': {\n                'foo': [1, 2]\n            },\n            'path': '/v1/runs',\n            'params': {},\n            'body': {},\n            'headers': {\n                'Content-Type': 'application/json'\n            },\n            'pathParameters': {\n                'proxy': 'v1/runs'\n            },\n            'requestContext': {\n                \"resourceId\": \"123456\",\n                \"apiId\": \"1234567890\",\n                \"resourcePath\": \"/{proxy+}\",\n                \"httpMethod\": \"POST\",\n                \"requestId\": \"c6af9ac6-7b61-11e6-9a41-93e8deadbeef\",\n                \"accountId\": \"123456789012\",\n                \"identity\": {\n                    \"userAgent\": \"Custom User Agent String\",\n                    \"cognitoIdentityPoolId\": \"userpoolID\",\n                    \"cognitoIdentityId\": \"myCognitoID\",\n                    \"sourceIp\": \"127.0.0.1\",\n                },\n                \"stage\": \"prod\"\n            },\n            'query': {}\n        }\n        environ = create_wsgi_request(event, script_name='http://zappa.com/',\n                                      trailing_slash=False)\n        self.assertEqual(environ['QUERY_STRING'], 'foo=1&foo=2')\n"
  },
  {
    "path": "tests/tests_placebo.py",
    "content": "# -*- coding: utf8 -*-\nimport mock\nimport os\nimport random\nimport string\nimport unittest\n\nfrom .utils import placebo_session\n\nfrom zappa.cli import ZappaCLI\nfrom zappa.handler import LambdaHandler\nfrom zappa.utilities import (add_event_source, remove_event_source)\nfrom zappa.core import Zappa\n\n\ndef random_string(length):\n    return ''.join(random.choice(string.printable) for _ in range(length))\n\n\nclass TestZappa(unittest.TestCase):\n    def setUp(self):\n        self.sleep_patch = mock.patch('time.sleep', return_value=None)\n        # Tests expect us-east-1.\n        # If the user has set a different region in env variables, we set it aside for now and use us-east-1\n        self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None)\n        os.environ['AWS_DEFAULT_REGION'] = 'us-east-1'\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.start()\n\n    def tearDown(self):\n        if not os.environ.get('PLACEBO_MODE') == 'record':\n            self.sleep_patch.stop()\n        del os.environ['AWS_DEFAULT_REGION']\n        if self.users_current_region_name is not None:\n            # Give the user their AWS region back, we're done testing with us-east-1.\n            os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name\n\n    @placebo_session\n    def test_upload_remove_s3(self, session):\n        bucket_name = 'test_zappa_upload_s3'\n        z = Zappa(session)\n        zip_path = z.create_lambda_zip(minify=False)\n        res = z.upload_to_s3(zip_path, bucket_name)\n        self.assertTrue(res)\n        s3 = session.resource('s3')\n\n        # will throw ClientError with 404 if bucket doesn't exist\n        s3.meta.client.head_bucket(Bucket=bucket_name)\n\n        # will throw ClientError with 404 if object doesn't exist\n        s3.meta.client.head_object(\n            Bucket=bucket_name,\n            Key=zip_path,\n        )\n        res = z.remove_from_s3(zip_path, bucket_name)\n        self.assertTrue(res)\n\n        fail = z.upload_to_s3('/tmp/this_isnt_real', bucket_name)\n        self.assertFalse(fail)\n\n        #Will graciouly handle quirky S3 behavior on 'us-east-1' region name'\n        z.aws_region = 'us-east-1'\n        res = z.upload_to_s3(zip_path, bucket_name)\n        os.remove(zip_path)\n        self.assertTrue(res)\n\n    @placebo_session\n    def test_copy_on_s3(self, session):\n        bucket_name = 'test_zappa_upload_s3'\n        z = Zappa(session)\n        zip_path = z.create_lambda_zip(minify=False)\n        res = z.upload_to_s3(zip_path, bucket_name)\n        self.assertTrue(res)\n        s3 = session.resource('s3')\n\n        # will throw ClientError with 404 if bucket doesn't exist\n        s3.meta.client.head_bucket(Bucket=bucket_name)\n\n        # will throw ClientError with 404 if object doesn't exist\n        s3.meta.client.head_object(\n            Bucket=bucket_name,\n            Key=zip_path,\n        )\n        zp = 'copy_' + zip_path\n        res = z.copy_on_s3(zip_path, zp, bucket_name)\n        os.remove(zip_path)\n        self.assertTrue(res)\n\n    @placebo_session\n    def test_create_lambda_function_s3(self, session):\n        bucket_name = 'lmbda'\n        zip_path = 'Spheres-dev-1454694878.zip'\n\n        z = Zappa(session)\n        z.aws_region = 'us-east-1'\n        z.load_credentials(session)\n        z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n\n        arn = z.create_lambda_function(\n            bucket=bucket_name,\n            s3_key=zip_path,\n            function_name='test_lmbda_function55',\n            handler='runme.lambda_handler'\n        )\n\n        arn = z.update_lambda_function(\n            bucket=bucket_name,\n            s3_key=zip_path,\n            function_name='test_lmbda_function55',\n        )\n\n    @placebo_session\n    def test_create_lambda_function_local(self, session):\n        bucket_name = 'lmbda'\n        local_file = 'Spheres-dev-1454694878.zip'\n\n        z = Zappa(session)\n        z.aws_region = 'us-east-1'\n        z.load_credentials(session)\n        z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n\n        arn = z.create_lambda_function(\n            bucket=bucket_name,\n            local_zip=local_file,\n            function_name='test_lmbda_function55',\n            handler='runme.lambda_handler'\n        )\n\n        arn = z.update_lambda_function(\n            bucket=bucket_name,\n            local_zip=local_file,\n            function_name='test_lmbda_function55',\n        )\n\n    @placebo_session\n    def test_rollback_lambda_function_version(self, session):\n        z = Zappa(session)\n        z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution'\n\n        function_name = 'django-helloworld-unicode'\n        too_many_versions = z.rollback_lambda_function_version(function_name, 99999)\n        self.assertFalse(too_many_versions)\n\n        function_arn = z.rollback_lambda_function_version(function_name, 1)\n\n    @placebo_session\n    def test_invoke_lambda_function(self, session):\n        z = Zappa(session)\n        z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution'\n\n        function_name = 'django-helloworld-unicode'\n        payload = '{\"event\": \"hello\"}'\n        response = z.invoke_lambda_function(function_name, payload)\n\n    @placebo_session\n    def test_create_iam_roles(self, session):\n        z = Zappa(session)\n        arn, updated = z.create_iam_roles()\n        self.assertEqual(arn, \"arn:aws:iam::123:role/{}\".format(z.role_name))\n\n    @placebo_session\n    def test_get_api_url(self, session):\n        z = Zappa(session)\n        z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution'\n        url = z.get_api_url('Spheres-demonstration', 'demonstration')\n\n    @placebo_session\n    def test_fetch_logs(self, session):\n        z = Zappa(session)\n        z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n        events = z.fetch_logs('Spheres-demonstration')\n        self.assertTrue(events is not None)\n\n    ##\n    # Handler\n    ##\n\n    @placebo_session\n    def test_handler(self, session):\n        # Init will test load_remote_settings\n        lh = LambdaHandler('test_settings', session=session)\n\n        # Annoyingly, this will fail during record, but\n        # the result will actually be okay to use in playback.\n        # See: https://github.com/garnaat/placebo/issues/48\n        self.assertEqual(os.environ['hello'], 'world')\n\n        event = {\n            \"body\": {},\n            \"headers\": {},\n            \"params\": {\n                \"parameter_1\": \"asdf1\",\n                \"parameter_2\": \"asdf2\",\n            },\n            \"method\": \"GET\",\n            \"query\": {}\n        }\n        lh.handler(event, None)\n\n        # Test scheduled event\n        event = {\n                    'account': '72333333333',\n                    'region': 'us-east-1',\n                    'detail': {},\n                    'detail-type': 'Scheduled Event',\n                    'source': 'aws.events',\n                    'version': '0',\n                    'time': '2016-05-10T21:05:39Z',\n                    'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55',\n                    'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me']\n                }\n        lh.handler(event, None)\n\n        # Test command event\n        event = {\n                    'account': '72333333333',\n                    'region': 'us-east-1',\n                    'detail': {},\n                    'command': 'test_settings.command',\n                    'source': 'aws.events',\n                    'version': '0',\n                    'time': '2016-05-10T21:05:39Z',\n                    'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55',\n                    'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me']\n                }\n        lh.handler(event, None)\n\n        # Test command for async event\n        event = {\n                    'account': '72333333333',\n                    'region': 'us-east-1',\n                    'detail': {},\n                    'command': 'zappa.asynchronous.route_lambda_task',\n                    'task_path': 'tests.test_app.async_me',\n                    'args': ['xxx'],\n                    'kwargs': {},\n                    'source': 'aws.events',\n                    'version': '0',\n                    'time': '2016-05-10T21:05:39Z',\n                    'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55',\n                }\n        self.assertEqual('run async when on lambda xxx', lh.handler(event, None))\n        event['kwargs'] = {'foo': 'bar'}\n        self.assertEqual('run async when on lambda xxxbar', lh.handler(event, None))\n\n        # Test raw_command event\n        event = {\n                    'account': '72333333333',\n                    'region': 'us-east-1',\n                    'detail': {},\n                    'raw_command': 'print(\"check one two\")',\n                    'source': 'aws.events',\n                    'version': '0',\n                    'time': '2016-05-10T21:05:39Z',\n                    'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55',\n                    'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me']\n                }\n        lh.handler(event, None)\n\n        # Test AWS S3 event\n        event = {\n                    'account': '72333333333',\n                    'region': 'us-east-1',\n                    'detail': {},\n                    'Records': [{'s3': {'configurationId': 'test_project:test_settings.aws_s3_event'}}],\n                    'source': 'aws.events',\n                    'version': '0',\n                    'time': '2016-05-10T21:05:39Z',\n                    'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55',\n                    'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me']\n                }\n        self.assertEqual(\"AWS S3 EVENT\", lh.handler(event, None))\n\n        # Test AWS SNS event\n        event = {\n            'account': '72333333333',\n            'region': 'us-east-1',\n            'detail': {},\n            'Records': [\n                {\n                    'EventVersion': '1.0',\n                    'EventSource': 'aws:sns',\n                    'EventSubscriptionArn': 'arn:aws:sns:EXAMPLE',\n                    'Sns': {\n                        'SignatureVersion': '1',\n                        'Timestamp': '1970-01-01T00:00:00.000Z',\n                        'Signature': 'EXAMPLE',\n                        'SigningCertUrl': 'EXAMPLE',\n                        'MessageId': '95df01b4-ee98-5cb9-9903-4c221d41eb5e',\n                        'Message': 'Hello from SNS!',\n                        'Subject': 'TestInvoke',\n                        'Type': 'Notification',\n                        'UnsubscribeUrl': 'EXAMPLE',\n                        'TopicArn': 'arn:aws:sns:1',\n                        'MessageAttributes': {\n                            'Test': {'Type': 'String', 'Value': 'TestString'},\n                            'TestBinary': {'Type': 'Binary', 'Value': 'TestBinary'}\n                        }\n                    }\n                }\n            ]\n        }\n        self.assertEqual(\"AWS SNS EVENT\", lh.handler(event, None))\n\n        # Test AWS SNS event\n        event = {\n            'account': '72333333333',\n            'region': 'us-east-1',\n            'detail': {},\n            'Records': [\n                {\n                    'EventVersion': '1.0',\n                    'EventSource': 'aws:sns',\n                    'EventSubscriptionArn': 'arn:aws:sns:EXAMPLE',\n                    'Sns': {\n                        'SignatureVersion': '1',\n                        'Timestamp': '1970-01-01T00:00:00.000Z',\n                        'Signature': 'EXAMPLE',\n                        'SigningCertUrl': 'EXAMPLE',\n                        'MessageId': '95df01b4-ee98-5cb9-9903-4c221d41eb5e',\n                        'Message': '{\"args\": [\"arg1\", \"arg2\"], \"command\": \"zappa.asynchronous.route_sns_task\", '\n                                    '\"task_path\": \"test_settings.aws_async_sns_event\", \"kwargs\": {\"arg3\": \"varg3\"}}',\n                        'Subject': 'TestInvoke',\n                        'Type': 'Notification',\n                        'UnsubscribeUrl': 'EXAMPLE',\n                        'MessageAttributes': {\n                            'Test': {'Type': 'String', 'Value': 'TestString'},\n                            'TestBinary': {'Type': 'Binary', 'Value': 'TestBinary'}\n                        }\n                    }\n                }\n            ]\n        }\n        self.assertEqual(\"AWS ASYNC SNS EVENT\", lh.handler(event, None))\n\n        # Test AWS DynamoDB event\n        event = {\n            'Records': [\n                {\n                    'eventID': '1',\n                    'eventVersion': '1.0',\n                    'dynamodb': {\n                        'Keys': {'Id': {'N': '101'}},\n                        'NewImage': {'Message': {'S': 'New item!'}, 'Id': {'N': '101'}},\n                        'StreamViewType': 'NEW_AND_OLD_IMAGES',\n                        'SequenceNumber': '111', 'SizeBytes': 26\n                    },\n                    'awsRegion': 'us-west-2',\n                    'eventName': 'INSERT',\n                    'eventSourceARN': 'arn:aws:dynamodb:1',\n                    'eventSource': 'aws:dynamodb'\n                }\n            ]\n        }\n        self.assertEqual(\"AWS DYNAMODB EVENT\", lh.handler(event, None))\n\n        # Test AWS kinesis event\n        event = {\n            'Records': [\n                {\n                    'eventID': 'shardId-000000000000:49545115243490985018280067714973144582180062593244200961',\n                    'eventVersion': '1.0',\n                    'kinesis': {\n                        'partitionKey': 'partitionKey-3',\n                        'data': 'SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=',\n                        'kinesisSchemaVersion': '1.0',\n                        'sequenceNumber': '49545115243490985018280067714973144582180062593244200961'\n                    },\n                    'invokeIdentityArn': 'arn:aws:iam::EXAMPLE',\n                    'eventName': 'aws:kinesis:record',\n                    'eventSourceARN': 'arn:aws:kinesis:1',\n                    'eventSource': 'aws:kinesis',\n                    'awsRegion': 'us-east-1'\n                 }\n            ]\n        }\n        self.assertEqual(\"AWS KINESIS EVENT\", lh.handler(event, None))\n\n        # Test AWS SQS event\n        event = {\n            \"Records\": [\n                {\n                    \"messageId\": \"c80e8021-a70a-42c7-a470-796e1186f753\",\n                    \"receiptHandle\": \"AQEBJQ+/u6NsnT5t8Q/VbVxgdUl4TMKZ5FqhksRdIQvLBhwNvADoBxYSOVeCBXdnS9P+erlTtwEALHsnBXynkfPLH3BOUqmgzP25U8kl8eHzq6RAlzrSOfTO8ox9dcp6GLmW33YjO3zkq5VRYyQlJgLCiAZUpY2D4UQcE5D1Vm8RoKfbE+xtVaOctYeINjaQJ1u3mWx9T7tork3uAlOe1uyFjCWU5aPX/1OHhWCGi2EPPZj6vchNqDOJC/Y2k1gkivqCjz1CZl6FlZ7UVPOx3AMoszPuOYZ+Nuqpx2uCE2MHTtMHD8PVjlsWirt56oUr6JPp9aRGo6bitPIOmi4dX0FmuMKD6u/JnuZCp+AXtJVTmSHS8IXt/twsKU7A+fiMK01NtD5msNgVPoe9JbFtlGwvTQ==\",\n                    \"body\": \"{\\\"foo\\\":\\\"bar\\\"}\",\n                    \"attributes\": {\n                        \"ApproximateReceiveCount\": \"3\",\n                        \"SentTimestamp\": \"1529104986221\",\n                        \"SenderId\": \"594035263019\",\n                        \"ApproximateFirstReceiveTimestamp\": \"1529104986230\"\n                        },\n                    \"messageAttributes\": {},\n                    \"md5OfBody\": \"9bb58f26192e4ba00f01e2e7b136bbd8\",\n                    \"eventSource\": \"aws:sqs\",\n                    \"eventSourceARN\": \"arn:aws:sqs:1\",\n                    \"awsRegion\": \"us-east-1\"\n                    }\n                ]\n            }\n        self.assertEqual(\"AWS SQS EVENT\", lh.handler(event, None))\n\n        # Test Authorizer event\n        event = {'authorizationToken': 'hubtoken1', 'methodArn': 'arn:aws:execute-api:us-west-2:1234:xxxxx/dev/GET/v1/endpoint/param', 'type': 'TOKEN'}\n        self.assertEqual(\"AUTHORIZER_EVENT\", lh.handler(event, None))\n\n        # Ensure Zappa does return 401 if no function was defined.\n        lh.settings.AUTHORIZER_FUNCTION = None\n        with self.assertRaisesRegexp(Exception, 'Unauthorized'):\n            lh.handler(event, None)\n\n        # Unhandled event\n        event = {\n            'Records': [\n                {\n                    'eventID': 'shardId-000000000000:49545115243490985018280067714973144582180062593244200961',\n                    'eventVersion': '1.0',\n                    'kinesis': {\n                        'partitionKey': 'partitionKey-3',\n                        'data': 'SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=',\n                        'kinesisSchemaVersion': '1.0',\n                        'sequenceNumber': '49545115243490985018280067714973144582180062593244200961'\n                    },\n                    'eventSourceARN': 'bad:arn:1',\n                }\n            ]\n        }\n        self.assertIsNone(lh.handler(event, None))\n\n    ##\n    # CLI\n    ##\n\n    @placebo_session\n    def test_cli_aws(self, session):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.api_key_required = True\n        zappa_cli.authorization_type = 'NONE'\n        zappa_cli.load_settings('test_settings.json', session)\n        zappa_cli.zappa.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n        zappa_cli.deploy()\n        zappa_cli.update()\n        zappa_cli.rollback(1)\n        zappa_cli.tail(since=0, filter_pattern='', keep_open=False)\n        zappa_cli.schedule()\n        zappa_cli.unschedule()\n        zappa_cli.undeploy(no_confirm=True, remove_logs=True)\n\n    @placebo_session\n    def test_cli_aws_status(self, session):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.load_settings('test_settings.json', session)\n        zappa_cli.api_stage = 'devor'\n        zappa_cli.lambda_name = 'baby-flask-devor'\n        zappa_cli.zappa.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution'\n        resp = zappa_cli.status()\n\n    ##\n    # Let's Encrypt / ACME\n    ##\n\n    ##\n    # Django\n    ##\n\n    ##\n    # Util / Misc\n    ##\n\n    @placebo_session\n    def test_add_event_source(self, session):\n\n        event_source = {'arn': 'blah:blah:blah:blah', 'events': [\n                    \"s3:ObjectCreated:*\"\n                  ]}\n        # Sanity. This should fail.\n        try:\n            es = add_event_source(event_source, 'blah:blah:blah:blah', 'test_settings.callback', session)\n            self.fail(\"Success should have failed.\")\n        except ValueError:\n            pass\n\n        event_source = {'arn': 's3:s3:s3:s3', 'events': [\n                    \"s3:ObjectCreated:*\"\n                  ]}\n        add_event_source(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True)\n        remove_event_source(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True)\n        # get_event_source_status(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True)\n\n    @placebo_session\n    def test_cognito_trigger(self, session):\n        z = Zappa(session)\n        z.update_cognito('Zappa-Trigger-Test', 'us-east-1_9jUv74DH8', {'PreSignUp': 'test.tasks.pre_signup'}, 'arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test')\n\n    @placebo_session\n    def test_cognito_trigger_existing(self, session):\n        z = Zappa(session)\n        z.update_cognito('Zappa-Trigger-Test', 'us-east-1_9jUv74DH8', {'PreSignUp': 'test.tasks.pre_signup'}, 'arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test')\n\n    @placebo_session\n    def test_cli_cognito_triggers(self, session):\n        zappa_cli = ZappaCLI()\n        zappa_cli.api_stage = 'ttt888'\n        zappa_cli.api_key_required = True\n        zappa_cli.load_settings('test_settings.json', session)\n        zappa_cli.lambda_arn = 'arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test'\n        zappa_cli.update_cognito_triggers()\n\n    @placebo_session\n    def test_cognito_trigger_existing_UnusedAccountValidityDays(self, session):\n        z = Zappa(session)\n        z.update_cognito('Zappa-Trigger-Test', 'us-east-1_9jUv74DH8', {'PreSignUp': 'test.tasks.pre_signup'}, 'arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test')\n\n\nif __name__ == '__main__':\n    unittest.main()\n"
  },
  {
    "path": "tests/utils.py",
    "content": "import placebo\nimport boto3\nimport os\nimport functools\nfrom contextlib import contextmanager\nfrom mock import patch, MagicMock\n\ntry:\n    file\nexcept NameError:  # builtin 'file' was removed in Python 3\n    from io import IOBase as file\n\nPLACEBO_DIR = os.path.join(os.path.dirname(__file__), 'placebo')\n\n\ndef placebo_session(function):\n    \"\"\"\n    Decorator to help do testing with placebo.\n\n    Simply wrap the function you want to test and make sure to add\n    a \"session\" argument so the decorator can pass the placebo session.\n\n    Accepts the following environment variables to configure placebo:\n\n    PLACEBO_MODE: set to \"record\" to record AWS calls and save them\n    PLACEBO_PROFILE: optionally set an AWS credential profile to record with\n    \"\"\"\n\n    @functools.wraps(function)\n    def wrapper(*args, **kwargs):\n        session_kwargs = {\n            'region_name': os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n        }\n        profile_name = os.environ.get('PLACEBO_PROFILE', None)\n        if profile_name:\n            session_kwargs['profile_name'] = profile_name\n\n        session = boto3.Session(**session_kwargs)\n\n        self = args[0]\n        prefix = self.__class__.__name__ + '.' + function.__name__\n        record_dir = os.path.join(PLACEBO_DIR, prefix)\n\n        if not os.path.exists(record_dir):\n            os.makedirs(record_dir)\n\n        pill = placebo.attach(session, data_path=record_dir)\n\n        if os.environ.get('PLACEBO_MODE') == 'record':\n            pill.record()\n        else:\n            pill.playback()\n\n        kwargs['session'] = session\n\n        return function(*args, **kwargs)\n\n    return wrapper\n\n\n@contextmanager\ndef patch_open():\n    \"\"\"Patch open() to allow mocking both open() itself and the file that is\n    yielded.\n    Yields the mock for \"open\" and \"file\", respectively.\"\"\"\n    mock_open = MagicMock(spec=open)\n    mock_file = MagicMock(spec=file)\n\n    @contextmanager\n    def stub_open(*args, **kwargs):\n        mock_open(*args, **kwargs)\n        yield mock_file\n\n    with patch('__builtin__.open', stub_open):\n        yield mock_open, mock_file\n"
  },
  {
    "path": "zappa/__init__.py",
    "content": "import sys\n\nSUPPORTED_VERSIONS = [(3, 6), (3, 7), (3, 8)]\n\nif sys.version_info[:2] not in SUPPORTED_VERSIONS:\n    formatted_supported_versions = ['{}.{}'.format(*version) for version in SUPPORTED_VERSIONS]\n    err_msg = ('This version of Python ({}.{}) is not supported!\\n'.format(*sys.version_info) +\n               'Zappa (and AWS Lambda) support the following versions of Python: {}'.format(formatted_supported_versions))\n    raise RuntimeError(err_msg)\n\n__version__ = '0.52.0'\n"
  },
  {
    "path": "zappa/async.py",
    "content": "# -*- coding: utf-8 -*-\nimport warnings\n\nwarnings.warn('Module \"zappa.async\" is deprecated; please use \"zappa.asynchronous\" instead.', category=DeprecationWarning)\nfrom .asynchronous import *\n"
  },
  {
    "path": "zappa/asynchronous.py",
    "content": "\"\"\"\nZappa Asynchronous Tasks\n\nExample:\n```\nfrom zappa.asynchronous import task\n\n@task(service='sns')\ndef my_async_func(*args, **kwargs):\n    dosomething()\n```\n\nFor SNS, you can also pass an `arn` argument to task() which will specify which SNS path to send it to.\n\nWithout `service='sns'`, the default service is 'lambda' which will call the method in an asynchronous\nlambda call.\n\nThe following restrictions apply:\n* function must have a clean import path -- i.e. no closures, lambdas, or methods.\n* args and kwargs must be JSON-serializable.\n* The JSON-serialized form must be within the size limits for Lambda (128K) or SNS (256K) events.\n\nDiscussion of this comes from:\n    https://github.com/Miserlou/Zappa/issues/61\n    https://github.com/Miserlou/Zappa/issues/603\n    https://github.com/Miserlou/Zappa/pull/694\n    https://github.com/Miserlou/Zappa/pull/732\n    https://github.com/Miserlou/Zappa/issues/840\n\n## Full lifetime of an asynchronous dispatch:\n\n1. In a file called `foo.py`, there is the following code:\n\n```\n   from zappa.asynchronous import task\n\n   @task\n   def my_async_func(*args, **kwargs):\n       return sum(args)\n```\n\n2. The decorator desugars to:\n   `my_async_func = task(my_async_func)`\n\n3. Somewhere else, the code runs:\n   `res = my_async_func(1,2)`\n   really calls task's `_run_async(1,2)`\n      with `func` equal to the original `my_async_func`\n   If we are running in Lambda, this runs:\n      LambdaAsyncResponse().send('foo.my_async_func', (1,2), {})\n   and returns the LambdaAsyncResponse instance to the local\n   context.  That local context, can, e.g. test for `res.sent`\n   to confirm it was dispatched correctly.\n\n4. LambdaAsyncResponse.send invoked the currently running\n   AWS Lambda instance with the json message:\n\n```\n   { \"command\": \"zappa.asynchronous.route_lambda_task\",\n     \"task_path\": \"foo.my_async_func\",\n     \"args\": [1,2],\n     \"kwargs\": {}\n   }\n```\n\n5. The new lambda instance is invoked with the message above,\n   and Zappa runs its usual bootstrapping context, and inside\n   zappa.handler, the existence of the 'command' key in the message\n   dispatches the full message to zappa.asynchronous.route_lambda_task, which\n   in turn calls `run_message(message)`\n\n6. `run_message` loads the task_path value to load the `func` from `foo.py`.\n   We should note that my_async_func is wrapped by @task in this new\n   context, as well.  However, @task also decorated `my_async_func.sync()`\n   to run the original function synchronously.\n\n   `run_message` duck-types the method and finds the `.sync` attribute\n   and runs that instead -- thus we do not infinitely dispatch.\n\n   If `my_async_func` had code to dispatch other functions inside its\n   synchronous portions (or even call itself recursively), those *would*\n   be dispatched asynchronously, unless, of course, they were called\n   by: `my_async_func.sync(1,2)` in which case it would run synchronously\n   and in the current lambda function.\n\n\"\"\"\n\nimport boto3\nimport botocore\nfrom functools import update_wrapper, wraps\nimport importlib\nimport inspect\nimport json\nimport os\nimport uuid\nimport time\n\nfrom .utilities import get_topic_name\n\ntry:\n    from zappa_settings import ASYNC_RESPONSE_TABLE\nexcept ImportError:\n    ASYNC_RESPONSE_TABLE = None\n\n# Declare these here so they're kept warm.\ntry:\n    aws_session = boto3.Session()\n    LAMBDA_CLIENT = aws_session.client('lambda')\n    SNS_CLIENT = aws_session.client('sns')\n    STS_CLIENT = aws_session.client('sts')\n    DYNAMODB_CLIENT = aws_session.client('dynamodb')\nexcept botocore.exceptions.NoRegionError as e: # pragma: no cover\n    # This can happen while testing on Travis, but it's taken care  of\n    # during class initialization.\n    pass\n\n\n##\n# Response and Exception classes\n##\n\nLAMBDA_ASYNC_PAYLOAD_LIMIT = 256000\nSNS_ASYNC_PAYLOAD_LIMIT = 256000\n\nclass AsyncException(Exception): # pragma: no cover\n    \"\"\" Simple exception class for async tasks. \"\"\"\n    pass\n\n\nclass LambdaAsyncResponse:\n    \"\"\"\n    Base Response Dispatcher class\n    Can be used directly or subclassed if the method to send the message is changed.\n    \"\"\"\n    def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):\n        \"\"\" \"\"\"\n        if kwargs.get('boto_session'):\n            self.client = kwargs.get('boto_session').client('lambda')\n        else:  # pragma: no cover\n            self.client = LAMBDA_CLIENT\n\n        self.lambda_function_name = lambda_function_name\n        self.aws_region = aws_region\n        if capture_response:\n            if ASYNC_RESPONSE_TABLE is None:\n                print(\n                    \"Warning! Attempted to capture a response without \"\n                    \"async_response_table configured in settings (you won't \"\n                    \"capture async responses).\"\n                )\n                capture_response = False\n                self.response_id = \"MISCONFIGURED\"\n\n            else:\n                self.response_id = str(uuid.uuid4())\n        else:\n            self.response_id = None\n\n        self.capture_response = capture_response\n\n\n    def send(self, task_path, args, kwargs):\n        \"\"\"\n        Create the message object and pass it to the actual sender.\n        \"\"\"\n        message = {\n                'task_path': task_path,\n                'capture_response': self.capture_response,\n                'response_id': self.response_id,\n                'args': args,\n                'kwargs': kwargs\n            }\n        self._send(message)\n        return self\n\n    def _send(self, message):\n        \"\"\"\n        Given a message, directly invoke the lamdba function for this task.\n        \"\"\"\n        message['command'] = 'zappa.asynchronous.route_lambda_task'\n        payload = json.dumps(message).encode('utf-8')\n        if len(payload) > LAMBDA_ASYNC_PAYLOAD_LIMIT: # pragma: no cover\n            raise AsyncException(\"Payload too large for async Lambda call\")\n        self.response = self.client.invoke(\n                                    FunctionName=self.lambda_function_name,\n                                    InvocationType='Event', #makes the call async\n                                    Payload=payload\n                                )\n        self.sent = (self.response.get('StatusCode', 0) == 202)\n\nclass SnsAsyncResponse(LambdaAsyncResponse):\n    \"\"\"\n    Send a SNS message to a specified SNS topic\n    Serialise the func path and arguments\n    \"\"\"\n    def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs):\n\n        self.lambda_function_name = lambda_function_name\n        self.aws_region = aws_region\n\n        if kwargs.get('boto_session'):\n            self.client = kwargs.get('boto_session').client('sns')\n        else: # pragma: no cover\n            self.client = SNS_CLIENT\n\n\n        if kwargs.get('arn'):\n            self.arn = kwargs.get('arn')\n        else:\n            if kwargs.get('boto_session'):\n                sts_client = kwargs.get('boto_session').client('sts')\n            else:\n                sts_client = STS_CLIENT\n            AWS_ACCOUNT_ID = sts_client.get_caller_identity()['Account']\n            self.arn = 'arn:aws:sns:{region}:{account}:{topic_name}'.format(\n                                    region=self.aws_region,\n                                    account=AWS_ACCOUNT_ID,\n                                    topic_name=get_topic_name(self.lambda_function_name)\n                                )\n\n        # Issue: https://github.com/Miserlou/Zappa/issues/1209\n        # TODO: Refactor\n        self.capture_response = capture_response\n        if capture_response:\n            if ASYNC_RESPONSE_TABLE is None:\n                print(\n                    \"Warning! Attempted to capture a response without \"\n                    \"async_response_table configured in settings (you won't \"\n                    \"capture async responses).\"\n                )\n                capture_response = False\n                self.response_id = \"MISCONFIGURED\"\n\n            else:\n                self.response_id = str(uuid.uuid4())\n        else:\n            self.response_id = None\n\n        self.capture_response = capture_response\n\n\n    def _send(self, message):\n        \"\"\"\n        Given a message, publish to this topic.\n        \"\"\"\n        message['command'] = 'zappa.asynchronous.route_sns_task'\n        payload = json.dumps(message).encode('utf-8')\n        if len(payload) > LAMBDA_ASYNC_PAYLOAD_LIMIT: # pragma: no cover\n            raise AsyncException(\"Payload too large for SNS\")\n        self.response = self.client.publish(\n                                TargetArn=self.arn,\n                                Message=payload\n                            )\n        self.sent = self.response.get('MessageId')\n\n##\n# Aync Routers\n##\n\nASYNC_CLASSES = {\n    'lambda': LambdaAsyncResponse,\n    'sns': SnsAsyncResponse,\n}\n\n\ndef route_lambda_task(event, context):\n    \"\"\"\n    Deserialises the message from event passed to zappa.handler.run_function\n    imports the function, calls the function with args\n    \"\"\"\n    message = event\n    return run_message(message)\n\n\ndef route_sns_task(event, context):\n    \"\"\"\n    Gets SNS Message, deserialises the message,\n    imports the function, calls the function with args\n    \"\"\"\n    record = event['Records'][0]\n    message = json.loads(\n            record['Sns']['Message']\n        )\n    return run_message(message)\n\n\ndef run_message(message):\n    \"\"\"\n    Runs a function defined by a message object with keys:\n    'task_path', 'args', and 'kwargs' used by lambda routing\n    and a 'command' in handler.py\n    \"\"\"\n    if message.get('capture_response', False):\n        DYNAMODB_CLIENT.put_item(\n            TableName=ASYNC_RESPONSE_TABLE,\n            Item={\n                'id': {'S': str(message['response_id'])},\n                'ttl': {'N': str(int(time.time()+600))},\n                'async_status': {'S': 'in progress'},\n                'async_response': {'S': str(json.dumps('N/A'))},\n            }\n        )\n\n    func = import_and_get_task(message['task_path'])\n    if hasattr(func, 'sync'):\n        response = func.sync(\n            *message['args'],\n            **message['kwargs']\n        )\n    else:\n        response = func(\n            *message['args'],\n            **message['kwargs']\n        )\n\n    if message.get('capture_response', False):\n        DYNAMODB_CLIENT.update_item(\n            TableName=ASYNC_RESPONSE_TABLE,\n            Key={'id': {'S': str(message['response_id'])}},\n            UpdateExpression=\"SET async_response = :r, async_status = :s\",\n            ExpressionAttributeValues={\n                ':r': {'S': str(json.dumps(response))},\n                ':s': {'S': 'complete'},\n            },\n        )\n\n    return response\n\n##\n# Execution interfaces and classes\n##\n\n\ndef run(func, args=[], kwargs={}, service='lambda', capture_response=False,\n        remote_aws_lambda_function_name=None, remote_aws_region=None, **task_kwargs):\n    \"\"\"\n    Instead of decorating a function with @task, you can just run it directly.\n    If you were going to do func(*args, **kwargs), then you will call this:\n\n    import zappa.asynchronous.run\n    zappa.asynchronous.run(func, args, kwargs)\n\n    If you want to use SNS, then do:\n\n    zappa.asynchronous.run(func, args, kwargs, service='sns')\n\n    and other arguments are similar to @task\n    \"\"\"\n    lambda_function_name = remote_aws_lambda_function_name or os.environ.get('AWS_LAMBDA_FUNCTION_NAME')\n    aws_region = remote_aws_region or os.environ.get('AWS_REGION')\n\n    task_path = get_func_task_path(func)\n    return ASYNC_CLASSES[service](lambda_function_name=lambda_function_name,\n                                  aws_region=aws_region,\n                                  capture_response=capture_response,\n                                  **task_kwargs).send(task_path, args, kwargs)\n\n\n# Handy:\n# http://stackoverflow.com/questions/10294014/python-decorator-best-practice-using-a-class-vs-a-function\n# However, this needs to pass inspect.getargspec() in handler.py which does not take classes\n# Wrapper written to take optional arguments\n# http://chase-seibert.github.io/blog/2013/12/17/python-decorator-optional-parameter.html\ndef task(*args, **kwargs):\n    \"\"\"Async task decorator so that running\n\n    Args:\n        func (function): the function to be wrapped\n            Further requirements:\n            func must be an independent top-level function.\n                 i.e. not a class method or an anonymous function\n        service (str): either 'lambda' or 'sns'\n        remote_aws_lambda_function_name (str): the name of a remote lambda function to call with this task\n        remote_aws_region (str): the name of a remote region to make lambda/sns calls against\n\n    Returns:\n        A replacement function that dispatches func() to\n        run asynchronously through the service in question\n    \"\"\"\n\n    func = None\n    if len(args) == 1 and callable(args[0]):\n        func = args[0]\n\n    if not kwargs:  # Default Values\n        service = 'lambda'\n        lambda_function_name_arg = None\n        aws_region_arg = None\n\n    else:  # Arguments were passed\n        service = kwargs.get('service', 'lambda')\n        lambda_function_name_arg = kwargs.get('remote_aws_lambda_function_name')\n        aws_region_arg = kwargs.get('remote_aws_region')\n\n    capture_response = kwargs.get('capture_response', False)\n\n    def func_wrapper(func):\n\n        task_path = get_func_task_path(func)\n\n        @wraps(func)\n        def _run_async(*args, **kwargs):\n            \"\"\"\n            This is the wrapping async function that replaces the function\n            that is decorated with @task.\n            Args:\n                These are just passed through to @task's func\n\n            Assuming a valid service is passed to task() and it is run\n            inside a Lambda process (i.e. AWS_LAMBDA_FUNCTION_NAME exists),\n            it dispatches the function to be run through the service variable.\n            Otherwise, it runs the task synchronously.\n\n            Returns:\n                In async mode, the object returned includes state of the dispatch.\n                For instance\n\n                When outside of Lambda, the func passed to @task is run and we\n                return the actual value.\n            \"\"\"\n            lambda_function_name = lambda_function_name_arg or os.environ.get('AWS_LAMBDA_FUNCTION_NAME')\n            aws_region = aws_region_arg or os.environ.get('AWS_REGION')\n\n            if (service in ASYNC_CLASSES) and (lambda_function_name):\n                send_result = ASYNC_CLASSES[service](lambda_function_name=lambda_function_name,\n                                                     aws_region=aws_region,\n                                                     capture_response=capture_response).send(task_path, args, kwargs)\n                return send_result\n            else:\n                return func(*args, **kwargs)\n\n        update_wrapper(_run_async, func)\n\n        _run_async.service = service\n        _run_async.sync = func\n\n        return _run_async\n\n    return func_wrapper(func) if func else func_wrapper\n\n\ndef task_sns(func):\n    \"\"\"\n    SNS-based task dispatcher. Functions the same way as task()\n    \"\"\"\n    return task(func, service='sns')\n\n\n##\n# Utility Functions\n##\n\ndef import_and_get_task(task_path):\n    \"\"\"\n    Given a modular path to a function, import that module\n    and return the function.\n    \"\"\"\n    module, function = task_path.rsplit('.', 1)\n    app_module = importlib.import_module(module)\n    app_function = getattr(app_module, function)\n    return app_function\n\n\ndef get_func_task_path(func):\n    \"\"\"\n    Format the modular task path for a function via inspection.\n    \"\"\"\n    module_path = inspect.getmodule(func).__name__\n    task_path = '{module_path}.{func_name}'.format(\n                                        module_path=module_path,\n                                        func_name=func.__name__\n                                    )\n    return task_path\n\n\ndef get_async_response(response_id):\n    \"\"\"\n    Get the response from the async table\n    \"\"\"\n    response = DYNAMODB_CLIENT.get_item(\n        TableName=ASYNC_RESPONSE_TABLE,\n        Key={'id': {'S': str(response_id)}}\n    )\n    if 'Item' not in response:\n        return None\n\n    return {\n        'status': response['Item']['async_status']['S'],\n        'response': json.loads(response['Item']['async_response']['S']),\n    }\n"
  },
  {
    "path": "zappa/cli.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nZappa CLI\n\nDeploy arbitrary Python programs as serverless Zappa applications.\n\n\"\"\"\nfrom past.builtins import basestring\nfrom builtins import input, bytes\n\nimport argcomplete\nimport argparse\nimport base64\nimport pkgutil\nimport botocore\nimport click\nimport collections\nimport hjson as json\nimport inspect\nimport importlib\nimport logging\nimport os\nimport pkg_resources\nimport random\nimport re\nimport requests\nimport slugify\nimport string\nimport sys\nimport tempfile\nimport time\nimport toml\nimport yaml\nimport zipfile\n\nfrom click import Context, BaseCommand\nfrom click.exceptions import ClickException\nfrom click.globals import push_context\nfrom dateutil import parser\nfrom datetime import datetime, timedelta\n\nfrom .core import Zappa, logger, API_GATEWAY_REGIONS\nfrom .utilities import (check_new_version_available, detect_django_settings,\n                  detect_flask_apps, parse_s3_url, human_size,\n                  validate_name, InvalidAwsLambdaName, get_venv_from_python_version,\n                  get_runtime_from_python_version, string_to_timestamp, is_valid_bucket_name)\n\n\nCUSTOM_SETTINGS = [\n    'apigateway_policy',\n    'assume_policy',\n    'attach_policy',\n    'aws_region',\n    'delete_local_zip',\n    'delete_s3_zip',\n    'exclude',\n    'exclude_glob',\n    'extra_permissions',\n    'include',\n    'role_name',\n    'touch',\n]\n\nBOTO3_CONFIG_DOCS_URL = 'https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration'\n\n##\n# Main Input Processing\n##\n\nclass ZappaCLI:\n    \"\"\"\n    ZappaCLI object is responsible for loading the settings,\n    handling the input arguments and executing the calls to the core library.\n\n    \"\"\"\n\n    # CLI\n    vargs = None\n    command = None\n    stage_env = None\n\n    # Zappa settings\n    zappa = None\n    zappa_settings = None\n    load_credentials = True\n    disable_progress = False\n\n    # Specific settings\n    api_stage = None\n    app_function = None\n    aws_region = None\n    debug = None\n    prebuild_script = None\n    project_name = None\n    profile_name = None\n    lambda_arn = None\n    lambda_name = None\n    lambda_description = None\n    lambda_concurrency = None\n    s3_bucket_name = None\n    settings_file = None\n    zip_path = None\n    handler_path = None\n    vpc_config = None\n    memory_size = None\n    use_apigateway = None\n    lambda_handler = None\n    django_settings = None\n    manage_roles = True\n    exception_handler = None\n    environment_variables = None\n    authorizer = None\n    xray_tracing = False\n    aws_kms_key_arn = ''\n    context_header_mappings = None\n    tags = []\n    layers = None\n\n    stage_name_env_pattern = re.compile('^[a-zA-Z0-9_]+$')\n\n    def __init__(self):\n        self._stage_config_overrides = {}  # change using self.override_stage_config_setting(key, val)\n\n    @property\n    def stage_config(self):\n        \"\"\"\n        A shortcut property for settings of a stage.\n        \"\"\"\n\n        def get_stage_setting(stage, extended_stages=None):\n            if extended_stages is None:\n                extended_stages = []\n\n            if stage in extended_stages:\n                raise RuntimeError(stage + \" has already been extended to these settings. \"\n                                           \"There is a circular extends within the settings file.\")\n            extended_stages.append(stage)\n\n            try:\n                stage_settings = dict(self.zappa_settings[stage].copy())\n            except KeyError:\n                raise ClickException(\"Cannot extend settings for undefined stage '\" + stage + \"'.\")\n\n            extends_stage = self.zappa_settings[stage].get('extends', None)\n            if not extends_stage:\n                return stage_settings\n            extended_settings = get_stage_setting(stage=extends_stage, extended_stages=extended_stages)\n            extended_settings.update(stage_settings)\n            return extended_settings\n\n        settings = get_stage_setting(stage=self.api_stage)\n\n        # Backwards compatible for delete_zip setting that was more explicitly named delete_local_zip\n        if 'delete_zip' in settings:\n            settings['delete_local_zip'] = settings.get('delete_zip')\n\n        settings.update(self.stage_config_overrides)\n\n        return settings\n\n    @property\n    def stage_config_overrides(self):\n        \"\"\"\n        Returns zappa_settings we forcefully override for the current stage\n        set by `self.override_stage_config_setting(key, value)`\n        \"\"\"\n        return getattr(self, '_stage_config_overrides', {}).get(self.api_stage, {})\n\n    def override_stage_config_setting(self, key, val):\n        \"\"\"\n        Forcefully override a setting set by zappa_settings (for the current stage only)\n        :param key: settings key\n        :param val: value\n        \"\"\"\n        self._stage_config_overrides = getattr(self, '_stage_config_overrides', {})\n        self._stage_config_overrides.setdefault(self.api_stage, {})[key] = val\n\n    def handle(self, argv=None):\n        \"\"\"\n        Main function.\n\n        Parses command, load settings and dispatches accordingly.\n\n        \"\"\"\n\n        desc = ('Zappa - Deploy Python applications to AWS Lambda'\n                ' and API Gateway.\\n')\n        parser = argparse.ArgumentParser(description=desc)\n        parser.add_argument(\n            '-v', '--version', action='version',\n            version=pkg_resources.get_distribution(\"zappa\").version,\n            help='Print the zappa version'\n        )\n        parser.add_argument(\n            '--color', default='auto', choices=['auto','never','always']\n        )\n\n        env_parser = argparse.ArgumentParser(add_help=False)\n        me_group = env_parser.add_mutually_exclusive_group()\n        all_help = ('Execute this command for all of our defined '\n                    'Zappa stages.')\n        me_group.add_argument('--all', action='store_true', help=all_help)\n        me_group.add_argument('stage_env', nargs='?')\n\n        group = env_parser.add_argument_group()\n        group.add_argument(\n            '-a', '--app_function', help='The WSGI application function.'\n        )\n        group.add_argument(\n            '-s', '--settings_file', help='The path to a Zappa settings file.'\n        )\n        group.add_argument(\n            '-q', '--quiet', action='store_true', help='Silence all output.'\n        )\n        # https://github.com/Miserlou/Zappa/issues/407\n        # Moved when 'template' command added.\n        # Fuck Terraform.\n        group.add_argument(\n            '-j', '--json', action='store_true', help='Make the output of this command be machine readable.'\n        )\n        # https://github.com/Miserlou/Zappa/issues/891\n        group.add_argument(\n            '--disable_progress', action='store_true', help='Disable progress bars.'\n        )\n        group.add_argument(\n            \"--no_venv\", action=\"store_true\", help=\"Skip venv check.\"\n        )\n\n        ##\n        # Certify\n        ##\n        subparsers = parser.add_subparsers(title='subcommands', dest='command')\n        cert_parser = subparsers.add_parser(\n            'certify', parents=[env_parser],\n            help='Create and install SSL certificate'\n        )\n        cert_parser.add_argument(\n            '--manual', action='store_true',\n            help=(\"Gets new Let's Encrypt certificates, but prints them to console.\"\n                \"Does not update API Gateway domains.\")\n        )\n        cert_parser.add_argument(\n            '-y', '--yes', action='store_true', help='Auto confirm yes.'\n        )\n\n        ##\n        # Deploy\n        ##\n        deploy_parser = subparsers.add_parser(\n            'deploy', parents=[env_parser], help='Deploy application.'\n        )\n        deploy_parser.add_argument(\n            '-z', '--zip', help='Deploy Lambda with specific local or S3 hosted zip package'\n        )\n\n        ##\n        # Init\n        ##\n        init_parser = subparsers.add_parser('init', help='Initialize Zappa app.')\n\n        ##\n        # Package\n        ##\n        package_parser = subparsers.add_parser(\n            'package', parents=[env_parser], help='Build the application zip package locally.'\n        )\n        package_parser.add_argument(\n            '-o', '--output', help='Name of file to output the package to.'\n        )\n\n        ##\n        # Template\n        ##\n        template_parser = subparsers.add_parser(\n            'template', parents=[env_parser], help='Create a CloudFormation template for this API Gateway.'\n        )\n        template_parser.add_argument(\n            '-l', '--lambda-arn', required=True, help='ARN of the Lambda function to template to.'\n        )\n        template_parser.add_argument(\n            '-r', '--role-arn', required=True, help='ARN of the Role to template with.'\n        )\n        template_parser.add_argument(\n            '-o', '--output', help='Name of file to output the template to.'\n        )\n\n        ##\n        # Invocation\n        ##\n        invoke_parser = subparsers.add_parser(\n            'invoke', parents=[env_parser],\n            help='Invoke remote function.'\n        )\n        invoke_parser.add_argument(\n            '--raw', action='store_true',\n            help=('When invoking remotely, invoke this python as a string,'\n                  ' not as a modular path.')\n        )\n        invoke_parser.add_argument(\n            '--no-color', action='store_true',\n            help=(\"Don't color the output\")\n        )\n        invoke_parser.add_argument('command_rest')\n\n        ##\n        # Manage\n        ##\n        manage_parser = subparsers.add_parser(\n            'manage',\n            help='Invoke remote Django manage.py commands.'\n        )\n        rest_help = (\"Command in the form of <env> <command>. <env> is not \"\n                     \"required if --all is specified\")\n        manage_parser.add_argument('--all', action='store_true', help=all_help)\n        manage_parser.add_argument('command_rest', nargs='+', help=rest_help)\n        manage_parser.add_argument(\n            '--no-color', action='store_true',\n            help=(\"Don't color the output\")\n        )\n        # This is explicitly added here because this is the only subcommand that doesn't inherit from env_parser\n        # https://github.com/Miserlou/Zappa/issues/1002\n        manage_parser.add_argument(\n            '-s', '--settings_file', help='The path to a Zappa settings file.'\n        )\n\n        ##\n        # Rollback\n        ##\n        def positive_int(s):\n            \"\"\" Ensure an arg is positive \"\"\"\n            i = int(s)\n            if i < 0:\n                msg = \"This argument must be positive (got {})\".format(s)\n                raise argparse.ArgumentTypeError(msg)\n            return i\n\n        rollback_parser = subparsers.add_parser(\n            'rollback', parents=[env_parser],\n            help='Rollback deployed code to a previous version.'\n        )\n        rollback_parser.add_argument(\n            '-n', '--num-rollback', type=positive_int, default=1,\n            help='The number of versions to rollback.'\n        )\n\n        ##\n        # Scheduling\n        ##\n        subparsers.add_parser(\n            'schedule', parents=[env_parser],\n            help='Schedule functions to occur at regular intervals.'\n        )\n\n        ##\n        # Status\n        ##\n        subparsers.add_parser(\n            'status', parents=[env_parser],\n            help='Show deployment status and event schedules.'\n        )\n\n        ##\n        # Log Tailing\n        ##\n        tail_parser = subparsers.add_parser(\n            'tail', parents=[env_parser], help='Tail deployment logs.'\n        )\n        tail_parser.add_argument(\n            '--no-color', action='store_true',\n            help=\"Don't color log tail output.\"\n        )\n        tail_parser.add_argument(\n            '--http', action='store_true',\n            help='Only show HTTP requests in tail output.'\n        )\n        tail_parser.add_argument(\n            '--non-http', action='store_true',\n            help='Only show non-HTTP requests in tail output.'\n        )\n        tail_parser.add_argument(\n            '--since', type=str, default=\"100000s\",\n            help=\"Only show lines since a certain timeframe.\"\n        )\n        tail_parser.add_argument(\n            '--filter', type=str, default=\"\",\n            help=\"Apply a filter pattern to the logs.\"\n        )\n        tail_parser.add_argument(\n            '--force-color', action='store_true',\n            help='Force coloring log tail output even if coloring support is not auto-detected. (example: piping)'\n        )\n        tail_parser.add_argument(\n            '--disable-keep-open', action='store_true',\n            help=\"Exit after printing the last available log, rather than keeping the log open.\"\n        )\n\n        ##\n        # Undeploy\n        ##\n        undeploy_parser = subparsers.add_parser(\n            'undeploy', parents=[env_parser], help='Undeploy application.'\n        )\n        undeploy_parser.add_argument(\n            '--remove-logs', action='store_true',\n            help=('Removes log groups of api gateway and lambda task'\n                  ' during the undeployment.'),\n        )\n        undeploy_parser.add_argument(\n            '-y', '--yes', action='store_true', help='Auto confirm yes.'\n        )\n\n        ##\n        # Unschedule\n        ##\n        subparsers.add_parser('unschedule', parents=[env_parser],\n                              help='Unschedule functions.')\n\n        ##\n        # Updating\n        ##\n        update_parser = subparsers.add_parser(\n            'update', parents=[env_parser], help='Update deployed application.'\n        )\n        update_parser.add_argument(\n            '-z', '--zip', help='Update Lambda with specific local or S3 hosted zip package'\n        )\n        update_parser.add_argument(\n            '-n', '--no-upload', help=\"Update configuration where appropriate, but don't upload new code\"\n        )\n\n        ##\n        # Debug\n        ##\n        subparsers.add_parser(\n            'shell', parents=[env_parser], help='A debug shell with a loaded Zappa object.'\n        )\n\n        argcomplete.autocomplete(parser)\n        args = parser.parse_args(argv)\n        self.vargs = vars(args)\n\n        if args.color == 'never':\n            disable_click_colors()\n        elif args.color == 'always':\n            #TODO: Support aggressive coloring like \"--force-color\" on all commands\n            pass\n        elif args.color == 'auto':\n            pass\n\n        # Parse the input\n        # NOTE(rmoe): Special case for manage command\n        # The manage command can't have both stage_env and command_rest\n        # arguments. Since they are both positional arguments argparse can't\n        # differentiate the two. This causes problems when used with --all.\n        # (e.g. \"manage --all showmigrations admin\" argparse thinks --all has\n        # been specified AND that stage_env='showmigrations')\n        # By having command_rest collect everything but --all we can split it\n        # apart here instead of relying on argparse.\n        if not args.command:\n            parser.print_help()\n            return\n\n        if args.command == 'manage' and not self.vargs.get('all'):\n            self.stage_env = self.vargs['command_rest'].pop(0)\n        else:\n            self.stage_env = self.vargs.get('stage_env')\n\n        if args.command == 'package':\n            self.load_credentials = False\n\n        self.command = args.command\n\n        self.disable_progress = self.vargs.get('disable_progress')\n        if self.vargs.get('quiet'):\n            self.silence()\n\n        # We don't have any settings yet, so make those first!\n        # (Settings-based interactions will fail\n        # before a project has been initialized.)\n        if self.command == 'init':\n            self.init()\n            return\n\n        # Make sure there isn't a new version available\n        if not self.vargs.get('json'):\n            self.check_for_update()\n\n        # Load and Validate Settings File\n        self.load_settings_file(self.vargs.get('settings_file'))\n\n        # Should we execute this for all stages, or just one?\n        all_stages = self.vargs.get('all')\n        stages = []\n\n        if all_stages: # All stages!\n            stages = self.zappa_settings.keys()\n        else: # Just one env.\n            if not self.stage_env:\n                # If there's only one stage defined in the settings,\n                # use that as the default.\n                if len(self.zappa_settings.keys()) == 1:\n                    stages.append(list(self.zappa_settings.keys())[0])\n                else:\n                    parser.error(\"Please supply a stage to interact with.\")\n            else:\n                stages.append(self.stage_env)\n\n        for stage in stages:\n            try:\n                self.dispatch_command(self.command, stage)\n            except ClickException as e:\n                # Discussion on exit codes: https://github.com/Miserlou/Zappa/issues/407\n                e.show()\n                sys.exit(e.exit_code)\n\n    def dispatch_command(self, command, stage):\n        \"\"\"\n        Given a command to execute and stage,\n        execute that command.\n        \"\"\"\n\n        self.api_stage = stage\n\n        if command not in ['status', 'manage']:\n            if not self.vargs.get('json', None):\n                click.echo(\"Calling \" + click.style(command, fg=\"green\", bold=True) + \" for stage \" +\n                           click.style(self.api_stage, bold=True) + \"..\" )\n\n        # Explicitly define the app function.\n        # Related: https://github.com/Miserlou/Zappa/issues/832\n        if self.vargs.get('app_function', None):\n            self.app_function = self.vargs['app_function']\n\n        # Load our settings, based on api_stage.\n        try:\n            self.load_settings(self.vargs.get('settings_file'))\n        except ValueError as e:\n            if hasattr(e, 'message'):\n                print(\"Error: {}\".format(e.message))\n            else:\n                print(str(e))\n            sys.exit(-1)\n        self.callback('settings')\n\n        # Hand it off\n        if command == 'deploy': # pragma: no cover\n            self.deploy(self.vargs['zip'])\n        if command == 'package': # pragma: no cover\n            self.package(self.vargs['output'])\n        if command == 'template': # pragma: no cover\n            self.template(      self.vargs['lambda_arn'],\n                                self.vargs['role_arn'],\n                                output=self.vargs['output'],\n                                json=self.vargs['json']\n                            )\n        elif command == 'update': # pragma: no cover\n            self.update(self.vargs['zip'], self.vargs['no_upload'])\n        elif command == 'rollback': # pragma: no cover\n            self.rollback(self.vargs['num_rollback'])\n        elif command == 'invoke': # pragma: no cover\n\n            if not self.vargs.get('command_rest'):\n                print(\"Please enter the function to invoke.\")\n                return\n\n            self.invoke(\n                self.vargs['command_rest'],\n                raw_python=self.vargs['raw'],\n                no_color=self.vargs['no_color'],\n            )\n        elif command == 'manage': # pragma: no cover\n\n            if not self.vargs.get('command_rest'):\n                print(\"Please enter the management command to invoke.\")\n                return\n\n            if not self.django_settings:\n                print(\"This command is for Django projects only!\")\n                print(\"If this is a Django project, please define django_settings in your zappa_settings.\")\n                return\n\n            command_tail = self.vargs.get('command_rest')\n            if len(command_tail) > 1:\n                command = \" \".join(command_tail) # ex: zappa manage dev \"shell --version\"\n            else:\n                command = command_tail[0] # ex: zappa manage dev showmigrations admin\n\n            self.invoke(\n                command,\n                command=\"manage\",\n                no_color=self.vargs['no_color'],\n            )\n\n        elif command == 'tail': # pragma: no cover\n            self.tail(\n                colorize=(not self.vargs['no_color']),\n                http=self.vargs['http'],\n                non_http=self.vargs['non_http'],\n                since=self.vargs['since'],\n                filter_pattern=self.vargs['filter'],\n                force_colorize=self.vargs['force_color'] or None,\n                keep_open=not self.vargs['disable_keep_open']\n            )\n        elif command == 'undeploy': # pragma: no cover\n            self.undeploy(\n                no_confirm=self.vargs['yes'],\n                remove_logs=self.vargs['remove_logs']\n            )\n        elif command == 'schedule': # pragma: no cover\n            self.schedule()\n        elif command == 'unschedule': # pragma: no cover\n            self.unschedule()\n        elif command == 'status': # pragma: no cover\n            self.status(return_json=self.vargs['json'])\n        elif command == 'certify': # pragma: no cover\n            self.certify(\n                no_confirm=self.vargs['yes'],\n                manual=self.vargs['manual']\n            )\n        elif command == 'shell': # pragma: no cover\n            self.shell()\n\n    ##\n    # The Commands\n    ##\n\n    def package(self, output=None):\n        \"\"\"\n        Only build the package\n        \"\"\"\n        # Make sure we're in a venv.\n        self.check_venv()\n\n        # force not to delete the local zip\n        self.override_stage_config_setting('delete_local_zip', False)\n        # Execute the prebuild script\n        if self.prebuild_script:\n            self.execute_prebuild_script()\n        # Create the Lambda Zip\n        self.create_package(output)\n        self.callback('zip')\n        size = human_size(os.path.getsize(self.zip_path))\n        click.echo(click.style(\"Package created\", fg=\"green\", bold=True) + \": \" + click.style(self.zip_path, bold=True) + \" (\" + size + \")\")\n\n    def template(self, lambda_arn, role_arn, output=None, json=False):\n        \"\"\"\n        Only build the template file.\n        \"\"\"\n\n        if not lambda_arn:\n            raise ClickException(\"Lambda ARN is required to template.\")\n\n        if not role_arn:\n            raise ClickException(\"Role ARN is required to template.\")\n\n        self.zappa.credentials_arn = role_arn\n\n        # Create the template!\n        template = self.zappa.create_stack_template(\n                                            lambda_arn=lambda_arn,\n                                            lambda_name=self.lambda_name,\n                                            api_key_required=self.api_key_required,\n                                            iam_authorization=self.iam_authorization,\n                                            authorizer=self.authorizer,\n                                            cors_options=self.cors,\n                                            description=self.apigateway_description,\n                                            endpoint_configuration=self.endpoint_configuration\n                                        )\n\n        if not output:\n            template_file = self.lambda_name + '-template-' + str(int(time.time())) + '.json'\n        else:\n            template_file = output\n        with open(template_file, 'wb') as out:\n            out.write(bytes(template.to_json(indent=None, separators=(',',':')), \"utf-8\"))\n\n        if not json:\n            click.echo(click.style(\"Template created\", fg=\"green\", bold=True) + \": \" + click.style(template_file, bold=True))\n        else:\n            with open(template_file, 'r') as out:\n                print(out.read())\n\n    def deploy(self, source_zip=None):\n        \"\"\"\n        Package your project, upload it to S3, register the Lambda function\n        and create the API Gateway routes.\n\n        \"\"\"\n\n        if not source_zip:\n            # Make sure we're in a venv.\n            self.check_venv()\n\n            # Execute the prebuild script\n            if self.prebuild_script:\n                self.execute_prebuild_script()\n\n            # Make sure this isn't already deployed.\n            deployed_versions = self.zappa.get_lambda_function_versions(self.lambda_name)\n            if len(deployed_versions) > 0:\n                raise ClickException(\"This application is \" + click.style(\"already deployed\", fg=\"red\") +\n                                     \" - did you mean to call \" + click.style(\"update\", bold=True) + \"?\")\n\n            # Make sure the necessary IAM execution roles are available\n            if self.manage_roles:\n                try:\n                    self.zappa.create_iam_roles()\n                except botocore.client.ClientError as ce:\n                    raise ClickException(\n                        click.style(\"Failed\", fg=\"red\") + \" to \" + click.style(\"manage IAM roles\", bold=True) + \"!\\n\" +\n                        \"You may \" + click.style(\"lack the necessary AWS permissions\", bold=True) +\n                        \" to automatically manage a Zappa execution role.\\n\" +\n                        click.style(\"Exception reported by AWS:\", bold=True) + format(ce) + '\\n' +\n                        \"To fix this, see here: \" +\n                        click.style(\n                            \"https://github.com/Miserlou/Zappa#custom-aws-iam-roles-and-policies-for-deployment\",\n                            bold=True)\n                        + '\\n')\n\n            # Create the Lambda Zip\n            self.create_package()\n            self.callback('zip')\n\n            # Upload it to S3\n            success = self.zappa.upload_to_s3(\n                    self.zip_path, self.s3_bucket_name, disable_progress=self.disable_progress)\n            if not success: # pragma: no cover\n                raise ClickException(\"Unable to upload to S3. Quitting.\")\n\n            # If using a slim handler, upload it to S3 and tell lambda to use this slim handler zip\n            if self.stage_config.get('slim_handler', False):\n                # https://github.com/Miserlou/Zappa/issues/510\n                success = self.zappa.upload_to_s3(self.handler_path, self.s3_bucket_name, disable_progress=self.disable_progress)\n                if not success:  # pragma: no cover\n                    raise ClickException(\"Unable to upload handler to S3. Quitting.\")\n\n                # Copy the project zip to the current project zip\n                current_project_name = '{0!s}_{1!s}_current_project.tar.gz'.format(self.api_stage, self.project_name)\n                success = self.zappa.copy_on_s3(src_file_name=self.zip_path, dst_file_name=current_project_name,\n                                                bucket_name=self.s3_bucket_name)\n                if not success:  # pragma: no cover\n                    raise ClickException(\"Unable to copy the zip to be the current project. Quitting.\")\n\n                handler_file = self.handler_path\n            else:\n                handler_file = self.zip_path\n\n        # Fixes https://github.com/Miserlou/Zappa/issues/613\n        try:\n            self.lambda_arn = self.zappa.get_lambda_function(\n                function_name=self.lambda_name)\n        except botocore.client.ClientError:\n            # Register the Lambda function with that zip as the source\n            # You'll also need to define the path to your lambda_handler code.\n            kwargs = dict(\n                handler=self.lambda_handler,\n                description=self.lambda_description,\n                vpc_config=self.vpc_config,\n                dead_letter_config=self.dead_letter_config,\n                timeout=self.timeout_seconds,\n                memory_size=self.memory_size,\n                runtime=self.runtime,\n                aws_environment_variables=self.aws_environment_variables,\n                aws_kms_key_arn=self.aws_kms_key_arn,\n                use_alb=self.use_alb,\n                layers=self.layers,\n                concurrency=self.lambda_concurrency,\n            )\n            if source_zip and source_zip.startswith('s3://'):\n                bucket, key_name = parse_s3_url(source_zip)\n                kwargs['function_name'] = self.lambda_name\n                kwargs['bucket'] = bucket\n                kwargs['s3_key'] = key_name\n            elif source_zip and not source_zip.startswith('s3://'):\n                with open(source_zip, mode='rb') as fh:\n                    byte_stream = fh.read()\n                kwargs['function_name'] = self.lambda_name\n                kwargs['local_zip'] = byte_stream\n            else:\n                kwargs['function_name'] = self.lambda_name\n                kwargs['bucket'] = self.s3_bucket_name\n                kwargs['s3_key'] = handler_file\n\n            self.lambda_arn = self.zappa.create_lambda_function(**kwargs)\n\n        # Schedule events for this deployment\n        self.schedule()\n\n        endpoint_url = ''\n        deployment_string = click.style(\"Deployment complete\", fg=\"green\", bold=True) + \"!\"\n\n        if self.use_alb:\n            kwargs = dict(\n                lambda_arn=self.lambda_arn,\n                lambda_name=self.lambda_name,\n                alb_vpc_config=self.alb_vpc_config,\n                timeout=self.timeout_seconds\n            )\n            self.zappa.deploy_lambda_alb(**kwargs)\n\n        if self.use_apigateway:\n\n            # Create and configure the API Gateway\n            template = self.zappa.create_stack_template(\n                                                        lambda_arn=self.lambda_arn,\n                                                        lambda_name=self.lambda_name,\n                                                        api_key_required=self.api_key_required,\n                                                        iam_authorization=self.iam_authorization,\n                                                        authorizer=self.authorizer,\n                                                        cors_options=self.cors,\n                                                        description=self.apigateway_description,\n                                                        endpoint_configuration=self.endpoint_configuration\n                                                    )\n\n            self.zappa.update_stack(\n                                    self.lambda_name,\n                                    self.s3_bucket_name,\n                                    wait=True,\n                                    disable_progress=self.disable_progress\n                                )\n\n            api_id = self.zappa.get_api_id(self.lambda_name)\n\n            # Add binary support\n            if self.binary_support:\n                self.zappa.add_binary_support(api_id=api_id, cors=self.cors)\n\n            # Add payload compression\n            if self.stage_config.get('payload_compression', True):\n                self.zappa.add_api_compression(\n                    api_id=api_id,\n                    min_compression_size=self.stage_config.get('payload_minimum_compression_size', 0))\n\n            # Deploy the API!\n            endpoint_url = self.deploy_api_gateway(api_id)\n            deployment_string = deployment_string + \": {}\".format(endpoint_url)\n\n            # Create/link API key\n            if self.api_key_required:\n                if self.api_key is None:\n                    self.zappa.create_api_key(api_id=api_id, stage_name=self.api_stage)\n                else:\n                    self.zappa.add_api_stage_to_api_key(api_key=self.api_key, api_id=api_id, stage_name=self.api_stage)\n\n            if self.stage_config.get('touch', True):\n                self.touch_endpoint(endpoint_url)\n\n        # Finally, delete the local copy our zip package\n        if not source_zip:\n            if self.stage_config.get('delete_local_zip', True):\n                self.remove_local_zip()\n\n        # Remove the project zip from S3.\n        if not source_zip:\n            self.remove_uploaded_zip()\n\n        self.callback('post')\n\n        click.echo(deployment_string)\n\n    def update(self, source_zip=None, no_upload=False):\n        \"\"\"\n        Repackage and update the function code.\n        \"\"\"\n\n        if not source_zip:\n            # Make sure we're in a venv.\n            self.check_venv()\n\n            # Execute the prebuild script\n            if self.prebuild_script:\n                self.execute_prebuild_script()\n\n            # Temporary version check\n            try:\n                updated_time = 1472581018\n                function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name)\n                conf = function_response['Configuration']\n                last_updated = parser.parse(conf['LastModified'])\n                last_updated_unix = time.mktime(last_updated.timetuple())\n            except botocore.exceptions.BotoCoreError as e:\n                click.echo(click.style(type(e).__name__, fg=\"red\") + \": \" + e.args[0])\n                sys.exit(-1)\n            except Exception as e:\n                click.echo(click.style(\"Warning!\", fg=\"red\") + \" Couldn't get function \" + self.lambda_name +\n                           \" in \" + self.zappa.aws_region + \" - have you deployed yet?\")\n                sys.exit(-1)\n\n            if last_updated_unix <= updated_time:\n                click.echo(click.style(\"Warning!\", fg=\"red\") +\n                           \" You may have upgraded Zappa since deploying this application. You will need to \" +\n                           click.style(\"redeploy\", bold=True) + \" for this deployment to work properly!\")\n\n            # Make sure the necessary IAM execution roles are available\n            if self.manage_roles:\n                try:\n                    self.zappa.create_iam_roles()\n                except botocore.client.ClientError:\n                    click.echo(click.style(\"Failed\", fg=\"red\") + \" to \" + click.style(\"manage IAM roles\", bold=True) + \"!\")\n                    click.echo(\"You may \" + click.style(\"lack the necessary AWS permissions\", bold=True) +\n                               \" to automatically manage a Zappa execution role.\")\n                    click.echo(\"To fix this, see here: \" +\n                               click.style(\"https://github.com/Miserlou/Zappa#custom-aws-iam-roles-and-policies-for-deployment\",\n                                           bold=True))\n                    sys.exit(-1)\n\n            # Create the Lambda Zip,\n            if not no_upload:\n                self.create_package()\n                self.callback('zip')\n\n            # Upload it to S3\n            if not no_upload:\n                success = self.zappa.upload_to_s3(self.zip_path, self.s3_bucket_name, disable_progress=self.disable_progress)\n                if not success:  # pragma: no cover\n                    raise ClickException(\"Unable to upload project to S3. Quitting.\")\n\n                # If using a slim handler, upload it to S3 and tell lambda to use this slim handler zip\n                if self.stage_config.get('slim_handler', False):\n                    # https://github.com/Miserlou/Zappa/issues/510\n                    success = self.zappa.upload_to_s3(self.handler_path, self.s3_bucket_name, disable_progress=self.disable_progress)\n                    if not success:  # pragma: no cover\n                        raise ClickException(\"Unable to upload handler to S3. Quitting.\")\n\n                    # Copy the project zip to the current project zip\n                    current_project_name = '{0!s}_{1!s}_current_project.tar.gz'.format(self.api_stage, self.project_name)\n                    success = self.zappa.copy_on_s3(src_file_name=self.zip_path, dst_file_name=current_project_name,\n                                                    bucket_name=self.s3_bucket_name)\n                    if not success:  # pragma: no cover\n                        raise ClickException(\"Unable to copy the zip to be the current project. Quitting.\")\n\n                    handler_file = self.handler_path\n                else:\n                    handler_file = self.zip_path\n\n        # Register the Lambda function with that zip as the source\n        # You'll also need to define the path to your lambda_handler code.\n        kwargs = dict(\n            bucket=self.s3_bucket_name,\n            function_name=self.lambda_name,\n            num_revisions=self.num_retained_versions,\n            concurrency=self.lambda_concurrency,\n        )\n        if source_zip and source_zip.startswith('s3://'):\n            bucket, key_name = parse_s3_url(source_zip)\n            kwargs.update(dict(\n                bucket=bucket,\n                s3_key=key_name\n            ))\n            self.lambda_arn = self.zappa.update_lambda_function(**kwargs)\n        elif source_zip and not source_zip.startswith('s3://'):\n            with open(source_zip, mode='rb') as fh:\n                byte_stream = fh.read()\n            kwargs['local_zip'] = byte_stream\n            self.lambda_arn = self.zappa.update_lambda_function(**kwargs)\n        else:\n            if not no_upload:\n                kwargs['s3_key'] = handler_file\n                self.lambda_arn = self.zappa.update_lambda_function(**kwargs)\n\n        # Remove the uploaded zip from S3, because it is now registered..\n        if not source_zip and not no_upload:\n            self.remove_uploaded_zip()\n\n        # Update the configuration, in case there are changes.\n        self.lambda_arn = self.zappa.update_lambda_configuration(\n                                                        lambda_arn=self.lambda_arn,\n                                                        function_name=self.lambda_name,\n                                                        handler=self.lambda_handler,\n                                                        description=self.lambda_description,\n                                                        vpc_config=self.vpc_config,\n                                                        timeout=self.timeout_seconds,\n                                                        memory_size=self.memory_size,\n                                                        runtime=self.runtime,\n                                                        aws_environment_variables=self.aws_environment_variables,\n                                                        aws_kms_key_arn=self.aws_kms_key_arn,\n                                                        layers=self.layers\n                                                    )\n\n        # Finally, delete the local copy our zip package\n        if not source_zip and not no_upload:\n            if self.stage_config.get('delete_local_zip', True):\n                self.remove_local_zip()\n\n        if self.use_apigateway:\n\n            self.zappa.create_stack_template(\n                                            lambda_arn=self.lambda_arn,\n                                            lambda_name=self.lambda_name,\n                                            api_key_required=self.api_key_required,\n                                            iam_authorization=self.iam_authorization,\n                                            authorizer=self.authorizer,\n                                            cors_options=self.cors,\n                                            description=self.apigateway_description,\n                                            endpoint_configuration=self.endpoint_configuration\n                                        )\n            self.zappa.update_stack(\n                                    self.lambda_name,\n                                    self.s3_bucket_name,\n                                    wait=True,\n                                    update_only=True,\n                                    disable_progress=self.disable_progress)\n\n            api_id = self.zappa.get_api_id(self.lambda_name)\n\n            # Update binary support\n            if self.binary_support:\n                self.zappa.add_binary_support(api_id=api_id, cors=self.cors)\n            else:\n                self.zappa.remove_binary_support(api_id=api_id, cors=self.cors)\n\n            if self.stage_config.get('payload_compression', True):\n                self.zappa.add_api_compression(\n                    api_id=api_id,\n                    min_compression_size=self.stage_config.get('payload_minimum_compression_size', 0))\n            else:\n                self.zappa.remove_api_compression(api_id=api_id)\n\n            # It looks a bit like we might actually be using this just to get the URL,\n            # but we're also updating a few of the APIGW settings.\n            endpoint_url = self.deploy_api_gateway(api_id)\n\n            if self.stage_config.get('domain', None):\n                endpoint_url = self.stage_config.get('domain')\n\n        else:\n            endpoint_url = None\n\n        self.schedule()\n\n        # Update any cognito pool with the lambda arn\n        # do this after schedule as schedule clears the lambda policy and we need to add one\n        self.update_cognito_triggers()\n\n        self.callback('post')\n\n        if endpoint_url and 'https://' not in endpoint_url:\n            endpoint_url = 'https://' + endpoint_url\n\n        if self.base_path:\n            endpoint_url += '/' + self.base_path\n\n        deployed_string = \"Your updated Zappa deployment is \" + click.style(\"live\", fg='green', bold=True) + \"!\"\n        if self.use_apigateway:\n            deployed_string = deployed_string + \": \" + click.style(\"{}\".format(endpoint_url), bold=True)\n\n            api_url = None\n            if endpoint_url and 'amazonaws.com' not in endpoint_url:\n                api_url = self.zappa.get_api_url(\n                    self.lambda_name,\n                    self.api_stage)\n\n                if endpoint_url != api_url:\n                    deployed_string = deployed_string + \" (\" + api_url + \")\"\n\n            if self.stage_config.get('touch', True):\n                if api_url:\n                    self.touch_endpoint(api_url)\n                elif endpoint_url:\n                    self.touch_endpoint(endpoint_url)\n\n        click.echo(deployed_string)\n\n    def rollback(self, revision):\n        \"\"\"\n        Rollsback the currently deploy lambda code to a previous revision.\n        \"\"\"\n\n        print(\"Rolling back..\")\n\n        self.zappa.rollback_lambda_function_version(\n            self.lambda_name, versions_back=revision)\n        print(\"Done!\")\n\n    def tail(self, since, filter_pattern, limit=10000, keep_open=True, colorize=True, http=False, non_http=False, force_colorize=False):\n        \"\"\"\n        Tail this function's logs.\n\n        if keep_open, do so repeatedly, printing any new logs\n        \"\"\"\n\n        try:\n            since_stamp = string_to_timestamp(since)\n\n            last_since = since_stamp\n            while True:\n                new_logs = self.zappa.fetch_logs(\n                    self.lambda_name,\n                    start_time=since_stamp,\n                    limit=limit,\n                    filter_pattern=filter_pattern,\n                    )\n\n                new_logs = [ e for e in new_logs if e['timestamp'] > last_since ]\n                self.print_logs(new_logs, colorize, http, non_http, force_colorize)\n\n                if not keep_open:\n                    break\n                if new_logs:\n                    last_since = new_logs[-1]['timestamp']\n                time.sleep(1)\n        except KeyboardInterrupt: # pragma: no cover\n            # Die gracefully\n            try:\n                sys.exit(0)\n            except SystemExit:\n                os._exit(130)\n\n    def undeploy(self, no_confirm=False, remove_logs=False):\n        \"\"\"\n        Tear down an existing deployment.\n        \"\"\"\n\n        if not no_confirm: # pragma: no cover\n            confirm = input(\"Are you sure you want to undeploy? [y/n] \")\n            if confirm != 'y':\n                return\n\n        if self.use_alb:\n            self.zappa.undeploy_lambda_alb(self.lambda_name)\n\n        if self.use_apigateway:\n            if remove_logs:\n                self.zappa.remove_api_gateway_logs(self.lambda_name)\n\n            domain_name = self.stage_config.get('domain', None)\n            base_path = self.stage_config.get('base_path', None)\n\n            # Only remove the api key when not specified\n            if self.api_key_required and self.api_key is None:\n                api_id = self.zappa.get_api_id(self.lambda_name)\n                self.zappa.remove_api_key(api_id, self.api_stage)\n\n            gateway_id = self.zappa.undeploy_api_gateway(\n                self.lambda_name,\n                domain_name=domain_name,\n                base_path=base_path\n            )\n\n        self.unschedule()  # removes event triggers, including warm up event.\n\n        self.zappa.delete_lambda_function(self.lambda_name)\n        if remove_logs:\n            self.zappa.remove_lambda_function_logs(self.lambda_name)\n\n        click.echo(click.style(\"Done\", fg=\"green\", bold=True) + \"!\")\n\n    def update_cognito_triggers(self):\n        \"\"\"\n        Update any cognito triggers\n        \"\"\"\n        if self.cognito:\n            user_pool = self.cognito.get('user_pool')\n            triggers = self.cognito.get('triggers', [])\n            lambda_configs = set()\n            for trigger in triggers:\n                lambda_configs.add(trigger['source'].split('_')[0])\n            self.zappa.update_cognito(self.lambda_name, user_pool, lambda_configs, self.lambda_arn)\n\n    def schedule(self):\n        \"\"\"\n        Given a a list of functions and a schedule to execute them,\n        setup up regular execution.\n\n        \"\"\"\n        events = self.stage_config.get('events', [])\n\n        if events:\n            if not isinstance(events, list): # pragma: no cover\n                print(\"Events must be supplied as a list.\")\n                return\n\n        for event in events:\n            self.collision_warning(event.get('function'))\n\n        if self.stage_config.get('keep_warm', True):\n            if not events:\n                events = []\n\n            keep_warm_rate = self.stage_config.get('keep_warm_expression', \"rate(4 minutes)\")\n            events.append({'name': 'zappa-keep-warm',\n                           'function': 'handler.keep_warm_callback',\n                           'expression': keep_warm_rate,\n                           'description': 'Zappa Keep Warm - {}'.format(self.lambda_name)})\n\n        if events:\n            try:\n                function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name)\n            except botocore.exceptions.ClientError as e: # pragma: no cover\n                click.echo(click.style(\"Function does not exist\", fg=\"yellow\") + \", please \" +\n                           click.style(\"deploy\", bold=True) + \"first. Ex:\" +\n                           click.style(\"zappa deploy {}.\".format(self.api_stage), bold=True))\n                sys.exit(-1)\n\n            print(\"Scheduling..\")\n            self.zappa.schedule_events(\n                lambda_arn=function_response['Configuration']['FunctionArn'],\n                lambda_name=self.lambda_name,\n                events=events\n            )\n\n        # Add async tasks SNS\n        if self.stage_config.get('async_source', None) == 'sns' \\\n           and self.stage_config.get('async_resources', True):\n            self.lambda_arn = self.zappa.get_lambda_function(\n                function_name=self.lambda_name)\n            topic_arn = self.zappa.create_async_sns_topic(\n                lambda_name=self.lambda_name,\n                lambda_arn=self.lambda_arn\n            )\n            click.echo('SNS Topic created: %s' % topic_arn)\n\n        # Add async tasks DynamoDB\n        table_name = self.stage_config.get('async_response_table', False)\n        read_capacity = self.stage_config.get('async_response_table_read_capacity', 1)\n        write_capacity = self.stage_config.get('async_response_table_write_capacity', 1)\n        if table_name and self.stage_config.get('async_resources', True):\n            created, response_table = self.zappa.create_async_dynamodb_table(\n                table_name, read_capacity, write_capacity)\n            if created:\n                click.echo('DynamoDB table created: %s' % table_name)\n            else:\n                click.echo('DynamoDB table exists: %s' % table_name)\n                provisioned_throughput = response_table['Table']['ProvisionedThroughput']\n                if provisioned_throughput['ReadCapacityUnits'] != read_capacity or \\\n                    provisioned_throughput['WriteCapacityUnits'] != write_capacity:\n                        click.echo(click.style(\n                            \"\\nWarning! Existing DynamoDB table ({}) does not match configured capacity.\\n\".format(table_name),\n                            fg='red'\n                        ))\n\n    def unschedule(self):\n        \"\"\"\n        Given a a list of scheduled functions,\n        tear down their regular execution.\n\n        \"\"\"\n\n        # Run even if events are not defined to remove previously existing ones (thus default to []).\n        events = self.stage_config.get('events', [])\n\n        if not isinstance(events, list): # pragma: no cover\n            print(\"Events must be supplied as a list.\")\n            return\n\n        function_arn = None\n        try:\n            function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name)\n            function_arn = function_response['Configuration']['FunctionArn']\n        except botocore.exceptions.ClientError as e: # pragma: no cover\n            raise ClickException(\"Function does not exist, you should deploy first. Ex: zappa deploy {}. \"\n                  \"Proceeding to unschedule CloudWatch based events.\".format(self.api_stage))\n\n        print(\"Unscheduling..\")\n        self.zappa.unschedule_events(\n            lambda_name=self.lambda_name,\n            lambda_arn=function_arn,\n            events=events,\n            )\n\n        # Remove async task SNS\n        if self.stage_config.get('async_source', None) == 'sns' \\\n           and self.stage_config.get('async_resources', True):\n            removed_arns = self.zappa.remove_async_sns_topic(self.lambda_name)\n            click.echo('SNS Topic removed: %s' % ', '.join(removed_arns))\n\n    def invoke(self, function_name, raw_python=False, command=None, no_color=False):\n        \"\"\"\n        Invoke a remote function.\n        \"\"\"\n\n        # There are three likely scenarios for 'command' here:\n        #   command, which is a modular function path\n        #   raw_command, which is a string of python to execute directly\n        #   manage, which is a Django-specific management command invocation\n        key = command if command is not None else 'command'\n        if raw_python:\n            command = {'raw_command': function_name}\n        else:\n            command = {key: function_name}\n\n        # Can't use hjson\n        import json as json\n\n        response = self.zappa.invoke_lambda_function(\n            self.lambda_name,\n            json.dumps(command),\n            invocation_type='RequestResponse',\n        )\n\n        if 'LogResult' in response:\n            if no_color:\n                print(base64.b64decode(response['LogResult']))\n            else:\n                decoded = base64.b64decode(response['LogResult']).decode()\n                formatted = self.format_invoke_command(decoded)\n                colorized = self.colorize_invoke_command(formatted)\n                print(colorized)\n        else:\n            print(response)\n\n        # For a successful request FunctionError is not in response.\n        # https://github.com/Miserlou/Zappa/pull/1254/\n        if 'FunctionError' in response:\n            raise ClickException(\n                \"{} error occurred while invoking command.\".format(response['FunctionError'])\n)\n\n    def format_invoke_command(self, string):\n        \"\"\"\n        Formats correctly the string output from the invoke() method,\n        replacing line breaks and tabs when necessary.\n        \"\"\"\n\n        string = string.replace('\\\\n', '\\n')\n\n        formated_response = ''\n        for line in string.splitlines():\n            if line.startswith('REPORT'):\n                line = line.replace('\\t', '\\n')\n            if line.startswith('[DEBUG]'):\n                line = line.replace('\\t', ' ')\n            formated_response += line + '\\n'\n        formated_response = formated_response.replace('\\n\\n', '\\n')\n\n        return formated_response\n\n    def colorize_invoke_command(self, string):\n        \"\"\"\n        Apply various heuristics to return a colorized version the invoke\n        command string. If these fail, simply return the string in plaintext.\n\n        Inspired by colorize_log_entry().\n        \"\"\"\n\n        final_string = string\n\n        try:\n\n            # Line headers\n            try:\n                for token in ['START', 'END', 'REPORT', '[DEBUG]']:\n                    if token in final_string:\n                        format_string = '[{}]'\n                        # match whole words only\n                        pattern = r'\\b{}\\b'\n                        if token == '[DEBUG]':\n                            format_string = '{}'\n                            pattern = re.escape(token)\n                        repl = click.style(\n                            format_string.format(token),\n                            bold=True,\n                            fg='cyan'\n                        )\n                        final_string = re.sub(\n                            pattern.format(token), repl, final_string\n                        )\n            except Exception: # pragma: no cover\n                pass\n\n            # Green bold Tokens\n            try:\n                for token in [\n                    'Zappa Event:',\n                    'RequestId:',\n                    'Version:',\n                    'Duration:',\n                    'Billed',\n                    'Memory Size:',\n                    'Max Memory Used:'\n                ]:\n                    if token in final_string:\n                        final_string = final_string.replace(token, click.style(\n                            token,\n                            bold=True,\n                            fg='green'\n                        ))\n            except Exception: # pragma: no cover\n                pass\n\n            # UUIDs\n            for token in final_string.replace('\\t', ' ').split(' '):\n                try:\n                    if token.count('-') == 4 and token.replace('-', '').isalnum():\n                        final_string = final_string.replace(\n                            token,\n                            click.style(token, fg='magenta')\n                        )\n                except Exception: # pragma: no cover\n                    pass\n\n            return final_string\n        except Exception:\n            return string\n\n    def status(self, return_json=False):\n        \"\"\"\n        Describe the status of the current deployment.\n        \"\"\"\n\n        def tabular_print(title, value):\n            \"\"\"\n            Convenience function for priting formatted table items.\n            \"\"\"\n            click.echo('%-*s%s' % (32, click.style(\"\\t\" + title, fg='green') + ':', str(value)))\n            return\n\n        # Lambda Env Details\n        lambda_versions = self.zappa.get_lambda_function_versions(self.lambda_name)\n\n        if not lambda_versions:\n            raise ClickException(click.style(\"No Lambda %s detected in %s - have you deployed yet?\" %\n                                             (self.lambda_name, self.zappa.aws_region), fg='red'))\n\n        status_dict = collections.OrderedDict()\n        status_dict[\"Lambda Versions\"] = len(lambda_versions)\n        function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name)\n        conf = function_response['Configuration']\n        self.lambda_arn = conf['FunctionArn']\n        status_dict[\"Lambda Name\"] = self.lambda_name\n        status_dict[\"Lambda ARN\"] = self.lambda_arn\n        status_dict[\"Lambda Role ARN\"] = conf['Role']\n        status_dict[\"Lambda Handler\"] = conf['Handler']\n        status_dict[\"Lambda Code Size\"] = conf['CodeSize']\n        status_dict[\"Lambda Version\"] = conf['Version']\n        status_dict[\"Lambda Last Modified\"] = conf['LastModified']\n        status_dict[\"Lambda Memory Size\"] = conf['MemorySize']\n        status_dict[\"Lambda Timeout\"] = conf['Timeout']\n        status_dict[\"Lambda Runtime\"] = conf['Runtime']\n        if 'VpcConfig' in conf.keys():\n            status_dict[\"Lambda VPC ID\"] = conf.get('VpcConfig', {}).get('VpcId', 'Not assigned')\n        else:\n            status_dict[\"Lambda VPC ID\"] = None\n\n        # Calculated statistics\n        try:\n            function_invocations = self.zappa.cloudwatch.get_metric_statistics(\n                                       Namespace='AWS/Lambda',\n                                       MetricName='Invocations',\n                                       StartTime=datetime.utcnow()-timedelta(days=1),\n                                       EndTime=datetime.utcnow(),\n                                       Period=1440,\n                                       Statistics=['Sum'],\n                                       Dimensions=[{'Name': 'FunctionName',\n                                                    'Value': '{}'.format(self.lambda_name)}]\n                                       )['Datapoints'][0]['Sum']\n        except Exception as e:\n            function_invocations = 0\n        try:\n            function_errors = self.zappa.cloudwatch.get_metric_statistics(\n                                       Namespace='AWS/Lambda',\n                                       MetricName='Errors',\n                                       StartTime=datetime.utcnow()-timedelta(days=1),\n                                       EndTime=datetime.utcnow(),\n                                       Period=1440,\n                                       Statistics=['Sum'],\n                                       Dimensions=[{'Name': 'FunctionName',\n                                                    'Value': '{}'.format(self.lambda_name)}]\n                                       )['Datapoints'][0]['Sum']\n        except Exception as e:\n            function_errors = 0\n\n        try:\n            error_rate = \"{0:.2f}%\".format(function_errors / function_invocations * 100)\n        except:\n            error_rate = \"Error calculating\"\n        status_dict[\"Invocations (24h)\"] = int(function_invocations)\n        status_dict[\"Errors (24h)\"] = int(function_errors)\n        status_dict[\"Error Rate (24h)\"] = error_rate\n\n        # URLs\n        if self.use_apigateway:\n            api_url = self.zappa.get_api_url(\n                self.lambda_name,\n                self.api_stage)\n\n            status_dict[\"API Gateway URL\"] = api_url\n\n            # Api Keys\n            api_id = self.zappa.get_api_id(self.lambda_name)\n            for api_key in self.zappa.get_api_keys(api_id, self.api_stage):\n                status_dict[\"API Gateway x-api-key\"] = api_key\n\n            # There literally isn't a better way to do this.\n            # AWS provides no way to tie a APIGW domain name to its Lambda function.\n            domain_url = self.stage_config.get('domain', None)\n            base_path = self.stage_config.get('base_path', None)\n            if domain_url:\n                status_dict[\"Domain URL\"] = 'https://' + domain_url\n                if base_path:\n                    status_dict[\"Domain URL\"] += '/' + base_path\n            else:\n                status_dict[\"Domain URL\"] = \"None Supplied\"\n\n        # Scheduled Events\n        event_rules = self.zappa.get_event_rules_for_lambda(lambda_arn=self.lambda_arn)\n        status_dict[\"Num. Event Rules\"] = len(event_rules)\n        if len(event_rules) > 0:\n            status_dict['Events'] = []\n        for rule in event_rules:\n            event_dict = {}\n            rule_name = rule['Name']\n            event_dict[\"Event Rule Name\"] = rule_name\n            event_dict[\"Event Rule Schedule\"] = rule.get('ScheduleExpression', None)\n            event_dict[\"Event Rule State\"] = rule.get('State', None).title()\n            event_dict[\"Event Rule ARN\"] = rule.get('Arn', None)\n            status_dict['Events'].append(event_dict)\n\n        if return_json:\n            # Putting the status in machine readable format\n            # https://github.com/Miserlou/Zappa/issues/407\n            print(json.dumpsJSON(status_dict))\n        else:\n            click.echo(\"Status for \" + click.style(self.lambda_name, bold=True) + \": \")\n            for k, v in status_dict.items():\n                if k == 'Events':\n                    # Events are a list of dicts\n                    for event in v:\n                        for item_k, item_v in event.items():\n                            tabular_print(item_k, item_v)\n                else:\n                    tabular_print(k, v)\n\n        # TODO: S3/SQS/etc. type events?\n\n        return True\n\n    def check_stage_name(self, stage_name):\n        \"\"\"\n        Make sure the stage name matches the AWS-allowed pattern\n\n        (calls to apigateway_client.create_deployment, will fail with error\n        message \"ClientError: An error occurred (BadRequestException) when\n        calling the CreateDeployment operation: Stage name only allows\n        a-zA-Z0-9_\" if the pattern does not match)\n        \"\"\"\n        if self.stage_name_env_pattern.match(stage_name):\n            return True\n        raise ValueError(\"AWS requires stage name to match a-zA-Z0-9_\")\n\n    def check_environment(self, environment):\n        \"\"\"\n        Make sure the environment contains only strings\n\n        (since putenv needs a string)\n        \"\"\"\n\n        non_strings = []\n        for (k,v) in environment.items():\n            if not isinstance(v, basestring):\n                non_strings.append(k)\n        if non_strings:\n            raise ValueError(\"The following environment variables are not strings: {}\".format(\", \".join(non_strings)))\n        else:\n            return True\n\n    def init(self, settings_file=\"zappa_settings.json\"):\n        \"\"\"\n        Initialize a new Zappa project by creating a new zappa_settings.json in a guided process.\n\n        This should probably be broken up into few separate componants once it's stable.\n        Testing these inputs requires monkeypatching with mock, which isn't pretty.\n\n        \"\"\"\n\n        # Make sure we're in a venv.\n        self.check_venv()\n\n        # Ensure that we don't already have a zappa_settings file.\n        if os.path.isfile(settings_file):\n            raise ClickException(\"This project already has a \" + click.style(\"{0!s} file\".format(settings_file), fg=\"red\", bold=True) + \"!\")\n\n        # Explain system.\n        click.echo(click.style(\"\"\"\\n███████╗ █████╗ ██████╗ ██████╗  █████╗\n╚══███╔╝██╔══██╗██╔══██╗██╔══██╗██╔══██╗\n  ███╔╝ ███████║██████╔╝██████╔╝███████║\n ███╔╝  ██╔══██║██╔═══╝ ██╔═══╝ ██╔══██║\n███████╗██║  ██║██║     ██║     ██║  ██║\n╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝     ╚═╝  ╚═╝\\n\"\"\", fg='green', bold=True))\n\n        click.echo(click.style(\"Welcome to \", bold=True) + click.style(\"Zappa\", fg='green', bold=True) + click.style(\"!\\n\", bold=True))\n        click.echo(click.style(\"Zappa\", bold=True) + \" is a system for running server-less Python web applications\"\n                                                     \" on AWS Lambda and AWS API Gateway.\")\n        click.echo(\"This `init` command will help you create and configure your new Zappa deployment.\")\n        click.echo(\"Let's get started!\\n\")\n\n        # Create Env\n        while True:\n            click.echo(\"Your Zappa configuration can support multiple production stages, like '\" +\n                       click.style(\"dev\", bold=True)  + \"', '\" + click.style(\"staging\", bold=True)  + \"', and '\" +\n                       click.style(\"production\", bold=True)  + \"'.\")\n            env = input(\"What do you want to call this environment (default 'dev'): \") or \"dev\"\n            try:\n                self.check_stage_name(env)\n                break\n            except ValueError:\n                click.echo(click.style(\"Stage names must match a-zA-Z0-9_\", fg=\"red\"))\n\n        # Detect AWS profiles and regions\n        # If anyone knows a more straightforward way to easily detect and parse AWS profiles I'm happy to change this, feels like a hack\n        session = botocore.session.Session()\n        config  = session.full_config\n        profiles = config.get(\"profiles\", {})\n        profile_names = list(profiles.keys())\n\n        click.echo(\"\\nAWS Lambda and API Gateway are only available in certain regions. \"\\\n                   \"Let's check to make sure you have a profile set up in one that will work.\")\n\n        if not profile_names:\n            profile_name, profile = None, None\n            click.echo(\"We couldn't find an AWS profile to use. Before using Zappa, you'll need to set one up. See here for more info: {}\"\n                       .format(click.style(BOTO3_CONFIG_DOCS_URL, fg=\"blue\", underline=True)))\n        elif len(profile_names) == 1:\n            profile_name = profile_names[0]\n            profile = profiles[profile_name]\n            click.echo(\"Okay, using profile {}!\".format(click.style(profile_name, bold=True)))\n        else:\n            if \"default\" in profile_names:\n                default_profile = [p for p in profile_names if p == \"default\"][0]\n            else:\n                default_profile = profile_names[0]\n\n            while True:\n                profile_name = input(\"We found the following profiles: {}, and {}. \"\\\n                                         \"Which would you like us to use? (default '{}'): \"\n                                         .format(\n                                             ', '.join(profile_names[:-1]),\n                                             profile_names[-1],\n                                             default_profile\n                                         )) or default_profile\n                if profile_name in profiles:\n                    profile = profiles[profile_name]\n                    break\n                else:\n                    click.echo(\"Please enter a valid name for your AWS profile.\")\n\n        profile_region = profile.get(\"region\") if profile else None\n\n        # Create Bucket\n        click.echo(\"\\nYour Zappa deployments will need to be uploaded to a \" + click.style(\"private S3 bucket\", bold=True)  + \".\")\n        click.echo(\"If you don't have a bucket yet, we'll create one for you too.\")\n        default_bucket = \"zappa-\" + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(9))\n        while True:\n            bucket = input(\"What do you want to call your bucket? (default '%s'): \" % default_bucket) or default_bucket\n\n            if is_valid_bucket_name(bucket):\n                break\n\n            click.echo(click.style(\"Invalid bucket name!\", bold=True))\n            click.echo(\"S3 buckets must be named according to the following rules:\")\n            click.echo(\"\"\"* Bucket names must be unique across all existing bucket names in Amazon S3.\n* Bucket names must comply with DNS naming conventions.\n* Bucket names must be at least 3 and no more than 63 characters long.\n* Bucket names must not contain uppercase characters or underscores.\n* Bucket names must start with a lowercase letter or number.\n* Bucket names must be a series of one or more labels. Adjacent labels are separated\n  by a single period (.). Bucket names can contain lowercase letters, numbers, and\n  hyphens. Each label must start and end with a lowercase letter or a number.\n* Bucket names must not be formatted as an IP address (for example, 192.168.5.4).\n* When you use virtual hosted–style buckets with Secure Sockets Layer (SSL), the SSL\n  wildcard certificate only matches buckets that don't contain periods. To work around\n  this, use HTTP or write your own certificate verification logic. We recommend that\n  you do not use periods (\".\") in bucket names when using virtual hosted–style buckets.\n\"\"\")\n\n\n        # Detect Django/Flask\n        try: # pragma: no cover\n            import django\n            has_django = True\n        except ImportError as e:\n            has_django = False\n\n        try: # pragma: no cover\n            import flask\n            has_flask = True\n        except ImportError as e:\n            has_flask = False\n\n        print('')\n        # App-specific\n        if has_django: # pragma: no cover\n            click.echo(\"It looks like this is a \" + click.style(\"Django\", bold=True)  + \" application!\")\n            click.echo(\"What is the \" + click.style(\"module path\", bold=True)  + \" to your projects's Django settings?\")\n            django_settings = None\n\n            matches = detect_django_settings()\n            while django_settings in [None, '']:\n                if matches:\n                    click.echo(\"We discovered: \" + click.style(', '.join('{}'.format(i) for v, i in enumerate(matches)), bold=True))\n                    django_settings = input(\"Where are your project's settings? (default '%s'): \" % matches[0]) or matches[0]\n                else:\n                    click.echo(\"(This will likely be something like 'your_project.settings')\")\n                    django_settings = input(\"Where are your project's settings?: \")\n            django_settings = django_settings.replace(\"'\", \"\")\n            django_settings = django_settings.replace('\"', \"\")\n        else:\n            matches = None\n            if has_flask:\n                click.echo(\"It looks like this is a \" + click.style(\"Flask\", bold=True)  + \" application.\")\n                matches = detect_flask_apps()\n            click.echo(\"What's the \" + click.style(\"modular path\", bold=True)  + \" to your app's function?\")\n            click.echo(\"This will likely be something like 'your_module.app'.\")\n            app_function = None\n            while app_function in [None, '']:\n                if matches:\n                    click.echo(\"We discovered: \" + click.style(', '.join('{}'.format(i) for v, i in enumerate(matches)), bold=True))\n                    app_function = input(\"Where is your app's function? (default '%s'): \" % matches[0]) or matches[0]\n                else:\n                    app_function = input(\"Where is your app's function?: \")\n            app_function = app_function.replace(\"'\", \"\")\n            app_function = app_function.replace('\"', \"\")\n\n        # TODO: Create VPC?\n        # Memory size? Time limit?\n        # Domain? LE keys? Region?\n        # 'Advanced Settings' mode?\n\n        # Globalize\n        click.echo(\"\\nYou can optionally deploy to \" + click.style(\"all available regions\", bold=True)  + \" in order to provide fast global service.\")\n        click.echo(\"If you are using Zappa for the first time, you probably don't want to do this!\")\n        global_deployment = False\n        while True:\n            global_type = input(\"Would you like to deploy this application \" + click.style(\"globally\", bold=True)  + \"? (default 'n') [y/n/(p)rimary]: \")\n            if not global_type:\n                break\n            if global_type.lower() in [\"y\", \"yes\", \"p\", \"primary\"]:\n                global_deployment = True\n                break\n            if global_type.lower() in [\"n\", \"no\"]:\n                global_deployment = False\n                break\n\n        # The given environment name\n        zappa_settings = {\n            env: {\n                'profile_name': profile_name,\n                's3_bucket': bucket,\n                'runtime': get_venv_from_python_version(),\n                'project_name': self.get_project_name()\n            }\n        }\n\n        if profile_region:\n            zappa_settings[env]['aws_region'] = profile_region\n\n        if has_django:\n            zappa_settings[env]['django_settings'] = django_settings\n        else:\n            zappa_settings[env]['app_function'] = app_function\n\n        # Global Region Deployment\n        if global_deployment:\n            additional_regions = [r for r in API_GATEWAY_REGIONS if r != profile_region]\n            # Create additional stages\n            if global_type.lower() in [\"p\", \"primary\"]:\n                additional_regions = [r for r in additional_regions if '-1' in r]\n\n            for region in additional_regions:\n                env_name = env + '_' + region.replace('-', '_')\n                g_env = {\n                    env_name: {\n                        'extends': env,\n                        'aws_region': region\n                    }\n                }\n                zappa_settings.update(g_env)\n\n        import json as json # hjson is fine for loading, not fine for writing.\n        zappa_settings_json = json.dumps(zappa_settings, sort_keys=True, indent=4)\n\n        click.echo(\"\\nOkay, here's your \" + click.style(\"zappa_settings.json\", bold=True) + \":\\n\")\n        click.echo(click.style(zappa_settings_json, fg=\"yellow\", bold=False))\n\n        confirm = input(\"\\nDoes this look \" + click.style(\"okay\", bold=True, fg=\"green\")  + \"? (default 'y') [y/n]: \") or 'yes'\n        if confirm[0] not in ['y', 'Y', 'yes', 'YES']:\n            click.echo(\"\" + click.style(\"Sorry\", bold=True, fg='red') + \" to hear that! Please init again.\")\n            return\n\n        # Write\n        with open(\"zappa_settings.json\", \"w\") as zappa_settings_file:\n            zappa_settings_file.write(zappa_settings_json)\n\n        if global_deployment:\n            click.echo(\"\\n\" + click.style(\"Done\", bold=True) + \"! You can also \" + click.style(\"deploy all\", bold=True)  + \" by executing:\\n\")\n            click.echo(click.style(\"\\t$ zappa deploy --all\", bold=True))\n\n            click.echo(\"\\nAfter that, you can \" + click.style(\"update\", bold=True) + \" your application code with:\\n\")\n            click.echo(click.style(\"\\t$ zappa update --all\", bold=True))\n        else:\n            click.echo(\"\\n\" + click.style(\"Done\", bold=True) + \"! Now you can \" + click.style(\"deploy\", bold=True)  + \" your Zappa application by executing:\\n\")\n            click.echo(click.style(\"\\t$ zappa deploy %s\" % env, bold=True))\n\n            click.echo(\"\\nAfter that, you can \" + click.style(\"update\", bold=True) + \" your application code with:\\n\")\n            click.echo(click.style(\"\\t$ zappa update %s\" % env, bold=True))\n\n        click.echo(\"\\nTo learn more, check out our project page on \" + click.style(\"GitHub\", bold=True) +\n                   \" here: \" + click.style(\"https://github.com/Miserlou/Zappa\", fg=\"cyan\", bold=True))\n        click.echo(\"and stop by our \" + click.style(\"Slack\", bold=True) + \" channel here: \" +\n                   click.style(\"https://zappateam.slack.com\", fg=\"cyan\", bold=True))\n        click.echo(\"\\nEnjoy!,\")\n        click.echo(\" ~ Team \" + click.style(\"Zappa\", bold=True) + \"!\")\n\n        return\n\n    def certify(self, no_confirm=True, manual=False):\n        \"\"\"\n        Register or update a domain certificate for this env.\n        \"\"\"\n\n        if not self.domain:\n            raise ClickException(\"Can't certify a domain without \" + click.style(\"domain\", fg=\"red\", bold=True) + \" configured!\")\n\n        if not no_confirm: # pragma: no cover\n            confirm = input(\"Are you sure you want to certify? [y/n] \")\n            if confirm != 'y':\n                return\n\n        # Make sure this isn't already deployed.\n        deployed_versions = self.zappa.get_lambda_function_versions(self.lambda_name)\n        if len(deployed_versions) == 0:\n            raise ClickException(\"This application \" + click.style(\"isn't deployed yet\", fg=\"red\") +\n                                 \" - did you mean to call \" + click.style(\"deploy\", bold=True) + \"?\")\n\n\n        account_key_location = self.stage_config.get('lets_encrypt_key', None)\n        cert_location = self.stage_config.get('certificate', None)\n        cert_key_location = self.stage_config.get('certificate_key', None)\n        cert_chain_location = self.stage_config.get('certificate_chain', None)\n        cert_arn = self.stage_config.get('certificate_arn', None)\n        base_path = self.stage_config.get('base_path', None)\n\n        # These are sensitive\n        certificate_body = None\n        certificate_private_key = None\n        certificate_chain = None\n\n        # Prepare for custom Let's Encrypt\n        if not cert_location and not cert_arn:\n            if not account_key_location:\n                raise ClickException(\"Can't certify a domain without \" + click.style(\"lets_encrypt_key\", fg=\"red\", bold=True) +\n                                     \" or \" + click.style(\"certificate\", fg=\"red\", bold=True)+\n                                     \" or \" + click.style(\"certificate_arn\", fg=\"red\", bold=True) + \" configured!\")\n\n            # Get install account_key to /tmp/account_key.pem\n            from .letsencrypt import gettempdir\n            if account_key_location.startswith('s3://'):\n                bucket, key_name = parse_s3_url(account_key_location)\n                self.zappa.s3_client.download_file(bucket, key_name, os.path.join(gettempdir(), 'account.key'))\n            else:\n                from shutil import copyfile\n                copyfile(account_key_location, os.path.join(gettempdir(), 'account.key'))\n\n        # Prepare for Custom SSL\n        elif not account_key_location and not cert_arn:\n            if not cert_location or not cert_key_location or not cert_chain_location:\n                raise ClickException(\"Can't certify a domain without \" +\n                                     click.style(\"certificate, certificate_key and certificate_chain\", fg=\"red\", bold=True) + \" configured!\")\n\n            # Read the supplied certificates.\n            with open(cert_location) as f:\n                certificate_body = f.read()\n\n            with open(cert_key_location) as f:\n                certificate_private_key = f.read()\n\n            with open(cert_chain_location) as f:\n                certificate_chain = f.read()\n\n\n        click.echo(\"Certifying domain \" + click.style(self.domain, fg=\"green\", bold=True) + \"..\")\n\n        # Get cert and update domain.\n\n        # Let's Encrypt\n        if not cert_location and not cert_arn:\n            from .letsencrypt import get_cert_and_update_domain\n            cert_success = get_cert_and_update_domain(\n                    self.zappa,\n                    self.lambda_name,\n                    self.api_stage,\n                    self.domain,\n                    manual\n                )\n\n        # Custom SSL / ACM\n        else:\n            route53 = self.stage_config.get('route53_enabled', True)\n            if not self.zappa.get_domain_name(self.domain, route53=route53):\n                dns_name = self.zappa.create_domain_name(\n                    domain_name=self.domain,\n                    certificate_name=self.domain + \"-Zappa-Cert\",\n                    certificate_body=certificate_body,\n                    certificate_private_key=certificate_private_key,\n                    certificate_chain=certificate_chain,\n                    certificate_arn=cert_arn,\n                    lambda_name=self.lambda_name,\n                    stage=self.api_stage,\n                    base_path=base_path\n                )\n                if route53:\n                    self.zappa.update_route53_records(self.domain, dns_name)\n                print(\"Created a new domain name with supplied certificate. Please note that it can take up to 40 minutes for this domain to be \"\n                      \"created and propagated through AWS, but it requires no further work on your part.\")\n            else:\n                self.zappa.update_domain_name(\n                    domain_name=self.domain,\n                    certificate_name=self.domain + \"-Zappa-Cert\",\n                    certificate_body=certificate_body,\n                    certificate_private_key=certificate_private_key,\n                    certificate_chain=certificate_chain,\n                    certificate_arn=cert_arn,\n                    lambda_name=self.lambda_name,\n                    stage=self.api_stage,\n                    route53=route53,\n                    base_path=base_path\n                )\n\n            cert_success = True\n\n        if cert_success:\n            click.echo(\"Certificate \" + click.style(\"updated\", fg=\"green\", bold=True) + \"!\")\n        else:\n            click.echo(click.style(\"Failed\", fg=\"red\", bold=True) + \" to generate or install certificate! :(\")\n            click.echo(\"\\n==============\\n\")\n            shamelessly_promote()\n\n    ##\n    # Shell\n    ##\n    def shell(self):\n        \"\"\"\n        Spawn a debug shell.\n        \"\"\"\n        click.echo(click.style(\"NOTICE!\", fg=\"yellow\", bold=True) + \" This is a \" + click.style(\"local\", fg=\"green\", bold=True) + \" shell, inside a \" + click.style(\"Zappa\", bold=True) + \" object!\")\n        self.zappa.shell()\n        return\n\n    ##\n    # Utility\n    ##\n\n    def callback(self, position):\n        \"\"\"\n        Allows the execution of custom code between creation of the zip file and deployment to AWS.\n\n        :return: None\n        \"\"\"\n\n        callbacks = self.stage_config.get('callbacks', {})\n        callback = callbacks.get(position)\n\n        if callback:\n            (mod_path, cb_func_name) = callback.rsplit('.', 1)\n\n            try:  # Prefer callback in working directory\n                if mod_path.count('.') >= 1:  # Callback function is nested in a folder\n                    (mod_folder_path, mod_name) = mod_path.rsplit('.', 1)\n                    mod_folder_path_fragments = mod_folder_path.split('.')\n                    working_dir = os.path.join(os.getcwd(), *mod_folder_path_fragments)\n                else:\n                    mod_name = mod_path\n                    working_dir = os.getcwd()\n\n                working_dir_importer = pkgutil.get_importer(working_dir)\n                module_ = working_dir_importer.find_module(mod_name).load_module(mod_name)\n\n            except (ImportError, AttributeError):\n\n                try: # Callback func might be in virtualenv\n                    module_ = importlib.import_module(mod_path)\n                except ImportError: # pragma: no cover\n                    raise ClickException(click.style(\"Failed \", fg=\"red\") + 'to ' + click.style(\n                        \"import {position} callback \".format(position=position),\n                        bold=True) + 'module: \"{mod_path}\"'.format(mod_path=click.style(mod_path, bold=True)))\n\n            if not hasattr(module_, cb_func_name): # pragma: no cover\n                raise ClickException(click.style(\"Failed \", fg=\"red\") + 'to ' + click.style(\n                    \"find {position} callback \".format(position=position), bold=True) + 'function: \"{cb_func_name}\" '.format(\n                    cb_func_name=click.style(cb_func_name, bold=True)) + 'in module \"{mod_path}\"'.format(mod_path=mod_path))\n\n\n            cb_func = getattr(module_, cb_func_name)\n            cb_func(self) # Call the function passing self\n\n    def check_for_update(self):\n        \"\"\"\n        Print a warning if there's a new Zappa version available.\n        \"\"\"\n        try:\n            version = pkg_resources.require(\"zappa\")[0].version\n            updateable = check_new_version_available(version)\n            if updateable:\n                click.echo(click.style(\"Important!\", fg=\"yellow\", bold=True) +\n                           \" A new version of \" + click.style(\"Zappa\", bold=True) + \" is available!\")\n                click.echo(\"Upgrade with: \" + click.style(\"pip install zappa --upgrade\", bold=True))\n                click.echo(\"Visit the project page on GitHub to see the latest changes: \" +\n                           click.style(\"https://github.com/Miserlou/Zappa\", bold=True))\n        except Exception as e: # pragma: no cover\n            print(e)\n            return\n\n    def load_settings(self, settings_file=None, session=None):\n        \"\"\"\n        Load the local zappa_settings file.\n\n        An existing boto session can be supplied, though this is likely for testing purposes.\n\n        Returns the loaded Zappa object.\n        \"\"\"\n\n        # Ensure we're passed a valid settings file.\n        if not settings_file:\n            settings_file = self.get_json_or_yaml_settings()\n        if not os.path.isfile(settings_file):\n            raise ClickException(\"Please configure your zappa_settings file.\")\n\n        # Load up file\n        self.load_settings_file(settings_file)\n\n        # Make sure that the stages are valid names:\n        for stage_name in self.zappa_settings.keys():\n            try:\n                self.check_stage_name(stage_name)\n            except ValueError:\n                raise ValueError(\"API stage names must match a-zA-Z0-9_ ; '{0!s}' does not.\".format(stage_name))\n\n        # Make sure that this stage is our settings\n        if self.api_stage not in self.zappa_settings.keys():\n            raise ClickException(\"Please define stage '{0!s}' in your Zappa settings.\".format(self.api_stage))\n\n        # We need a working title for this project. Use one if supplied, else cwd dirname.\n        if 'project_name' in self.stage_config: # pragma: no cover\n            # If the name is invalid, this will throw an exception with message up stack\n            self.project_name = validate_name(self.stage_config['project_name'])\n        else:\n            self.project_name = self.get_project_name()\n\n        # The name of the actual AWS Lambda function, ex, 'helloworld-dev'\n        # Assume that we already have have validated the name beforehand.\n        # Related:  https://github.com/Miserlou/Zappa/pull/664\n        #           https://github.com/Miserlou/Zappa/issues/678\n        #           And various others from Slack.\n        self.lambda_name = slugify.slugify(self.project_name + '-' + self.api_stage)\n\n        # Load stage-specific settings\n        self.s3_bucket_name = self.stage_config.get('s3_bucket', \"zappa-\" + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(9)))\n        self.vpc_config = self.stage_config.get('vpc_config', {})\n        self.memory_size = self.stage_config.get('memory_size', 512)\n        self.app_function = self.stage_config.get('app_function', None)\n        self.exception_handler = self.stage_config.get('exception_handler', None)\n        self.aws_region = self.stage_config.get('aws_region', None)\n        self.debug = self.stage_config.get('debug', True)\n        self.prebuild_script = self.stage_config.get('prebuild_script', None)\n        self.profile_name = self.stage_config.get('profile_name', None)\n        self.log_level = self.stage_config.get('log_level', \"DEBUG\")\n        self.domain = self.stage_config.get('domain', None)\n        self.base_path = self.stage_config.get('base_path', None)\n        self.timeout_seconds = self.stage_config.get('timeout_seconds', 30)\n        dead_letter_arn = self.stage_config.get('dead_letter_arn', '')\n        self.dead_letter_config = {'TargetArn': dead_letter_arn} if dead_letter_arn else {}\n        self.cognito = self.stage_config.get('cognito', None)\n        self.num_retained_versions = self.stage_config.get('num_retained_versions',None)\n\n        # Check for valid values of num_retained_versions\n        if self.num_retained_versions is not None and type(self.num_retained_versions) is not int:\n            raise ClickException(\"Please supply either an integer or null for num_retained_versions in the zappa_settings.json. Found %s\" % type(self.num_retained_versions))\n        elif type(self.num_retained_versions) is int and self.num_retained_versions<1:\n            raise ClickException(\"The value for num_retained_versions in the zappa_settings.json should be greater than 0.\")\n\n        # Provide legacy support for `use_apigateway`, now `apigateway_enabled`.\n        # https://github.com/Miserlou/Zappa/issues/490\n        # https://github.com/Miserlou/Zappa/issues/493\n        self.use_apigateway = self.stage_config.get('use_apigateway', True)\n        if self.use_apigateway:\n            self.use_apigateway = self.stage_config.get('apigateway_enabled', True)\n        self.apigateway_description = self.stage_config.get('apigateway_description', None)\n\n        self.lambda_handler = self.stage_config.get('lambda_handler', 'handler.lambda_handler')\n        # DEPRECATED. https://github.com/Miserlou/Zappa/issues/456\n        self.remote_env_bucket = self.stage_config.get('remote_env_bucket', None)\n        self.remote_env_file = self.stage_config.get('remote_env_file', None)\n        self.remote_env = self.stage_config.get('remote_env', None)\n        self.settings_file = self.stage_config.get('settings_file', None)\n        self.django_settings = self.stage_config.get('django_settings', None)\n        self.manage_roles = self.stage_config.get('manage_roles', True)\n        self.binary_support = self.stage_config.get('binary_support', True)\n        self.api_key_required = self.stage_config.get('api_key_required', False)\n        self.api_key = self.stage_config.get('api_key')\n        self.endpoint_configuration = self.stage_config.get('endpoint_configuration', None)\n        self.iam_authorization = self.stage_config.get('iam_authorization', False)\n        self.cors = self.stage_config.get(\"cors\", False)\n        self.lambda_description = self.stage_config.get('lambda_description', \"Zappa Deployment\")\n        self.lambda_concurrency = self.stage_config.get('lambda_concurrency', None)\n        self.environment_variables = self.stage_config.get('environment_variables', {})\n        self.aws_environment_variables = self.stage_config.get('aws_environment_variables', {})\n        self.check_environment(self.environment_variables)\n        self.authorizer = self.stage_config.get('authorizer', {})\n        self.runtime = self.stage_config.get('runtime', get_runtime_from_python_version())\n        self.aws_kms_key_arn = self.stage_config.get('aws_kms_key_arn', '')\n        self.context_header_mappings = self.stage_config.get('context_header_mappings', {})\n        self.xray_tracing = self.stage_config.get('xray_tracing', False)\n        self.desired_role_arn = self.stage_config.get('role_arn')\n        self.layers = self.stage_config.get('layers', None)\n\n        # Load ALB-related settings\n        self.use_alb = self.stage_config.get('alb_enabled', False)\n        self.alb_vpc_config = self.stage_config.get('alb_vpc_config', {})\n\n        # Additional tags\n        self.tags = self.stage_config.get('tags', {})\n\n        desired_role_name = self.lambda_name + \"-ZappaLambdaExecutionRole\"\n        self.zappa = Zappa( boto_session=session,\n                            profile_name=self.profile_name,\n                            aws_region=self.aws_region,\n                            load_credentials=self.load_credentials,\n                            desired_role_name=desired_role_name,\n                            desired_role_arn=self.desired_role_arn,\n                            runtime=self.runtime,\n                            tags=self.tags,\n                            endpoint_urls=self.stage_config.get('aws_endpoint_urls',{}),\n                            xray_tracing=self.xray_tracing\n                        )\n\n        for setting in CUSTOM_SETTINGS:\n            if setting in self.stage_config:\n                setting_val = self.stage_config[setting]\n                # Read the policy file contents.\n                if setting.endswith('policy'):\n                    with open(setting_val, 'r') as f:\n                        setting_val = f.read()\n                setattr(self.zappa, setting, setting_val)\n\n        if self.app_function:\n            self.collision_warning(self.app_function)\n            if self.app_function[-3:] == '.py':\n                click.echo(click.style(\"Warning!\", fg=\"red\", bold=True) +\n                           \" Your app_function is pointing to a \" + click.style(\"file and not a function\", bold=True) +\n                           \"! It should probably be something like 'my_file.app', not 'my_file.py'!\")\n\n        return self.zappa\n\n    def get_json_or_yaml_settings(self, settings_name=\"zappa_settings\"):\n        \"\"\"\n        Return zappa_settings path as JSON or YAML (or TOML), as appropriate.\n        \"\"\"\n        zs_json = settings_name + \".json\"\n        zs_yml = settings_name + \".yml\"\n        zs_yaml = settings_name + \".yaml\"\n        zs_toml = settings_name + \".toml\"\n\n        # Must have at least one\n        if not os.path.isfile(zs_json) \\\n            and not os.path.isfile(zs_yml) \\\n            and not os.path.isfile(zs_yaml) \\\n            and not os.path.isfile(zs_toml):\n            raise ClickException(\"Please configure a zappa_settings file or call `zappa init`.\")\n\n        # Prefer JSON\n        if os.path.isfile(zs_json):\n            settings_file = zs_json\n        elif os.path.isfile(zs_toml):\n            settings_file = zs_toml\n        elif os.path.isfile(zs_yml):\n            settings_file = zs_yml\n        else:\n            settings_file = zs_yaml\n\n        return settings_file\n\n    def load_settings_file(self, settings_file=None):\n        \"\"\"\n        Load our settings file.\n        \"\"\"\n\n        if not settings_file:\n            settings_file = self.get_json_or_yaml_settings()\n        if not os.path.isfile(settings_file):\n            raise ClickException(\"Please configure your zappa_settings file or call `zappa init`.\")\n\n        path, ext = os.path.splitext(settings_file)\n        if ext == '.yml' or ext == '.yaml':\n            with open(settings_file) as yaml_file:\n                try:\n                    self.zappa_settings = yaml.safe_load(yaml_file)\n                except ValueError: # pragma: no cover\n                    raise ValueError(\"Unable to load the Zappa settings YAML. It may be malformed.\")\n        elif ext == '.toml':\n            with open(settings_file) as toml_file:\n                try:\n                    self.zappa_settings = toml.load(toml_file)\n                except ValueError: # pragma: no cover\n                    raise ValueError(\"Unable to load the Zappa settings TOML. It may be malformed.\")\n        else:\n            with open(settings_file) as json_file:\n                try:\n                    self.zappa_settings = json.load(json_file)\n                except ValueError: # pragma: no cover\n                    raise ValueError(\"Unable to load the Zappa settings JSON. It may be malformed.\")\n\n    def create_package(self, output=None):\n        \"\"\"\n        Ensure that the package can be properly configured,\n        and then create it.\n\n        \"\"\"\n\n        # Create the Lambda zip package (includes project and virtualenvironment)\n        # Also define the path the handler file so it can be copied to the zip\n        # root for Lambda.\n        current_file = os.path.dirname(os.path.abspath(\n            inspect.getfile(inspect.currentframe())))\n        handler_file = os.sep.join(current_file.split(os.sep)[0:]) + os.sep + 'handler.py'\n\n        # Create the zip file(s)\n        if self.stage_config.get('slim_handler', False):\n            # Create two zips. One with the application and the other with just the handler.\n            # https://github.com/Miserlou/Zappa/issues/510\n            self.zip_path = self.zappa.create_lambda_zip(\n                prefix=self.lambda_name,\n                use_precompiled_packages=self.stage_config.get('use_precompiled_packages', True),\n                exclude=self.stage_config.get('exclude', []),\n                exclude_glob=self.stage_config.get('exclude_glob', []),\n                disable_progress=self.disable_progress,\n                archive_format='tarball'\n            )\n\n            # Make sure the normal venv is not included in the handler's zip\n            exclude = self.stage_config.get('exclude', [])\n            cur_venv = self.zappa.get_current_venv()\n            exclude.append(cur_venv.split('/')[-1])\n            self.handler_path = self.zappa.create_lambda_zip(\n                prefix='handler_{0!s}'.format(self.lambda_name),\n                venv=self.zappa.create_handler_venv(),\n                handler_file=handler_file,\n                slim_handler=True,\n                exclude=exclude,\n                exclude_glob=self.stage_config.get('exclude_glob', []),\n                output=output,\n                disable_progress=self.disable_progress\n            )\n        else:\n            # This could be python3.6 optimized.\n            exclude = self.stage_config.get(\n                    'exclude', [\n                                    \"boto3\",\n                                    \"dateutil\",\n                                    \"botocore\",\n                                    \"s3transfer\",\n                                    \"concurrent\"\n                                ])\n\n            # Create a single zip that has the handler and application\n            self.zip_path = self.zappa.create_lambda_zip(\n                prefix=self.lambda_name,\n                handler_file=handler_file,\n                use_precompiled_packages=self.stage_config.get('use_precompiled_packages', True),\n                exclude=exclude,\n                exclude_glob=self.stage_config.get('exclude_glob', []),\n                output=output,\n                disable_progress=self.disable_progress\n            )\n\n            # Warn if this is too large for Lambda.\n            file_stats = os.stat(self.zip_path)\n            if file_stats.st_size > 52428800:  # pragma: no cover\n                print('\\n\\nWarning: Application zip package is likely to be too large for AWS Lambda. '\n                      'Try setting \"slim_handler\" to true in your Zappa settings file.\\n\\n')\n\n        # Throw custom settings into the zip that handles requests\n        if self.stage_config.get('slim_handler', False):\n            handler_zip = self.handler_path\n        else:\n            handler_zip = self.zip_path\n\n        with zipfile.ZipFile(handler_zip, 'a') as lambda_zip:\n\n            settings_s = \"# Generated by Zappa\\n\"\n\n            if self.app_function:\n                if '.' not in self.app_function: # pragma: no cover\n                    raise ClickException(\"Your \" + click.style(\"app_function\", fg='red', bold=True) + \" value is not a modular path.\" +\n                        \" It needs to be in the format `\" + click.style(\"your_module.your_app_object\", bold=True) + \"`.\")\n                app_module, app_function = self.app_function.rsplit('.', 1)\n                settings_s = settings_s + \"APP_MODULE='{0!s}'\\nAPP_FUNCTION='{1!s}'\\n\".format(app_module, app_function)\n\n            if self.exception_handler:\n                settings_s += \"EXCEPTION_HANDLER='{0!s}'\\n\".format(self.exception_handler)\n            else:\n                settings_s += \"EXCEPTION_HANDLER=None\\n\"\n\n            if self.debug:\n                settings_s = settings_s + \"DEBUG=True\\n\"\n            else:\n                settings_s = settings_s + \"DEBUG=False\\n\"\n\n            settings_s = settings_s + \"LOG_LEVEL='{0!s}'\\n\".format((self.log_level))\n\n            if self.binary_support:\n                settings_s = settings_s + \"BINARY_SUPPORT=True\\n\"\n            else:\n                settings_s = settings_s + \"BINARY_SUPPORT=False\\n\"\n\n            head_map_dict = {}\n            head_map_dict.update(dict(self.context_header_mappings))\n            settings_s = settings_s + \"CONTEXT_HEADER_MAPPINGS={0}\\n\".format(\n                head_map_dict\n            )\n\n            # If we're on a domain, we don't need to define the /<<env>> in\n            # the WSGI PATH\n            if self.domain:\n                settings_s = settings_s + \"DOMAIN='{0!s}'\\n\".format((self.domain))\n            else:\n                settings_s = settings_s + \"DOMAIN=None\\n\"\n\n            if self.base_path:\n                settings_s = settings_s + \"BASE_PATH='{0!s}'\\n\".format((self.base_path))\n            else:\n                settings_s = settings_s + \"BASE_PATH=None\\n\"\n\n            # Pass through remote config bucket and path\n            if self.remote_env:\n                settings_s = settings_s + \"REMOTE_ENV='{0!s}'\\n\".format(\n                    self.remote_env\n                )\n            # DEPRECATED. use remove_env instead\n            elif self.remote_env_bucket and self.remote_env_file:\n                settings_s = settings_s + \"REMOTE_ENV='s3://{0!s}/{1!s}'\\n\".format(\n                    self.remote_env_bucket, self.remote_env_file\n                )\n\n            # Local envs\n            env_dict = {}\n            if self.aws_region:\n                env_dict['AWS_REGION'] = self.aws_region\n            env_dict.update(dict(self.environment_variables))\n\n            # Environment variable keys must be ascii\n            # https://github.com/Miserlou/Zappa/issues/604\n            # https://github.com/Miserlou/Zappa/issues/998\n            try:\n                env_dict = dict((k.encode('ascii').decode('ascii'), v) for (k, v) in env_dict.items())\n            except Exception:\n                raise ValueError(\"Environment variable keys must be ascii.\")\n\n            settings_s = settings_s + \"ENVIRONMENT_VARIABLES={0}\\n\".format(\n                    env_dict\n                )\n\n            # We can be environment-aware\n            settings_s = settings_s + \"API_STAGE='{0!s}'\\n\".format((self.api_stage))\n            settings_s = settings_s + \"PROJECT_NAME='{0!s}'\\n\".format((self.project_name))\n\n            if self.settings_file:\n                settings_s = settings_s + \"SETTINGS_FILE='{0!s}'\\n\".format((self.settings_file))\n            else:\n                settings_s = settings_s + \"SETTINGS_FILE=None\\n\"\n\n            if self.django_settings:\n                settings_s = settings_s + \"DJANGO_SETTINGS='{0!s}'\\n\".format((self.django_settings))\n            else:\n                settings_s = settings_s + \"DJANGO_SETTINGS=None\\n\"\n\n            # If slim handler, path to project zip\n            if self.stage_config.get('slim_handler', False):\n                settings_s += \"ARCHIVE_PATH='s3://{0!s}/{1!s}_{2!s}_current_project.tar.gz'\\n\".format(\n                    self.s3_bucket_name, self.api_stage, self.project_name)\n\n                # since includes are for slim handler add the setting here by joining arbitrary list from zappa_settings file\n                # and tell the handler we are the slim_handler\n                # https://github.com/Miserlou/Zappa/issues/776\n                settings_s += \"SLIM_HANDLER=True\\n\"\n\n                include = self.stage_config.get('include', [])\n                if len(include) >= 1:\n                    settings_s += \"INCLUDE=\" + str(include) + '\\n'\n\n            # AWS Events function mapping\n            event_mapping = {}\n            events = self.stage_config.get('events', [])\n            for event in events:\n                arn = event.get('event_source', {}).get('arn')\n                function = event.get('function')\n                if arn and function:\n                    event_mapping[arn] = function\n            settings_s = settings_s + \"AWS_EVENT_MAPPING={0!s}\\n\".format(event_mapping)\n\n            # Map Lext bot events\n            bot_events = self.stage_config.get('bot_events', [])\n            bot_events_mapping = {}\n            for bot_event in bot_events:\n                event_source = bot_event.get('event_source', {})\n                intent = event_source.get('intent')\n                invocation_source = event_source.get('invocation_source')\n                function = bot_event.get('function')\n                if intent and invocation_source and function:\n                    bot_events_mapping[str(intent) + ':' + str(invocation_source)] = function\n\n            settings_s = settings_s + \"AWS_BOT_EVENT_MAPPING={0!s}\\n\".format(bot_events_mapping)\n\n            # Map cognito triggers\n            cognito_trigger_mapping = {}\n            cognito_config = self.stage_config.get('cognito', {})\n            triggers = cognito_config.get('triggers', [])\n            for trigger in triggers:\n                source = trigger.get('source')\n                function = trigger.get('function')\n                if source and function:\n                    cognito_trigger_mapping[source] = function\n            settings_s = settings_s + \"COGNITO_TRIGGER_MAPPING={0!s}\\n\".format(cognito_trigger_mapping)\n\n            # Authorizer config\n            authorizer_function = self.authorizer.get('function', None)\n            if authorizer_function:\n                settings_s += \"AUTHORIZER_FUNCTION='{0!s}'\\n\".format(authorizer_function)\n\n            # Copy our Django app into root of our package.\n            # It doesn't work otherwise.\n            if self.django_settings:\n                base = __file__.rsplit(os.sep, 1)[0]\n                django_py = ''.join(os.path.join(base, 'ext', 'django_zappa.py'))\n                lambda_zip.write(django_py, 'django_zappa_app.py')\n\n            # async response\n            async_response_table = self.stage_config.get('async_response_table', '')\n            settings_s += \"ASYNC_RESPONSE_TABLE='{0!s}'\\n\".format(async_response_table)\n\n            # Lambda requires a specific chmod\n            temp_settings = tempfile.NamedTemporaryFile(delete=False)\n            os.chmod(temp_settings.name, 0o644)\n            temp_settings.write(bytes(settings_s, \"utf-8\"))\n            temp_settings.close()\n            lambda_zip.write(temp_settings.name, 'zappa_settings.py')\n            os.unlink(temp_settings.name)\n\n    def remove_local_zip(self):\n        \"\"\"\n        Remove our local zip file.\n        \"\"\"\n\n        if self.stage_config.get('delete_local_zip', True):\n            try:\n                if os.path.isfile(self.zip_path):\n                    os.remove(self.zip_path)\n                if self.handler_path and os.path.isfile(self.handler_path):\n                    os.remove(self.handler_path)\n            except Exception as e: # pragma: no cover\n                sys.exit(-1)\n\n    def remove_uploaded_zip(self):\n        \"\"\"\n        Remove the local and S3 zip file after uploading and updating.\n        \"\"\"\n\n        # Remove the uploaded zip from S3, because it is now registered..\n        if self.stage_config.get('delete_s3_zip', True):\n            self.zappa.remove_from_s3(self.zip_path, self.s3_bucket_name)\n            if self.stage_config.get('slim_handler', False):\n                # Need to keep the project zip as the slim handler uses it.\n                self.zappa.remove_from_s3(self.handler_path, self.s3_bucket_name)\n\n    def on_exit(self):\n        \"\"\"\n        Cleanup after the command finishes.\n        Always called: SystemExit, KeyboardInterrupt and any other Exception that occurs.\n        \"\"\"\n        if self.zip_path:\n            # Only try to remove uploaded zip if we're running a command that has loaded credentials\n            if self.load_credentials:\n                self.remove_uploaded_zip()\n\n            self.remove_local_zip()\n\n    def print_logs(self, logs, colorize=True, http=False, non_http=False, force_colorize=None):\n        \"\"\"\n        Parse, filter and print logs to the console.\n\n        \"\"\"\n\n        for log in logs:\n            timestamp = log['timestamp']\n            message = log['message']\n            if \"START RequestId\" in message:\n                continue\n            if \"REPORT RequestId\" in message:\n                continue\n            if \"END RequestId\" in message:\n                continue\n\n            if not colorize and not force_colorize:\n                if http:\n                    if self.is_http_log_entry(message.strip()):\n                        print(\"[\" + str(timestamp) + \"] \" + message.strip())\n                elif non_http:\n                    if not self.is_http_log_entry(message.strip()):\n                        print(\"[\" + str(timestamp) + \"] \" + message.strip())\n                else:\n                    print(\"[\" + str(timestamp) + \"] \" + message.strip())\n            else:\n                if http:\n                    if self.is_http_log_entry(message.strip()):\n                        click.echo(click.style(\"[\", fg='cyan') + click.style(str(timestamp), bold=True) + click.style(\"]\", fg='cyan') + self.colorize_log_entry(message.strip()), color=force_colorize)\n                elif non_http:\n                    if not self.is_http_log_entry(message.strip()):\n                        click.echo(click.style(\"[\", fg='cyan') + click.style(str(timestamp), bold=True) + click.style(\"]\", fg='cyan') + self.colorize_log_entry(message.strip()), color=force_colorize)\n                else:\n                    click.echo(click.style(\"[\", fg='cyan') + click.style(str(timestamp), bold=True) + click.style(\"]\", fg='cyan') + self.colorize_log_entry(message.strip()), color=force_colorize)\n\n    def is_http_log_entry(self, string):\n        \"\"\"\n        Determines if a log entry is an HTTP-formatted log string or not.\n        \"\"\"\n        # Debug event filter\n        if 'Zappa Event' in string:\n            return False\n\n        # IP address filter\n        for token in string.replace('\\t', ' ').split(' '):\n            try:\n                if (token.count('.') == 3 and token.replace('.', '').isnumeric()):\n                    return True\n            except Exception: # pragma: no cover\n                pass\n\n        return False\n\n    def get_project_name(self):\n        return slugify.slugify(os.getcwd().split(os.sep)[-1])[:15]\n\n    def colorize_log_entry(self, string):\n        \"\"\"\n        Apply various heuristics to return a colorized version of a string.\n        If these fail, simply return the string in plaintext.\n        \"\"\"\n\n        final_string = string\n        try:\n\n            # First, do stuff in square brackets\n            inside_squares = re.findall(r'\\[([^]]*)\\]', string)\n            for token in inside_squares:\n                if token in ['CRITICAL', 'ERROR', 'WARNING', 'DEBUG', 'INFO', 'NOTSET']:\n                    final_string = final_string.replace('[' + token + ']', click.style(\"[\", fg='cyan') + click.style(token, fg='cyan', bold=True) + click.style(\"]\", fg='cyan'))\n                else:\n                    final_string = final_string.replace('[' + token + ']', click.style(\"[\", fg='cyan') + click.style(token, bold=True) + click.style(\"]\", fg='cyan'))\n\n            # Then do quoted strings\n            quotes = re.findall(r'\"[^\"]*\"', string)\n            for token in quotes:\n                final_string = final_string.replace(token, click.style(token, fg=\"yellow\"))\n\n            # And UUIDs\n            for token in final_string.replace('\\t', ' ').split(' '):\n                try:\n                    if token.count('-') == 4 and token.replace('-', '').isalnum():\n                        final_string = final_string.replace(token, click.style(token, fg=\"magenta\"))\n                except Exception: # pragma: no cover\n                    pass\n\n                # And IP addresses\n                try:\n                    if token.count('.') == 3 and token.replace('.', '').isnumeric():\n                        final_string = final_string.replace(token, click.style(token, fg=\"red\"))\n                except Exception: # pragma: no cover\n                    pass\n\n                # And status codes\n                try:\n                    if token in ['200']:\n                        final_string = final_string.replace(token, click.style(token, fg=\"green\"))\n                    if token in ['400', '401', '403', '404', '405', '500']:\n                        final_string = final_string.replace(token, click.style(token, fg=\"red\"))\n                except Exception: # pragma: no cover\n                    pass\n\n            # And Zappa Events\n            try:\n                if \"Zappa Event:\" in final_string:\n                    final_string = final_string.replace(\"Zappa Event:\", click.style(\"Zappa Event:\", bold=True, fg=\"green\"))\n            except Exception: # pragma: no cover\n                pass\n\n            # And dates\n            for token in final_string.split('\\t'):\n                try:\n                    is_date = parser.parse(token)\n                    final_string = final_string.replace(token, click.style(token, fg=\"green\"))\n                except Exception: # pragma: no cover\n                    pass\n\n            final_string = final_string.replace('\\t', ' ').replace('   ', ' ')\n            if final_string[0] != ' ':\n                final_string = ' ' + final_string\n            return final_string\n        except Exception as e: # pragma: no cover\n            return string\n\n    def execute_prebuild_script(self):\n        \"\"\"\n        Parse and execute the prebuild_script from the zappa_settings.\n\n        \"\"\"\n\n        (pb_mod_path, pb_func) = self.prebuild_script.rsplit('.', 1)\n\n        try:  # Prefer prebuild script in working directory\n            if pb_mod_path.count('.') >= 1:  # Prebuild script func is nested in a folder\n                (mod_folder_path, mod_name) = pb_mod_path.rsplit('.', 1)\n                mod_folder_path_fragments = mod_folder_path.split('.')\n                working_dir = os.path.join(os.getcwd(), *mod_folder_path_fragments)\n            else:\n                mod_name = pb_mod_path\n                working_dir = os.getcwd()\n\n            working_dir_importer = pkgutil.get_importer(working_dir)\n            module_ = working_dir_importer.find_module(mod_name).load_module(mod_name)\n\n        except (ImportError, AttributeError):\n\n            try:  # Prebuild func might be in virtualenv\n                module_ = importlib.import_module(pb_mod_path)\n            except ImportError:  # pragma: no cover\n                raise ClickException(click.style(\"Failed \", fg=\"red\") + 'to ' + click.style(\n                    \"import prebuild script \", bold=True) + 'module: \"{pb_mod_path}\"'.format(\n                    pb_mod_path=click.style(pb_mod_path, bold=True)))\n\n        if not hasattr(module_, pb_func):  # pragma: no cover\n            raise ClickException(click.style(\"Failed \", fg=\"red\") + 'to ' + click.style(\n                \"find prebuild script \", bold=True) + 'function: \"{pb_func}\" '.format(\n                pb_func=click.style(pb_func, bold=True)) + 'in module \"{pb_mod_path}\"'.format(\n                pb_mod_path=pb_mod_path))\n\n        prebuild_function = getattr(module_, pb_func)\n        prebuild_function()  # Call the function\n\n    def collision_warning(self, item):\n        \"\"\"\n        Given a string, print a warning if this could\n        collide with a Zappa core package module.\n\n        Use for app functions and events.\n        \"\"\"\n\n        namespace_collisions = [\n            \"zappa.\", \"wsgi.\", \"middleware.\", \"handler.\", \"util.\", \"letsencrypt.\", \"cli.\"\n        ]\n        for namespace_collision in namespace_collisions:\n            if item.startswith(namespace_collision):\n                click.echo(click.style(\"Warning!\", fg=\"red\", bold=True) +\n                           \" You may have a namespace collision between \" +\n                           click.style(item, bold=True) +\n                           \" and \" +\n                           click.style(namespace_collision, bold=True) +\n                           \"! You may want to rename that file.\")\n\n    def deploy_api_gateway(self, api_id):\n        cache_cluster_enabled = self.stage_config.get('cache_cluster_enabled', False)\n        cache_cluster_size = str(self.stage_config.get('cache_cluster_size', .5))\n        endpoint_url = self.zappa.deploy_api_gateway(\n            api_id=api_id,\n            stage_name=self.api_stage,\n            cache_cluster_enabled=cache_cluster_enabled,\n            cache_cluster_size=cache_cluster_size,\n            cloudwatch_log_level=self.stage_config.get('cloudwatch_log_level', 'OFF'),\n            cloudwatch_data_trace=self.stage_config.get('cloudwatch_data_trace', False),\n            cloudwatch_metrics_enabled=self.stage_config.get('cloudwatch_metrics_enabled', False),\n            cache_cluster_ttl=self.stage_config.get('cache_cluster_ttl', 300),\n            cache_cluster_encrypted=self.stage_config.get('cache_cluster_encrypted', False)\n        )\n        return endpoint_url\n\n    def check_venv(self):\n        \"\"\" Ensure we're inside a virtualenv. \"\"\"\n        if self.vargs and self.vargs.get(\"no_venv\"):\n            return\n        if self.zappa:\n            venv = self.zappa.get_current_venv()\n        else:\n            # Just for `init`, when we don't have settings yet.\n            venv = Zappa.get_current_venv()\n        if not venv:\n            raise ClickException(\n                click.style(\"Zappa\", bold=True) + \" requires an \" + click.style(\"active virtual environment\", bold=True, fg=\"red\") + \"!\\n\" +\n                \"Learn more about virtual environments here: \" + click.style(\"http://docs.python-guide.org/en/latest/dev/virtualenvs/\", bold=False, fg=\"cyan\"))\n\n    def silence(self):\n        \"\"\"\n        Route all stdout to null.\n        \"\"\"\n\n        sys.stdout = open(os.devnull, 'w')\n        sys.stderr = open(os.devnull, 'w')\n\n    def touch_endpoint(self, endpoint_url):\n        \"\"\"\n        Test the deployed endpoint with a GET request.\n        \"\"\"\n\n        # Private APIGW endpoints most likely can't be reached by a deployer\n        # unless they're connected to the VPC by VPN. Instead of trying\n        # connect to the service, print a warning and let the user know\n        # to check it manually.\n        # See: https://github.com/Miserlou/Zappa/pull/1719#issuecomment-471341565\n        if 'PRIVATE' in self.stage_config.get('endpoint_configuration', []):\n            print(\n                click.style(\"Warning!\", fg=\"yellow\", bold=True) +\n                \" Since you're deploying a private API Gateway endpoint,\"\n                \" Zappa cannot determine if your function is returning \"\n                \" a correct status code. You should check your API's response\"\n                \" manually before considering this deployment complete.\"\n            )\n            return\n\n        touch_path = self.stage_config.get('touch_path', '/')\n        req = requests.get(endpoint_url + touch_path)\n\n        # Sometimes on really large packages, it can take 60-90 secs to be\n        # ready and requests will return 504 status_code until ready.\n        # So, if we get a 504 status code, rerun the request up to 4 times or\n        # until we don't get a 504 error\n        if req.status_code == 504:\n            i = 0\n            status_code = 504\n            while status_code == 504 and i <= 4:\n                req = requests.get(endpoint_url + touch_path)\n                status_code = req.status_code\n                i += 1\n\n        if req.status_code >= 500:\n            raise ClickException(click.style(\"Warning!\", fg=\"red\", bold=True) +\n                \" Status check on the deployed lambda failed.\" +\n                \" A GET request to '\" + touch_path + \"' yielded a \" +\n                click.style(str(req.status_code), fg=\"red\", bold=True) + \" response code.\")\n\n####################################################################\n# Main\n####################################################################\n\ndef shamelessly_promote():\n    \"\"\"\n    Shamelessly promote our little community.\n    \"\"\"\n\n    click.echo(\"Need \" + click.style(\"help\", fg='green', bold=True) +\n               \"? Found a \" + click.style(\"bug\", fg='green', bold=True) +\n               \"? Let us \" + click.style(\"know\", fg='green', bold=True) + \"! :D\")\n    click.echo(\"File bug reports on \" + click.style(\"GitHub\", bold=True) + \" here: \"\n               + click.style(\"https://github.com/Miserlou/Zappa\", fg='cyan', bold=True))\n    click.echo(\"And join our \" + click.style(\"Slack\", bold=True) + \" channel here: \"\n               + click.style(\"https://zappateam.slack.com\", fg='cyan', bold=True))\n    click.echo(\"Love!,\")\n    click.echo(\" ~ Team \" + click.style(\"Zappa\", bold=True) + \"!\")\n\ndef disable_click_colors():\n    \"\"\"\n    Set a Click context where colors are disabled. Creates a throwaway BaseCommand\n    to play nicely with the Context constructor.\n    The intended side-effect here is that click.echo() checks this context and will\n    suppress colors.\n    https://github.com/pallets/click/blob/e1aa43a3/click/globals.py#L39\n    \"\"\"\n\n    ctx = Context(BaseCommand('AllYourBaseAreBelongToUs'))\n    ctx.color = False\n    push_context(ctx)\n\ndef handle(): # pragma: no cover\n    \"\"\"\n    Main program execution handler.\n    \"\"\"\n\n    try:\n        cli = ZappaCLI()\n        sys.exit(cli.handle())\n    except SystemExit as e: # pragma: no cover\n        cli.on_exit()\n        sys.exit(e.code)\n\n    except KeyboardInterrupt: # pragma: no cover\n        cli.on_exit()\n        sys.exit(130)\n    except Exception as e:\n        cli.on_exit()\n\n        click.echo(\"Oh no! An \" + click.style(\"error occurred\", fg='red', bold=True) + \"! :(\")\n        click.echo(\"\\n==============\\n\")\n        import traceback\n        traceback.print_exc()\n        click.echo(\"\\n==============\\n\")\n        shamelessly_promote()\n\n        sys.exit(-1)\n\nif __name__ == '__main__': # pragma: no cover\n    handle()\n"
  },
  {
    "path": "zappa/core.py",
    "content": "\"\"\"\nZappa core library. You may also want to look at `cli.py` and `util.py`.\n\"\"\"\n\n##\n# Imports\n##\nimport getpass\nimport glob\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport re\nimport shutil\nimport string\nimport subprocess\nimport tarfile\nimport tempfile\nimport time\nimport uuid\nimport zipfile\nfrom builtins import bytes, int\nfrom distutils.dir_util import copy_tree\nfrom io import open\n\nimport requests\nfrom setuptools import find_packages\n\nimport boto3\nimport botocore\nimport troposphere\nimport troposphere.apigateway\nfrom botocore.exceptions import ClientError\nfrom tqdm import tqdm\n\nfrom .utilities import (add_event_source, conflicts_with_a_neighbouring_module,\n                        contains_python_files_or_subdirs, copytree,\n                        get_topic_name, get_venv_from_python_version,\n                        human_size, remove_event_source)\n\n\n##\n# Logging Config\n##\n\nlogging.basicConfig(format='%(levelname)s:%(message)s')\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\n\n##\n# Policies And Template Mappings\n##\n\nASSUME_POLICY = \"\"\"{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"\",\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n        \"Service\": [\n          \"apigateway.amazonaws.com\",\n          \"lambda.amazonaws.com\",\n          \"events.amazonaws.com\"\n        ]\n      },\n      \"Action\": \"sts:AssumeRole\"\n    }\n  ]\n}\"\"\"\n\nATTACH_POLICY = \"\"\"{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"logs:*\"\n            ],\n            \"Resource\": \"arn:aws:logs:*:*:*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"lambda:InvokeFunction\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"xray:PutTraceSegments\",\n                \"xray:PutTelemetryRecords\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ec2:AttachNetworkInterface\",\n                \"ec2:CreateNetworkInterface\",\n                \"ec2:DeleteNetworkInterface\",\n                \"ec2:DescribeInstances\",\n                \"ec2:DescribeNetworkInterfaces\",\n                \"ec2:DetachNetworkInterface\",\n                \"ec2:ModifyNetworkInterfaceAttribute\",\n                \"ec2:ResetNetworkInterfaceAttribute\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:*\"\n            ],\n            \"Resource\": \"arn:aws:s3:::*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"kinesis:*\"\n            ],\n            \"Resource\": \"arn:aws:kinesis:*:*:*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"sns:*\"\n            ],\n            \"Resource\": \"arn:aws:sns:*:*:*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"sqs:*\"\n            ],\n            \"Resource\": \"arn:aws:sqs:*:*:*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"dynamodb:*\"\n            ],\n            \"Resource\": \"arn:aws:dynamodb:*:*:*\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"route53:*\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\"\"\"\n\n# Latest list: https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region\nAPI_GATEWAY_REGIONS = ['us-east-1', 'us-east-2',\n                       'us-west-1', 'us-west-2',\n                       'eu-central-1',\n                       'eu-north-1',\n                       'eu-west-1', 'eu-west-2', 'eu-west-3',\n                       'eu-north-1',\n                       'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',\n                       'ap-southeast-1', 'ap-southeast-2',\n                       'ap-east-1',\n                       'ap-south-1',\n                       'ca-central-1',\n                       'cn-north-1',\n                       'cn-northwest-1',\n                       'sa-east-1',\n                       'us-gov-east-1', 'us-gov-west-1']\n\n# Latest list: https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region\nLAMBDA_REGIONS = ['us-east-1', 'us-east-2',\n                  'us-west-1', 'us-west-2',\n                  'eu-central-1',\n                  'eu-north-1',\n                  'eu-west-1', 'eu-west-2', 'eu-west-3',\n                  'eu-north-1',\n                  'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',\n                  'ap-southeast-1', 'ap-southeast-2',\n                  'ap-east-1',\n                  'ap-south-1',\n                  'ca-central-1',\n                  'cn-north-1',\n                  'cn-northwest-1',\n                  'sa-east-1',\n                  'us-gov-east-1',\n                  'us-gov-west-1']\n\n# We never need to include these.\n# Related: https://github.com/Miserlou/Zappa/pull/56\n# Related: https://github.com/Miserlou/Zappa/pull/581\nZIP_EXCLUDES = [\n    '*.exe', '*.DS_Store', '*.Python', '*.git', '.git/*', '*.zip', '*.tar.gz',\n    '*.hg', 'pip', 'docutils*', 'setuputils*', '__pycache__/*'\n]\n\n# When using ALB as an event source for Lambdas, we need to create an alias\n# to ensure that, on zappa update, the ALB doesn't lose permissions to access\n# the Lambda.\n# See: https://github.com/Miserlou/Zappa/pull/1730\nALB_LAMBDA_ALIAS = 'current-alb-version'\n\n##\n# Classes\n##\n\nclass Zappa:\n    \"\"\"\n    Zappa!\n\n    Makes it easy to run Python web applications on AWS Lambda/API Gateway.\n\n    \"\"\"\n\n    ##\n    # Configurables\n    ##\n\n    http_methods = ['ANY']\n    role_name = \"ZappaLambdaExecution\"\n    extra_permissions = None\n    assume_policy = ASSUME_POLICY\n    attach_policy = ATTACH_POLICY\n    apigateway_policy = None\n    cloudwatch_log_levels = ['OFF', 'ERROR', 'INFO']\n    xray_tracing = False\n\n    ##\n    # Credentials\n    ##\n\n    boto_session = None\n    credentials_arn = None\n\n    def __init__(self,\n            boto_session=None,\n            profile_name=None,\n            aws_region=None,\n            load_credentials=True,\n            desired_role_name=None,\n            desired_role_arn=None,\n            runtime='python3.6', # Detected at runtime in CLI\n            tags=(),\n            endpoint_urls={},\n            xray_tracing=False\n        ):\n        \"\"\"\n        Instantiate this new Zappa instance, loading any custom credentials if necessary.\n        \"\"\"\n\n        # Set aws_region to None to use the system's region instead\n        if aws_region is None:\n            # https://github.com/Miserlou/Zappa/issues/413\n            self.aws_region = boto3.Session().region_name\n            logger.debug(\"Set region from boto: %s\", self.aws_region)\n        else:\n            self.aws_region = aws_region\n\n        if desired_role_name:\n            self.role_name = desired_role_name\n\n        if desired_role_arn:\n            self.credentials_arn = desired_role_arn\n\n        self.runtime = runtime\n\n        if self.runtime == 'python3.6':\n            self.manylinux_suffix_start = 'cp36m'\n        elif self.runtime == 'python3.7':\n            self.manylinux_suffix_start = 'cp37m'\n        else:\n            # The 'm' has been dropped in python 3.8+ since builds with and without pymalloc are ABI compatible\n            # See https://github.com/pypa/manylinux for a more detailed explanation\n            self.manylinux_suffix_start = 'cp38'\n\n        # AWS Lambda supports manylinux1/2010 and manylinux2014\n        manylinux_suffixes = (\"2014\", \"2010\", \"1\")\n        self.manylinux_wheel_file_match = re.compile(f'^.*{self.manylinux_suffix_start}-manylinux({\"|\".join(manylinux_suffixes)})_x86_64.whl$')\n        self.manylinux_wheel_abi3_file_match = re.compile(f'^.*cp3.-abi3-manylinux({\"|\".join(manylinux_suffixes)})_x86_64.whl$')\n\n        self.endpoint_urls = endpoint_urls\n        self.xray_tracing = xray_tracing\n\n        # Some common invocations, such as DB migrations,\n        # can take longer than the default.\n\n        # Note that this is set to 300s, but if connected to\n        # APIGW, Lambda will max out at 30s.\n        # Related: https://github.com/Miserlou/Zappa/issues/205\n        long_config_dict = {\n            'region_name': aws_region,\n            'connect_timeout': 5,\n            'read_timeout': 300\n        }\n        long_config = botocore.client.Config(**long_config_dict)\n\n        if load_credentials:\n            self.load_credentials(boto_session, profile_name)\n\n            # Initialize clients\n            self.s3_client = self.boto_client('s3')\n            self.lambda_client = self.boto_client('lambda', config=long_config)\n            self.elbv2_client = self.boto_client('elbv2')\n            self.events_client = self.boto_client('events')\n            self.apigateway_client = self.boto_client('apigateway')\n            # AWS ACM certificates need to be created from us-east-1 to be used by API gateway\n            east_config = botocore.client.Config(region_name='us-east-1')\n            self.acm_client = self.boto_client('acm', config=east_config)\n            self.logs_client = self.boto_client('logs')\n            self.iam_client = self.boto_client('iam')\n            self.iam = self.boto_resource('iam')\n            self.cloudwatch = self.boto_client('cloudwatch')\n            self.route53 = self.boto_client('route53')\n            self.sns_client = self.boto_client('sns')\n            self.cf_client = self.boto_client('cloudformation')\n            self.dynamodb_client = self.boto_client('dynamodb')\n            self.cognito_client = self.boto_client('cognito-idp')\n            self.sts_client = self.boto_client('sts')\n\n        self.tags = tags\n        self.cf_template = troposphere.Template()\n        self.cf_api_resources = []\n        self.cf_parameters = {}\n\n    def configure_boto_session_method_kwargs(self, service, kw):\n        \"\"\"Allow for custom endpoint urls for non-AWS (testing and bootleg cloud) deployments\"\"\"\n        if service in self.endpoint_urls and not 'endpoint_url' in kw:\n            kw['endpoint_url'] = self.endpoint_urls[service]\n        return kw\n\n    def boto_client(self, service, *args, **kwargs):\n        \"\"\"A wrapper to apply configuration options to boto clients\"\"\"\n        return self.boto_session.client(service, *args, **self.configure_boto_session_method_kwargs(service, kwargs))\n\n    def boto_resource(self, service, *args, **kwargs):\n        \"\"\"A wrapper to apply configuration options to boto resources\"\"\"\n        return self.boto_session.resource(service, *args, **self.configure_boto_session_method_kwargs(service, kwargs))\n\n    def cache_param(self, value):\n        '''Returns a troposphere Ref to a value cached as a parameter.'''\n\n        if value not in self.cf_parameters:\n            keyname = chr(ord('A') + len(self.cf_parameters))\n            param = self.cf_template.add_parameter(troposphere.Parameter(\n                keyname, Type=\"String\", Default=value, tags=self.tags\n            ))\n\n            self.cf_parameters[value] = param\n\n        return troposphere.Ref(self.cf_parameters[value])\n\n    ##\n    # Packaging\n    ##\n\n    def copy_editable_packages(self, egg_links, temp_package_path):\n        \"\"\" \"\"\"\n        for egg_link in egg_links:\n            with open(egg_link, 'rb') as df:\n                egg_path = df.read().decode('utf-8').splitlines()[0].strip()\n                pkgs = set([x.split(\".\")[0] for x in find_packages(egg_path, exclude=['test', 'tests'])])\n                for pkg in pkgs:\n                    copytree(os.path.join(egg_path, pkg), os.path.join(temp_package_path, pkg), metadata=False, symlinks=False)\n\n        if temp_package_path:\n            # now remove any egg-links as they will cause issues if they still exist\n            for link in glob.glob(os.path.join(temp_package_path, \"*.egg-link\")):\n                os.remove(link)\n\n    def get_deps_list(self, pkg_name, installed_distros=None):\n        \"\"\"\n        For a given package, returns a list of required packages. Recursive.\n        \"\"\"\n        # https://github.com/Miserlou/Zappa/issues/1478.  Using `pkg_resources`\n        # instead of `pip` is the recommended approach.  The usage is nearly\n        # identical.\n        import pkg_resources\n        deps = []\n        if not installed_distros:\n            installed_distros = pkg_resources.WorkingSet()\n        for package in installed_distros:\n            if package.project_name.lower() == pkg_name.lower():\n                deps = [(package.project_name, package.version)]\n                for req in package.requires():\n                    deps += self.get_deps_list(pkg_name=req.project_name, installed_distros=installed_distros)\n        return list(set(deps))  # de-dupe before returning\n\n    def create_handler_venv(self):\n        \"\"\"\n        Takes the installed zappa and brings it into a fresh virtualenv-like folder. All dependencies are then downloaded.\n        \"\"\"\n        import subprocess\n\n        # We will need the currenv venv to pull Zappa from\n        current_venv = self.get_current_venv()\n\n        # Make a new folder for the handler packages\n        ve_path = os.path.join(os.getcwd(), 'handler_venv')\n\n        if os.sys.platform == 'win32':\n            current_site_packages_dir = os.path.join(current_venv, 'Lib', 'site-packages')\n            venv_site_packages_dir = os.path.join(ve_path, 'Lib', 'site-packages')\n        else:\n            current_site_packages_dir = os.path.join(current_venv, 'lib', get_venv_from_python_version(), 'site-packages')\n            venv_site_packages_dir = os.path.join(ve_path, 'lib', get_venv_from_python_version(), 'site-packages')\n\n        if not os.path.isdir(venv_site_packages_dir):\n            os.makedirs(venv_site_packages_dir)\n\n        # Copy zappa* to the new virtualenv\n        zappa_things = [z for z in os.listdir(current_site_packages_dir) if z.lower()[:5] == 'zappa']\n        for z in zappa_things:\n            copytree(os.path.join(current_site_packages_dir, z), os.path.join(venv_site_packages_dir, z))\n\n        # Use pip to download zappa's dependencies. Copying from current venv causes issues with things like PyYAML that installs as yaml\n        zappa_deps = self.get_deps_list('zappa')\n        pkg_list = ['{0!s}=={1!s}'.format(dep, version) for dep, version in zappa_deps]\n\n        # Need to manually add setuptools\n        pkg_list.append('setuptools')\n        command = [\"pip\", \"install\", \"--quiet\", \"--target\", venv_site_packages_dir] + pkg_list\n\n        # This is the recommended method for installing packages if you don't\n        # to depend on `setuptools`\n        # https://github.com/pypa/pip/issues/5240#issuecomment-381662679\n        pip_process = subprocess.Popen(command, stdout=subprocess.PIPE)\n        # Using communicate() to avoid deadlocks\n        pip_process.communicate()\n        pip_return_code = pip_process.returncode\n\n        if pip_return_code:\n          raise EnvironmentError(\"Pypi lookup failed\")\n\n        return ve_path\n\n    # staticmethod as per https://github.com/Miserlou/Zappa/issues/780\n    @staticmethod\n    def get_current_venv():\n        \"\"\"\n        Returns the path to the current virtualenv\n        \"\"\"\n        if 'VIRTUAL_ENV' in os.environ:\n            venv = os.environ['VIRTUAL_ENV']\n        elif os.path.exists('.python-version'):  # pragma: no cover\n            try:\n                subprocess.check_output(['pyenv', 'help'], stderr=subprocess.STDOUT)\n            except OSError:\n                print(\"This directory seems to have pyenv's local venv, \"\n                      \"but pyenv executable was not found.\")\n            with open('.python-version', 'r') as f:\n                # minor fix in how .python-version is read\n                # Related: https://github.com/Miserlou/Zappa/issues/921\n                env_name = f.readline().strip()\n            bin_path = subprocess.check_output(['pyenv', 'which', 'python']).decode('utf-8')\n            venv = bin_path[:bin_path.rfind(env_name)] + env_name\n        else:  # pragma: no cover\n            return None\n        return venv\n\n    def create_lambda_zip(  self,\n                            prefix='lambda_package',\n                            handler_file=None,\n                            slim_handler=False,\n                            minify=True,\n                            exclude=None,\n                            exclude_glob=None,\n                            use_precompiled_packages=True,\n                            include=None,\n                            venv=None,\n                            output=None,\n                            disable_progress=False,\n                            archive_format='zip'\n                        ):\n        \"\"\"\n        Create a Lambda-ready zip file of the current virtualenvironment and working directory.\n\n        Returns path to that file.\n\n        \"\"\"\n        # Validate archive_format\n        if archive_format not in ['zip', 'tarball']:\n            raise KeyError(\"The archive format to create a lambda package must be zip or tarball\")\n\n        # Pip is a weird package.\n        # Calling this function in some environments without this can cause.. funkiness.\n        import pip\n\n        if not venv:\n            venv = self.get_current_venv()\n\n        build_time = str(int(time.time()))\n        cwd = os.getcwd()\n        if not output:\n            if archive_format == 'zip':\n                archive_fname = prefix + '-' + build_time + '.zip'\n            elif archive_format == 'tarball':\n                archive_fname = prefix + '-' + build_time + '.tar.gz'\n        else:\n            archive_fname = output\n        archive_path = os.path.join(cwd, archive_fname)\n\n        # Files that should be excluded from the zip\n        if exclude is None:\n            exclude = list()\n\n        if exclude_glob is None:\n            exclude_glob = list()\n\n        # Exclude the zip itself\n        exclude.append(archive_path)\n\n        # Make sure that 'concurrent' is always forbidden.\n        # https://github.com/Miserlou/Zappa/issues/827\n        if not 'concurrent' in exclude:\n            exclude.append('concurrent')\n\n        def splitpath(path):\n            parts = []\n            (path, tail) = os.path.split(path)\n            while path and tail:\n                parts.append(tail)\n                (path, tail) = os.path.split(path)\n            parts.append(os.path.join(path, tail))\n            return list(map(os.path.normpath, parts))[::-1]\n        split_venv = splitpath(venv)\n        split_cwd = splitpath(cwd)\n\n        # Ideally this should be avoided automatically,\n        # but this serves as an okay stop-gap measure.\n        if split_venv[-1] == split_cwd[-1]:  # pragma: no cover\n            print(\n                \"Warning! Your project and virtualenv have the same name! You may want \"\n                \"to re-create your venv with a new name, or explicitly define a \"\n                \"'project_name', as this may cause errors.\"\n            )\n\n        # First, do the project..\n        temp_project_path = tempfile.mkdtemp(prefix='zappa-project')\n\n        if not slim_handler:\n            # Slim handler does not take the project files.\n            if minify:\n                # Related: https://github.com/Miserlou/Zappa/issues/744\n                excludes = ZIP_EXCLUDES + exclude + [split_venv[-1]]\n                copytree(cwd, temp_project_path, metadata=False, symlinks=False, ignore=shutil.ignore_patterns(*excludes))\n            else:\n                copytree(cwd, temp_project_path, metadata=False, symlinks=False)\n            for glob_path in exclude_glob:\n                for path in glob.glob(os.path.join(temp_project_path, glob_path)):\n                    try:\n                        os.remove(path)\n                    except OSError:  # is a directory\n                        shutil.rmtree(path)\n\n        # If a handler_file is supplied, copy that to the root of the package,\n        # because that's where AWS Lambda looks for it. It can't be inside a package.\n        if handler_file:\n            filename = handler_file.split(os.sep)[-1]\n            shutil.copy(handler_file, os.path.join(temp_project_path, filename))\n\n        # Create and populate package ID file and write to temp project path\n        package_info = {}\n        package_info['uuid'] = str(uuid.uuid4())\n        package_info['build_time'] = build_time\n        package_info['build_platform'] = os.sys.platform\n        package_info['build_user'] = getpass.getuser()\n        # TODO: Add git head and info?\n\n        # Ex, from @scoates:\n        # def _get_git_branch():\n        #     chdir(DIR)\n        #     out = check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()\n        #     lambci_branch = environ.get('LAMBCI_BRANCH', None)\n        #     if out == \"HEAD\" and lambci_branch:\n        #         out += \" lambci:{}\".format(lambci_branch)\n        #     return out\n\n        # def _get_git_hash():\n        #     chdir(DIR)\n        #     return check_output(['git', 'rev-parse', 'HEAD']).strip()\n\n        # def _get_uname():\n        #     return check_output(['uname', '-a']).strip()\n\n        # def _get_user():\n        #     return check_output(['whoami']).strip()\n\n        # def set_id_info(zappa_cli):\n        #     build_info = {\n        #         'branch': _get_git_branch(),\n        #         'hash': _get_git_hash(),\n        #         'build_uname': _get_uname(),\n        #         'build_user': _get_user(),\n        #         'build_time': datetime.datetime.utcnow().isoformat(),\n        #     }\n        #     with open(path.join(DIR, 'id_info.json'), 'w') as f:\n        #         json.dump(build_info, f)\n        #     return True\n\n        package_id_file = open(os.path.join(temp_project_path, 'package_info.json'), 'w')\n        dumped = json.dumps(package_info, indent=4)\n        try:\n            package_id_file.write(dumped)\n        except TypeError: # This is a Python 2/3 issue. TODO: Make pretty!\n            package_id_file.write(str(dumped))\n        package_id_file.close()\n\n        # Then, do site site-packages..\n        egg_links = []\n        temp_package_path = tempfile.mkdtemp(prefix='zappa-packages')\n        if os.sys.platform == 'win32':\n            site_packages = os.path.join(venv, 'Lib', 'site-packages')\n        else:\n            site_packages = os.path.join(venv, 'lib', get_venv_from_python_version(), 'site-packages')\n        egg_links.extend(glob.glob(os.path.join(site_packages, '*.egg-link')))\n\n        if minify:\n            excludes = ZIP_EXCLUDES + exclude\n            copytree(site_packages, temp_package_path, metadata=False, symlinks=False, ignore=shutil.ignore_patterns(*excludes))\n        else:\n            copytree(site_packages, temp_package_path, metadata=False, symlinks=False)\n\n        # We may have 64-bin specific packages too.\n        site_packages_64 = os.path.join(venv, 'lib64', get_venv_from_python_version(), 'site-packages')\n        if os.path.exists(site_packages_64):\n            egg_links.extend(glob.glob(os.path.join(site_packages_64, '*.egg-link')))\n            if minify:\n                excludes = ZIP_EXCLUDES + exclude\n                copytree(site_packages_64, temp_package_path, metadata = False, symlinks=False, ignore=shutil.ignore_patterns(*excludes))\n            else:\n                copytree(site_packages_64, temp_package_path, metadata = False, symlinks=False)\n\n        if egg_links:\n            self.copy_editable_packages(egg_links, temp_package_path)\n\n        copy_tree(temp_package_path, temp_project_path, update=True)\n\n        # Then the pre-compiled packages..\n        if use_precompiled_packages:\n            print(\"Downloading and installing dependencies..\")\n            installed_packages = self.get_installed_packages(site_packages, site_packages_64)\n\n            try:\n                for installed_package_name, installed_package_version in installed_packages.items():\n                    cached_wheel_path = self.get_cached_manylinux_wheel(installed_package_name, installed_package_version, disable_progress)\n                    if cached_wheel_path:\n                        # Otherwise try to use manylinux packages from PyPi..\n                        # Related: https://github.com/Miserlou/Zappa/issues/398\n                        shutil.rmtree(os.path.join(temp_project_path, installed_package_name), ignore_errors=True)\n                        with zipfile.ZipFile(cached_wheel_path) as zfile:\n                            zfile.extractall(temp_project_path)\n\n            except Exception as e:\n                print(e)\n                # XXX - What should we do here?\n\n        # Cleanup\n        for glob_path in exclude_glob:\n            for path in glob.glob(os.path.join(temp_project_path, glob_path)):\n                try:\n                    os.remove(path)\n                except OSError:  # is a directory\n                    shutil.rmtree(path)\n\n        # Then archive it all up..\n        if archive_format == 'zip':\n            print(\"Packaging project as zip.\")\n\n            try:\n                compression_method = zipfile.ZIP_DEFLATED\n            except ImportError:  # pragma: no cover\n                compression_method = zipfile.ZIP_STORED\n            archivef = zipfile.ZipFile(archive_path, 'w', compression_method)\n\n        elif archive_format == 'tarball':\n            print(\"Packaging project as gzipped tarball.\")\n            archivef = tarfile.open(archive_path, 'w|gz')\n\n        for root, dirs, files in os.walk(temp_project_path):\n\n            for filename in files:\n\n                # Skip .pyc files for Django migrations\n                # https://github.com/Miserlou/Zappa/issues/436\n                # https://github.com/Miserlou/Zappa/issues/464\n                if filename[-4:] == '.pyc' and root[-10:] == 'migrations':\n                    continue\n\n                # If there is a .pyc file in this package,\n                # we can skip the python source code as we'll just\n                # use the compiled bytecode anyway..\n                if filename[-3:] == '.py' and root[-10:] != 'migrations':\n                    abs_filname = os.path.join(root, filename)\n                    abs_pyc_filename = abs_filname + 'c'\n                    if os.path.isfile(abs_pyc_filename):\n\n                        # but only if the pyc is older than the py,\n                        # otherwise we'll deploy outdated code!\n                        py_time = os.stat(abs_filname).st_mtime\n                        pyc_time = os.stat(abs_pyc_filename).st_mtime\n\n                        if pyc_time > py_time:\n                            continue\n\n                # Make sure that the files are all correctly chmodded\n                # Related: https://github.com/Miserlou/Zappa/issues/484\n                # Related: https://github.com/Miserlou/Zappa/issues/682\n                os.chmod(os.path.join(root, filename),  0o755)\n\n                if archive_format == 'zip':\n                    # Actually put the file into the proper place in the zip\n                    # Related: https://github.com/Miserlou/Zappa/pull/716\n                    zipi = zipfile.ZipInfo(os.path.join(root.replace(temp_project_path, '').lstrip(os.sep), filename))\n                    zipi.create_system = 3\n                    zipi.external_attr = 0o755 << int(16) # Is this P2/P3 functional?\n                    with open(os.path.join(root, filename), 'rb') as f:\n                        archivef.writestr(zipi, f.read(), compression_method)\n                elif archive_format == 'tarball':\n                    tarinfo = tarfile.TarInfo(os.path.join(root.replace(temp_project_path, '').lstrip(os.sep), filename))\n                    tarinfo.mode = 0o755\n\n                    stat = os.stat(os.path.join(root, filename))\n                    tarinfo.mtime = stat.st_mtime\n                    tarinfo.size = stat.st_size\n                    with open(os.path.join(root, filename), 'rb') as f:\n                        archivef.addfile(tarinfo, f)\n\n            # Create python init file if it does not exist\n            # Only do that if there are sub folders or python files and does not conflict with a neighbouring module\n            # Related: https://github.com/Miserlou/Zappa/issues/766\n            if not contains_python_files_or_subdirs(root):\n                # if the directory does not contain any .py file at any level, we can skip the rest\n                dirs[:] = [d for d in dirs if d != root]\n            else:\n                if '__init__.py' not in files and not conflicts_with_a_neighbouring_module(root):\n                    tmp_init = os.path.join(temp_project_path, '__init__.py')\n                    open(tmp_init, 'a').close()\n                    os.chmod(tmp_init,  0o755)\n\n                    arcname = os.path.join(root.replace(temp_project_path, ''),\n                                           os.path.join(root.replace(temp_project_path, ''), '__init__.py'))\n                    if archive_format == 'zip':\n                        archivef.write(tmp_init, arcname)\n                    elif archive_format == 'tarball':\n                        archivef.add(tmp_init, arcname)\n\n        # And, we're done!\n        archivef.close()\n\n        # Trash the temp directory\n        shutil.rmtree(temp_project_path)\n        shutil.rmtree(temp_package_path)\n        if os.path.isdir(venv) and slim_handler:\n            # Remove the temporary handler venv folder\n            shutil.rmtree(venv)\n\n        return archive_fname\n\n    @staticmethod\n    def get_installed_packages(site_packages, site_packages_64):\n        \"\"\"\n        Returns a dict of installed packages that Zappa cares about.\n        \"\"\"\n        import pkg_resources\n\n        package_to_keep = []\n        if os.path.isdir(site_packages):\n            package_to_keep += os.listdir(site_packages)\n        if os.path.isdir(site_packages_64):\n            package_to_keep += os.listdir(site_packages_64)\n\n        package_to_keep = [x.lower() for x in package_to_keep]\n\n        installed_packages = {package.project_name.lower(): package.version for package in\n                              pkg_resources.WorkingSet()\n                              if package.project_name.lower() in package_to_keep\n                              or package.location.lower() in [site_packages.lower(), site_packages_64.lower()]}\n\n        return installed_packages\n\n    @staticmethod\n    def download_url_with_progress(url, stream, disable_progress):\n        \"\"\"\n        Downloads a given url in chunks and writes to the provided stream (can be any io stream).\n        Displays the progress bar for the download.\n        \"\"\"\n        resp = requests.get(url, timeout=float(os.environ.get('PIP_TIMEOUT', 2)), stream=True)\n        resp.raw.decode_content = True\n\n        progress = tqdm(unit=\"B\", unit_scale=True, total=int(resp.headers.get('Content-Length', 0)), disable=disable_progress)\n        for chunk in resp.iter_content(chunk_size=1024):\n            if chunk:\n                progress.update(len(chunk))\n                stream.write(chunk)\n\n        progress.close()\n\n    def get_cached_manylinux_wheel(self, package_name, package_version, disable_progress=False):\n        \"\"\"\n        Gets the locally stored version of a manylinux wheel. If one does not exist, the function downloads it.\n        \"\"\"\n        cached_wheels_dir = os.path.join(tempfile.gettempdir(), 'cached_wheels')\n\n        if not os.path.isdir(cached_wheels_dir):\n            os.makedirs(cached_wheels_dir)\n        else:\n            # Check if we already have a cached copy\n            wheel_name = re.sub(\"[^\\w\\d.]+\", \"_\", package_name, re.UNICODE)\n            wheel_file = f'{wheel_name}-{package_version}-*_x86_64.whl'\n            wheel_path = os.path.join(cached_wheels_dir, wheel_file)\n\n            for pathname in glob.iglob(wheel_path):\n                if re.match(self.manylinux_wheel_file_match, pathname) or re.match(self.manylinux_wheel_abi3_file_match, pathname):\n                    print(f\" - {package_name}=={package_version}: Using locally cached manylinux wheel\")\n                    return pathname\n\n        # The file is not cached, download it.\n        wheel_url, filename = self.get_manylinux_wheel_url(package_name, package_version)\n        if not wheel_url:\n            return None\n\n        wheel_path = os.path.join(cached_wheels_dir, filename)\n        print(f\" - {package_name}=={package_version}: Downloading\")\n        with open(wheel_path, 'wb') as f:\n            self.download_url_with_progress(wheel_url, f, disable_progress)\n\n        if not zipfile.is_zipfile(wheel_path):\n            return None\n\n        return wheel_path\n\n    def get_manylinux_wheel_url(self, package_name, package_version):\n        \"\"\"\n        For a given package name, returns a link to the download URL,\n        else returns None.\n\n        Related: https://github.com/Miserlou/Zappa/issues/398\n        Examples here: https://gist.github.com/perrygeo/9545f94eaddec18a65fd7b56880adbae\n\n        This function downloads metadata JSON of `package_name` from Pypi\n        and examines if the package has a manylinux wheel. This function\n        also caches the JSON file so that we don't have to poll Pypi\n        every time.\n        \"\"\"\n        cached_pypi_info_dir = os.path.join(tempfile.gettempdir(), 'cached_pypi_info')\n        if not os.path.isdir(cached_pypi_info_dir):\n            os.makedirs(cached_pypi_info_dir)\n        # Even though the metadata is for the package, we save it in a\n        # filename that includes the package's version. This helps in\n        # invalidating the cached file if the user moves to a different\n        # version of the package.\n        # Related: https://github.com/Miserlou/Zappa/issues/899\n        json_file = '{0!s}-{1!s}.json'.format(package_name, package_version)\n        json_file_path = os.path.join(cached_pypi_info_dir, json_file)\n        if os.path.exists(json_file_path):\n            with open(json_file_path, 'rb') as metafile:\n                data = json.load(metafile)\n        else:\n            url = 'https://pypi.python.org/pypi/{}/json'.format(package_name)\n            try:\n                res = requests.get(url, timeout=float(os.environ.get('PIP_TIMEOUT', 1.5)))\n                data = res.json()\n            except Exception as e: # pragma: no cover\n                return None, None\n            with open(json_file_path, 'wb') as metafile:\n                jsondata = json.dumps(data)\n                metafile.write(bytes(jsondata, \"utf-8\"))\n\n        if package_version not in data['releases']:\n            return None, None\n\n        for f in data['releases'][package_version]:\n            if re.match(self.manylinux_wheel_file_match, f['filename']):\n                return f['url'], f['filename']\n            elif re.match(self.manylinux_wheel_abi3_file_match, f['filename']):\n                return f['url'], f['filename']\n        return None, None\n\n    ##\n    # S3\n    ##\n\n    def upload_to_s3(self, source_path, bucket_name, disable_progress=False):\n        r\"\"\"\n        Given a file, upload it to S3.\n        Credentials should be stored in environment variables or ~/.aws/credentials (%USERPROFILE%\\.aws\\credentials on Windows).\n\n        Returns True on success, false on failure.\n\n        \"\"\"\n        try:\n            self.s3_client.head_bucket(Bucket=bucket_name)\n        except botocore.exceptions.ClientError:\n            # This is really stupid S3 quirk. Technically, us-east-1 one has no S3,\n            # it's actually \"US Standard\", or something.\n            # More here: https://github.com/boto/boto3/issues/125\n            if self.aws_region == 'us-east-1':\n                self.s3_client.create_bucket(\n                    Bucket=bucket_name,\n                )\n            else:\n                self.s3_client.create_bucket(\n                    Bucket=bucket_name,\n                    CreateBucketConfiguration={'LocationConstraint': self.aws_region},\n                )\n\n            if self.tags:\n                tags = {\n                    'TagSet': [{'Key': key, 'Value': self.tags[key]} for key in self.tags.keys()]\n                }\n                self.s3_client.put_bucket_tagging(Bucket=bucket_name, Tagging=tags)\n\n        if not os.path.isfile(source_path) or os.stat(source_path).st_size == 0:\n            print(\"Problem with source file {}\".format(source_path))\n            return False\n\n        dest_path = os.path.split(source_path)[1]\n        try:\n            source_size = os.stat(source_path).st_size\n            print(\"Uploading {0} ({1})..\".format(dest_path, human_size(source_size)))\n            progress = tqdm(total=float(os.path.getsize(source_path)), unit_scale=True, unit='B', disable=disable_progress)\n\n            # Attempt to upload to S3 using the S3 meta client with the progress bar.\n            # If we're unable to do that, try one more time using a session client,\n            # which cannot use the progress bar.\n            # Related: https://github.com/boto/boto3/issues/611\n            try:\n                self.s3_client.upload_file(\n                    source_path, bucket_name, dest_path,\n                    Callback=progress.update\n                )\n            except Exception as e:  # pragma: no cover\n                self.s3_client.upload_file(source_path, bucket_name, dest_path)\n\n            progress.close()\n        except (KeyboardInterrupt, SystemExit):  # pragma: no cover\n            raise\n        except Exception as e:  # pragma: no cover\n            print(e)\n            return False\n        return True\n\n    def copy_on_s3(self, src_file_name, dst_file_name, bucket_name):\n        \"\"\"\n        Copies src file to destination within a bucket.\n        \"\"\"\n        try:\n            self.s3_client.head_bucket(Bucket=bucket_name)\n        except botocore.exceptions.ClientError as e:  # pragma: no cover\n            # If a client error is thrown, then check that it was a 404 error.\n            # If it was a 404 error, then the bucket does not exist.\n            error_code = int(e.response['Error']['Code'])\n            if error_code == 404:\n                return False\n\n        copy_src = {\n            \"Bucket\": bucket_name,\n            \"Key\": src_file_name\n        }\n        try:\n            self.s3_client.copy(\n                CopySource=copy_src,\n                Bucket=bucket_name,\n                Key=dst_file_name\n            )\n            return True\n        except botocore.exceptions.ClientError:  # pragma: no cover\n            return False\n\n    def remove_from_s3(self, file_name, bucket_name):\n        \"\"\"\n        Given a file name and a bucket, remove it from S3.\n\n        There's no reason to keep the file hosted on S3 once its been made into a Lambda function, so we can delete it from S3.\n\n        Returns True on success, False on failure.\n\n        \"\"\"\n        try:\n            self.s3_client.head_bucket(Bucket=bucket_name)\n        except botocore.exceptions.ClientError as e:  # pragma: no cover\n            # If a client error is thrown, then check that it was a 404 error.\n            # If it was a 404 error, then the bucket does not exist.\n            error_code = int(e.response['Error']['Code'])\n            if error_code == 404:\n                return False\n\n        try:\n            self.s3_client.delete_object(Bucket=bucket_name, Key=file_name)\n            return True\n        except (botocore.exceptions.ParamValidationError, botocore.exceptions.ClientError):  # pragma: no cover\n            return False\n\n    ##\n    # Lambda\n    ##\n\n    def create_lambda_function( self,\n                                bucket=None,\n                                function_name=None,\n                                handler=None,\n                                s3_key=None,\n                                description='Zappa Deployment',\n                                timeout=30,\n                                memory_size=512,\n                                publish=True,\n                                vpc_config=None,\n                                dead_letter_config=None,\n                                runtime='python3.6',\n                                aws_environment_variables=None,\n                                aws_kms_key_arn=None,\n                                xray_tracing=False,\n                                local_zip=None,\n                                use_alb=False,\n                                layers=None,\n                                concurrency=None,\n                            ):\n        \"\"\"\n        Given a bucket and key (or a local path) of a valid Lambda-zip, a function name and a handler, register that Lambda function.\n        \"\"\"\n        if not vpc_config:\n            vpc_config = {}\n        if not dead_letter_config:\n            dead_letter_config = {}\n        if not self.credentials_arn:\n            self.get_credentials_arn()\n        if not aws_environment_variables:\n            aws_environment_variables = {}\n        if not aws_kms_key_arn:\n            aws_kms_key_arn = ''\n        if not layers:\n            layers = []\n\n        kwargs = dict(\n            FunctionName=function_name,\n            Runtime=runtime,\n            Role=self.credentials_arn,\n            Handler=handler,\n            Description=description,\n            Timeout=timeout,\n            MemorySize=memory_size,\n            Publish=publish,\n            VpcConfig=vpc_config,\n            DeadLetterConfig=dead_letter_config,\n            Environment={'Variables': aws_environment_variables},\n            KMSKeyArn=aws_kms_key_arn,\n            TracingConfig={\n                'Mode': 'Active' if self.xray_tracing else 'PassThrough'\n            },\n            Layers=layers\n        )\n        if local_zip:\n            kwargs['Code'] = {\n                'ZipFile': local_zip\n            }\n        else:\n            kwargs['Code'] = {\n                'S3Bucket': bucket,\n                'S3Key': s3_key\n            }\n\n        response = self.lambda_client.create_function(**kwargs)\n        resource_arn = response['FunctionArn']\n        version = response['Version']\n\n        # If we're using an ALB, let's create an alias mapped to the newly\n        # created function. This allows clean, no downtime association when\n        # using application load balancers as an event source.\n        # See: https://github.com/Miserlou/Zappa/pull/1730\n        #      https://github.com/Miserlou/Zappa/issues/1823\n        if use_alb:\n            self.lambda_client.create_alias(\n                FunctionName=resource_arn,\n                FunctionVersion=version,\n                Name=ALB_LAMBDA_ALIAS,\n            )\n\n        if self.tags:\n            self.lambda_client.tag_resource(Resource=resource_arn, Tags=self.tags)\n\n        if concurrency is not None:\n            self.lambda_client.put_function_concurrency(\n                FunctionName=resource_arn,\n                ReservedConcurrentExecutions=concurrency,\n            )\n\n        return resource_arn\n\n    def update_lambda_function(self, bucket, function_name, s3_key=None, publish=True, local_zip=None, num_revisions=None, concurrency=None):\n        \"\"\"\n        Given a bucket and key (or a local path) of a valid Lambda-zip, a function name and a handler, update that Lambda function's code.\n        Optionally, delete previous versions if they exceed the optional limit.\n        \"\"\"\n        print(\"Updating Lambda function code..\")\n\n        kwargs = dict(\n            FunctionName=function_name,\n            Publish=publish\n        )\n        if local_zip:\n            kwargs['ZipFile'] = local_zip\n        else:\n            kwargs['S3Bucket'] = bucket\n            kwargs['S3Key'] = s3_key\n\n        response = self.lambda_client.update_function_code(**kwargs)\n        resource_arn = response['FunctionArn']\n        version = response['Version']\n\n        # If the lambda has an ALB alias, let's update the alias\n        # to point to the newest version of the function. We have to use a GET\n        # here, as there's no HEAD-esque call to retrieve metadata about a\n        # function alias.\n        # Related: https://github.com/Miserlou/Zappa/pull/1730\n        #          https://github.com/Miserlou/Zappa/issues/1823\n        try:\n            response = self.lambda_client.get_alias(\n                FunctionName=function_name,\n                Name=ALB_LAMBDA_ALIAS,\n            )\n            alias_exists = True\n        except botocore.exceptions.ClientError as e:  # pragma: no cover\n            if \"ResourceNotFoundException\" not in e.response[\"Error\"][\"Code\"]:\n                raise e\n            alias_exists = False\n\n        if alias_exists:\n            self.lambda_client.update_alias(\n                FunctionName=function_name,\n                FunctionVersion=version,\n                Name=ALB_LAMBDA_ALIAS,\n            )\n\n        if concurrency is not None:\n            self.lambda_client.put_function_concurrency(\n                FunctionName=function_name,\n                ReservedConcurrentExecutions=concurrency,\n            )\n        else:\n            self.lambda_client.delete_function_concurrency(\n                FunctionName=function_name\n            )\n\n        if num_revisions:\n            # Find the existing revision IDs for the given function\n            # Related: https://github.com/Miserlou/Zappa/issues/1402\n            versions_in_lambda = []\n            versions = self.lambda_client.list_versions_by_function(FunctionName=function_name)\n            for version in versions['Versions']:\n                versions_in_lambda.append(version['Version'])\n            while 'NextMarker' in versions:\n                versions = self.lambda_client.list_versions_by_function(FunctionName=function_name,Marker=versions['NextMarker'])\n                for version in versions['Versions']:\n                    versions_in_lambda.append(version['Version'])\n            versions_in_lambda.remove('$LATEST')\n            # Delete older revisions if their number exceeds the specified limit\n            for version in versions_in_lambda[::-1][num_revisions:]:\n                self.lambda_client.delete_function(FunctionName=function_name,Qualifier=version)\n\n        return resource_arn\n\n    def update_lambda_configuration(    self,\n                                        lambda_arn,\n                                        function_name,\n                                        handler,\n                                        description='Zappa Deployment',\n                                        timeout=30,\n                                        memory_size=512,\n                                        publish=True,\n                                        vpc_config=None,\n                                        runtime='python3.6',\n                                        aws_environment_variables=None,\n                                        aws_kms_key_arn=None,\n                                        layers=None\n                                    ):\n        \"\"\"\n        Given an existing function ARN, update the configuration variables.\n        \"\"\"\n        print(\"Updating Lambda function configuration..\")\n\n        if not vpc_config:\n            vpc_config = {}\n        if not self.credentials_arn:\n            self.get_credentials_arn()\n        if not aws_kms_key_arn:\n            aws_kms_key_arn = ''\n        if not aws_environment_variables:\n            aws_environment_variables = {}\n        if not layers:\n            layers = []\n\n        # Check if there are any remote aws lambda env vars so they don't get trashed.\n        # https://github.com/Miserlou/Zappa/issues/987,  Related: https://github.com/Miserlou/Zappa/issues/765\n        lambda_aws_config = self.lambda_client.get_function_configuration(FunctionName=function_name)\n        if \"Environment\" in lambda_aws_config:\n            lambda_aws_environment_variables = lambda_aws_config[\"Environment\"].get(\"Variables\", {})\n            # Append keys that are remote but not in settings file\n            for key, value in lambda_aws_environment_variables.items():\n                if key not in aws_environment_variables:\n                    aws_environment_variables[key] = value\n\n        response = self.lambda_client.update_function_configuration(\n            FunctionName=function_name,\n            Runtime=runtime,\n            Role=self.credentials_arn,\n            Handler=handler,\n            Description=description,\n            Timeout=timeout,\n            MemorySize=memory_size,\n            VpcConfig=vpc_config,\n            Environment={'Variables': aws_environment_variables},\n            KMSKeyArn=aws_kms_key_arn,\n            TracingConfig={\n                'Mode': 'Active' if self.xray_tracing else 'PassThrough'\n            },\n            Layers=layers\n        )\n\n        resource_arn = response['FunctionArn']\n\n        if self.tags:\n            self.lambda_client.tag_resource(Resource=resource_arn, Tags=self.tags)\n\n        return resource_arn\n\n    def invoke_lambda_function( self,\n                                function_name,\n                                payload,\n                                invocation_type='Event',\n                                log_type='Tail',\n                                client_context=None,\n                                qualifier=None\n                            ):\n        \"\"\"\n        Directly invoke a named Lambda function with a payload.\n        Returns the response.\n        \"\"\"\n        return self.lambda_client.invoke(\n            FunctionName=function_name,\n            InvocationType=invocation_type,\n            LogType=log_type,\n            Payload=payload\n        )\n\n    def rollback_lambda_function_version(self, function_name, versions_back=1, publish=True):\n        \"\"\"\n        Rollback the lambda function code 'versions_back' number of revisions.\n\n        Returns the Function ARN.\n        \"\"\"\n        response = self.lambda_client.list_versions_by_function(FunctionName=function_name)\n\n        # Take into account $LATEST\n        if len(response['Versions']) < versions_back + 1:\n            print(\"We do not have {} revisions. Aborting\".format(str(versions_back)))\n            return False\n\n        revisions = [int(revision['Version']) for revision in response['Versions'] if revision['Version'] != '$LATEST']\n        revisions.sort(reverse=True)\n\n        response = self.lambda_client.get_function(FunctionName='function:{}:{}'.format(function_name, revisions[versions_back]))\n        response = requests.get(response['Code']['Location'])\n\n        if response.status_code != 200:\n            print(\"Failed to get version {} of {} code\".format(versions_back, function_name))\n            return False\n\n        response = self.lambda_client.update_function_code(FunctionName=function_name, ZipFile=response.content, Publish=publish)  # pragma: no cover\n\n        return response['FunctionArn']\n\n    def get_lambda_function(self, function_name):\n        \"\"\"\n        Returns the lambda function ARN, given a name\n\n        This requires the \"lambda:GetFunction\" role.\n        \"\"\"\n        response = self.lambda_client.get_function(\n                FunctionName=function_name)\n        return response['Configuration']['FunctionArn']\n\n    def get_lambda_function_versions(self, function_name):\n        \"\"\"\n        Simply returns the versions available for a Lambda function, given a function name.\n\n        \"\"\"\n        try:\n            response = self.lambda_client.list_versions_by_function(\n                FunctionName=function_name\n            )\n            return response.get('Versions', [])\n        except Exception:\n            return []\n\n    def delete_lambda_function(self, function_name):\n        \"\"\"\n        Given a function name, delete it from AWS Lambda.\n\n        Returns the response.\n\n        \"\"\"\n        print(\"Deleting Lambda function..\")\n\n        return self.lambda_client.delete_function(\n            FunctionName=function_name,\n        )\n\n    ##\n    # Application load balancer\n    ##\n\n    def deploy_lambda_alb(  self,\n                            lambda_arn,\n                            lambda_name,\n                            alb_vpc_config,\n                            timeout\n                         ):\n        \"\"\"\n        The `zappa deploy` functionality for ALB infrastructure.\n        \"\"\"\n        if not alb_vpc_config:\n            raise EnvironmentError('When creating an ALB, alb_vpc_config must be filled out in zappa_settings.')\n        if 'SubnetIds' not in alb_vpc_config:\n            raise EnvironmentError('When creating an ALB, you must supply two subnets in different availability zones.')\n        if 'SecurityGroupIds' not in alb_vpc_config:\n            alb_vpc_config[\"SecurityGroupIds\"] = []\n        if not alb_vpc_config.get('CertificateArn'):\n            raise EnvironmentError('When creating an ALB, you must supply a CertificateArn for the HTTPS listener.')\n\n        # Related: https://github.com/Miserlou/Zappa/issues/1856\n        if 'Scheme' not in alb_vpc_config:\n            alb_vpc_config[\"Scheme\"] = \"internet-facing\"\n        print(\"Deploying ALB infrastructure...\")\n\n        # Create load balancer\n        # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_load_balancer\n        kwargs = dict(\n            Name=lambda_name,\n            Subnets=alb_vpc_config[\"SubnetIds\"],\n            SecurityGroups=alb_vpc_config[\"SecurityGroupIds\"],\n            Scheme=alb_vpc_config[\"Scheme\"],\n            # TODO: Tags might be a useful means of stock-keeping zappa-generated assets.\n            #Tags=[],\n            Type=\"application\",\n            # TODO: can be ipv4 or dualstack (for ipv4 and ipv6) ipv4 is required for internal Scheme.\n            IpAddressType=\"ipv4\"\n        )\n        response = self.elbv2_client.create_load_balancer(**kwargs)\n        if not(response[\"LoadBalancers\"]) or len(response[\"LoadBalancers\"]) != 1:\n            raise EnvironmentError(\"Failure to create application load balancer. Response was in unexpected format. Response was: {}\".format(repr(response)))\n        if response[\"LoadBalancers\"][0]['State']['Code'] == 'failed':\n            raise EnvironmentError(\"Failure to create application load balancer. Response reported a failed state: {}\".format(response[\"LoadBalancers\"][0]['State']['Reason']))\n        load_balancer_arn = response[\"LoadBalancers\"][0][\"LoadBalancerArn\"]\n        load_balancer_dns = response[\"LoadBalancers\"][0][\"DNSName\"]\n        load_balancer_vpc = response[\"LoadBalancers\"][0][\"VpcId\"]\n        waiter = self.elbv2_client.get_waiter('load_balancer_available')\n        print('Waiting for load balancer [{}] to become active..'.format(load_balancer_arn))\n        waiter.wait(LoadBalancerArns=[load_balancer_arn], WaiterConfig={\"Delay\": 3})\n\n        # Match the lambda timeout on the load balancer.\n        self.elbv2_client.modify_load_balancer_attributes(\n            LoadBalancerArn=load_balancer_arn,\n            Attributes=[{\n                'Key': 'idle_timeout.timeout_seconds',\n                'Value': str(timeout)\n            }]\n        )\n\n        # Create/associate target group.\n        # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_target_group\n        kwargs = dict(\n            Name=lambda_name,\n            TargetType=\"lambda\",\n            # TODO: Add options for health checks\n        )\n\n        response = self.elbv2_client.create_target_group(**kwargs)\n        if not(response[\"TargetGroups\"]) or len(response[\"TargetGroups\"]) != 1:\n            raise EnvironmentError(\"Failure to create application load balancer target group. Response was in unexpected format. Response was: {}\".format(repr(response)))\n        target_group_arn = response[\"TargetGroups\"][0][\"TargetGroupArn\"]\n\n        # Enable multi-value headers by default.\n        response = self.elbv2_client.modify_target_group_attributes(\n            TargetGroupArn=target_group_arn,\n            Attributes=[\n                {\n                    'Key': 'lambda.multi_value_headers.enabled',\n                    'Value': 'true'\n                },\n            ]\n        )\n\n        # Allow execute permissions from target group to lambda.\n        # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.add_permission\n        kwargs = dict(\n            Action=\"lambda:InvokeFunction\",\n            FunctionName=\"{}:{}\".format(lambda_arn, ALB_LAMBDA_ALIAS),\n            Principal=\"elasticloadbalancing.amazonaws.com\",\n            SourceArn=target_group_arn,\n            StatementId=lambda_name\n        )\n        response = self.lambda_client.add_permission(**kwargs)\n\n        # Register target group to lambda association.\n        # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.register_targets\n        kwargs = dict(\n            TargetGroupArn=target_group_arn,\n            Targets=[{\"Id\": \"{}:{}\".format(lambda_arn, ALB_LAMBDA_ALIAS)}]\n        )\n        response = self.elbv2_client.register_targets(**kwargs)\n\n        # Bind listener to load balancer with default rule to target group.\n        # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_listener\n        kwargs = dict(\n            # TODO: Listeners support custom ssl certificates (Certificates). For now we leave this default.\n            Certificates=[{\"CertificateArn\": alb_vpc_config['CertificateArn']}],\n            DefaultActions=[{\n                \"Type\": \"forward\",\n                \"TargetGroupArn\": target_group_arn,\n            }],\n            LoadBalancerArn=load_balancer_arn,\n            Protocol=\"HTTPS\",\n            # TODO: Add option for custom ports\n            Port=443,\n            # TODO: Listeners support custom ssl security policy (SslPolicy). For now we leave this default.\n        )\n        response = self.elbv2_client.create_listener(**kwargs)\n        print(\"ALB created with DNS: {}\".format(load_balancer_dns))\n        print(\"Note it may take several minutes for load balancer to become available.\")\n\n    def undeploy_lambda_alb(self, lambda_name):\n        \"\"\"\n        The `zappa undeploy` functionality for ALB infrastructure.\n        \"\"\"\n        print(\"Undeploying ALB infrastructure...\")\n\n        # Locate and delete alb/lambda permissions\n        try:\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.remove_permission\n            self.lambda_client.remove_permission(\n                FunctionName=lambda_name,\n                StatementId=lambda_name\n            )\n        except botocore.exceptions.ClientError as e: # pragma: no cover\n            if \"ResourceNotFoundException\" in e.response[\"Error\"][\"Code\"]:\n                pass\n            else:\n                raise e\n\n        # Locate and delete load balancer\n        try:\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_load_balancers\n            response = self.elbv2_client.describe_load_balancers(\n                Names=[lambda_name]\n            )\n            if not(response[\"LoadBalancers\"]) or len(response[\"LoadBalancers\"]) > 1:\n                raise EnvironmentError(\"Failure to locate/delete ALB named [{}]. Response was: {}\".format(lambda_name, repr(response)))\n            load_balancer_arn = response[\"LoadBalancers\"][0][\"LoadBalancerArn\"]\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_listeners\n            response = self.elbv2_client.describe_listeners(LoadBalancerArn=load_balancer_arn)\n            if not(response[\"Listeners\"]):\n                print('No listeners found.')\n            elif len(response[\"Listeners\"]) > 1:\n                raise EnvironmentError(\"Failure to locate/delete listener for ALB named [{}]. Response was: {}\".format(lambda_name, repr(response)))\n            else:\n                listener_arn = response[\"Listeners\"][0][\"ListenerArn\"]\n                # Remove the listener. This explicit deletion of the listener seems necessary to avoid ResourceInUseExceptions when deleting target groups.\n                # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_listener\n                response = self.elbv2_client.delete_listener(ListenerArn=listener_arn)\n            # Remove the load balancer and wait for completion\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_load_balancer\n            response = self.elbv2_client.delete_load_balancer(LoadBalancerArn=load_balancer_arn)\n            waiter = self.elbv2_client.get_waiter('load_balancers_deleted')\n            print('Waiting for load balancer [{}] to be deleted..'.format(lambda_name))\n            waiter.wait(LoadBalancerArns=[load_balancer_arn], WaiterConfig={\"Delay\": 3})\n        except botocore.exceptions.ClientError as e: # pragma: no cover\n            print(e.response[\"Error\"][\"Code\"])\n            if \"LoadBalancerNotFound\" in e.response[\"Error\"][\"Code\"]:\n                pass\n            else:\n                raise e\n\n        # Locate and delete target group\n        try:\n            # Locate the lambda ARN\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.get_function\n            response = self.lambda_client.get_function(FunctionName=lambda_name)\n            lambda_arn = response[\"Configuration\"][\"FunctionArn\"]\n            # Locate the target group ARN\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_target_groups\n            response = self.elbv2_client.describe_target_groups(Names=[lambda_name])\n            if not(response[\"TargetGroups\"]) or len(response[\"TargetGroups\"]) > 1:\n                raise EnvironmentError(\"Failure to locate/delete ALB target group named [{}]. Response was: {}\".format(lambda_name, repr(response)))\n            target_group_arn = response[\"TargetGroups\"][0][\"TargetGroupArn\"]\n            # Deregister targets and wait for completion\n            self.elbv2_client.deregister_targets(\n                TargetGroupArn=target_group_arn,\n                Targets=[{\"Id\": lambda_arn}]\n            )\n            waiter = self.elbv2_client.get_waiter('target_deregistered')\n            print('Waiting for target [{}] to be deregistered...'.format(lambda_name))\n            waiter.wait(\n                TargetGroupArn=target_group_arn,\n                Targets=[{\"Id\": lambda_arn}],\n                WaiterConfig={\"Delay\": 3}\n            )\n            # Remove the target group\n            # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_target_group\n            self.elbv2_client.delete_target_group(TargetGroupArn=target_group_arn)\n        except botocore.exceptions.ClientError as e: # pragma: no cover\n            print(e.response[\"Error\"][\"Code\"])\n            if \"TargetGroupNotFound\" in e.response[\"Error\"][\"Code\"]:\n                pass\n            else:\n                raise e\n\n\n    ##\n    # API Gateway\n    ##\n\n    def create_api_gateway_routes(  self,\n                                    lambda_arn,\n                                    api_name=None,\n                                    api_key_required=False,\n                                    authorization_type='NONE',\n                                    authorizer=None,\n                                    cors_options=None,\n                                    description=None,\n                                    endpoint_configuration=None\n                                ):\n        \"\"\"\n        Create the API Gateway for this Zappa deployment.\n\n        Returns the new RestAPI CF resource.\n        \"\"\"\n\n        restapi = troposphere.apigateway.RestApi('Api')\n        restapi.Name = api_name or lambda_arn.split(':')[-1]\n        if not description:\n            description = 'Created automatically by Zappa.'\n        restapi.Description = description\n        endpoint_configuration = [] if endpoint_configuration is None else endpoint_configuration\n        if self.boto_session.region_name == \"us-gov-west-1\":\n            endpoint_configuration.append(\"REGIONAL\")\n        if endpoint_configuration:\n            endpoint = troposphere.apigateway.EndpointConfiguration()\n            endpoint.Types = list(set(endpoint_configuration))\n            restapi.EndpointConfiguration = endpoint\n        if self.apigateway_policy:\n            restapi.Policy = json.loads(self.apigateway_policy)\n        self.cf_template.add_resource(restapi)\n\n        root_id = troposphere.GetAtt(restapi, 'RootResourceId')\n        invocation_prefix = \"aws\" if self.boto_session.region_name != \"us-gov-west-1\" else \"aws-us-gov\"\n        invocations_uri = 'arn:' + invocation_prefix + ':apigateway:' + self.boto_session.region_name + ':lambda:path/2015-03-31/functions/' + lambda_arn + '/invocations'\n\n        ##\n        # The Resources\n        ##\n        authorizer_resource = None\n        if authorizer:\n            authorizer_lambda_arn = authorizer.get('arn', lambda_arn)\n            lambda_uri = 'arn:{invocation_prefix}:apigateway:{region_name}:lambda:path/2015-03-31/functions/{lambda_arn}/invocations'.format(\n                invocation_prefix=invocation_prefix,\n                region_name=self.boto_session.region_name,\n                lambda_arn=authorizer_lambda_arn\n            )\n            authorizer_resource = self.create_authorizer(\n                restapi, lambda_uri, authorizer\n            )\n\n        self.create_and_setup_methods(  restapi,\n                                        root_id,\n                                        api_key_required,\n                                        invocations_uri,\n                                        authorization_type,\n                                        authorizer_resource,\n                                        0\n                                        )\n\n        if cors_options:\n            self.create_and_setup_cors( restapi,\n                                        root_id,\n                                        invocations_uri,\n                                        0,\n                                        cors_options\n                                    )\n\n        resource = troposphere.apigateway.Resource('ResourceAnyPathSlashed')\n        self.cf_api_resources.append(resource.title)\n        resource.RestApiId = troposphere.Ref(restapi)\n        resource.ParentId = root_id\n        resource.PathPart = \"{proxy+}\"\n        self.cf_template.add_resource(resource)\n\n        self.create_and_setup_methods(  restapi,\n                                        resource,\n                                        api_key_required,\n                                        invocations_uri,\n                                        authorization_type,\n                                        authorizer_resource,\n                                        1\n                                    )  # pragma: no cover\n\n        if cors_options:\n            self.create_and_setup_cors( restapi,\n                                        resource,\n                                        invocations_uri,\n                                        1,\n                                        cors_options\n                                    )  # pragma: no cover\n        return restapi\n\n    def create_authorizer(self, restapi, uri, authorizer):\n        \"\"\"\n        Create Authorizer for API gateway\n        \"\"\"\n        authorizer_type = authorizer.get(\"type\", \"TOKEN\").upper()\n        identity_validation_expression = authorizer.get('validation_expression', None)\n\n        authorizer_resource = troposphere.apigateway.Authorizer(\"Authorizer\")\n        authorizer_resource.RestApiId = troposphere.Ref(restapi)\n        authorizer_resource.Name = authorizer.get(\"name\", \"ZappaAuthorizer\")\n        authorizer_resource.Type = authorizer_type\n        authorizer_resource.AuthorizerUri = uri\n        authorizer_resource.IdentitySource = \"method.request.header.%s\" % authorizer.get('token_header', 'Authorization')\n        if identity_validation_expression:\n            authorizer_resource.IdentityValidationExpression = identity_validation_expression\n\n        if authorizer_type == 'TOKEN':\n            if not self.credentials_arn:\n                self.get_credentials_arn()\n            authorizer_resource.AuthorizerResultTtlInSeconds = authorizer.get('result_ttl', 300)\n            authorizer_resource.AuthorizerCredentials = self.credentials_arn\n        if authorizer_type == 'COGNITO_USER_POOLS':\n            authorizer_resource.ProviderARNs = authorizer.get('provider_arns')\n\n        self.cf_api_resources.append(authorizer_resource.title)\n        self.cf_template.add_resource(authorizer_resource)\n\n        return authorizer_resource\n\n    def create_and_setup_methods(\n                                    self,\n                                    restapi,\n                                    resource,\n                                    api_key_required,\n                                    uri,\n                                    authorization_type,\n                                    authorizer_resource,\n                                    depth\n                                ):\n        \"\"\"\n        Set up the methods, integration responses and method responses for a given API Gateway resource.\n        \"\"\"\n        for method_name in self.http_methods:\n            method = troposphere.apigateway.Method(method_name + str(depth))\n            method.RestApiId = troposphere.Ref(restapi)\n            if type(resource) is troposphere.apigateway.Resource:\n                method.ResourceId = troposphere.Ref(resource)\n            else:\n                method.ResourceId = resource\n            method.HttpMethod = method_name.upper()\n            method.AuthorizationType = authorization_type\n            if authorizer_resource:\n                method.AuthorizerId = troposphere.Ref(authorizer_resource)\n            method.ApiKeyRequired = api_key_required\n            method.MethodResponses = []\n            self.cf_template.add_resource(method)\n            self.cf_api_resources.append(method.title)\n\n            if not self.credentials_arn:\n                self.get_credentials_arn()\n            credentials = self.credentials_arn  # This must be a Role ARN\n\n            integration = troposphere.apigateway.Integration()\n            integration.CacheKeyParameters = []\n            integration.CacheNamespace = 'none'\n            integration.Credentials = credentials\n            integration.IntegrationHttpMethod = 'POST'\n            integration.IntegrationResponses = []\n            integration.PassthroughBehavior = 'NEVER'\n            integration.Type = 'AWS_PROXY'\n            integration.Uri = uri\n            method.Integration = integration\n\n    def create_and_setup_cors(self, restapi, resource, uri, depth, config):\n        \"\"\"\n        Set up the methods, integration responses and method responses for a given API Gateway resource.\n        \"\"\"\n        if config is True:\n            config = {}\n        method_name = \"OPTIONS\"\n        method = troposphere.apigateway.Method(method_name + str(depth))\n        method.RestApiId = troposphere.Ref(restapi)\n        if type(resource) is troposphere.apigateway.Resource:\n            method.ResourceId = troposphere.Ref(resource)\n        else:\n            method.ResourceId = resource\n        method.HttpMethod = method_name.upper()\n        method.AuthorizationType = \"NONE\"\n        method_response = troposphere.apigateway.MethodResponse()\n        method_response.ResponseModels = {\n            \"application/json\": \"Empty\"\n        }\n        response_headers = {\n            \"Access-Control-Allow-Headers\": \"'%s'\" % \",\".join(config.get(\n                \"allowed_headers\", [\"Content-Type\", \"X-Amz-Date\",\n                                    \"Authorization\", \"X-Api-Key\",\n                                    \"X-Amz-Security-Token\"])),\n            \"Access-Control-Allow-Methods\": \"'%s'\" % \",\".join(config.get(\n                \"allowed_methods\", [\"DELETE\", \"GET\", \"HEAD\", \"OPTIONS\", \"PATCH\", \"POST\", \"PUT\"])),\n            \"Access-Control-Allow-Origin\": \"'%s'\" % config.get(\n                \"allowed_origin\", \"*\")\n        }\n        method_response.ResponseParameters = {\n            \"method.response.header.%s\" % key: True for key in response_headers\n        }\n        method_response.StatusCode = \"200\"\n        method.MethodResponses = [\n            method_response\n        ]\n        self.cf_template.add_resource(method)\n        self.cf_api_resources.append(method.title)\n\n        integration = troposphere.apigateway.Integration()\n        integration.Type = 'MOCK'\n        integration.PassthroughBehavior = 'NEVER'\n        integration.RequestTemplates = {\n            \"application/json\": \"{\\\"statusCode\\\": 200}\"\n        }\n        integration_response = troposphere.apigateway.IntegrationResponse()\n        integration_response.ResponseParameters = {\n            \"method.response.header.%s\" % key: value for key, value in response_headers.items()\n        }\n        integration_response.ResponseTemplates = {\n            \"application/json\": \"\"\n        }\n        integration_response.StatusCode = \"200\"\n        integration.IntegrationResponses = [\n            integration_response\n        ]\n\n        integration.Uri = uri\n        method.Integration = integration\n\n    def deploy_api_gateway( self,\n                            api_id,\n                            stage_name,\n                            stage_description=\"\",\n                            description=\"\",\n                            cache_cluster_enabled=False,\n                            cache_cluster_size='0.5',\n                            variables=None,\n                            cloudwatch_log_level='OFF',\n                            cloudwatch_data_trace=False,\n                            cloudwatch_metrics_enabled=False,\n                            cache_cluster_ttl=300,\n                            cache_cluster_encrypted=False\n                        ):\n        \"\"\"\n        Deploy the API Gateway!\n\n        Return the deployed API URL.\n        \"\"\"\n        print(\"Deploying API Gateway..\")\n\n        self.apigateway_client.create_deployment(\n            restApiId=api_id,\n            stageName=stage_name,\n            stageDescription=stage_description,\n            description=description,\n            cacheClusterEnabled=cache_cluster_enabled,\n            cacheClusterSize=cache_cluster_size,\n            variables=variables or {}\n        )\n\n        if cloudwatch_log_level not in self.cloudwatch_log_levels:\n            cloudwatch_log_level = 'OFF'\n\n        self.apigateway_client.update_stage(\n            restApiId=api_id,\n            stageName=stage_name,\n            patchOperations=[\n                self.get_patch_op('logging/loglevel', cloudwatch_log_level),\n                self.get_patch_op('logging/dataTrace', cloudwatch_data_trace),\n                self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled),\n                self.get_patch_op('caching/ttlInSeconds', str(cache_cluster_ttl)),\n                self.get_patch_op('caching/dataEncrypted', cache_cluster_encrypted)\n            ]\n        )\n\n        return \"https://{}.execute-api.{}.amazonaws.com/{}\".format(api_id, self.boto_session.region_name, stage_name)\n\n    def add_binary_support(self, api_id, cors=False):\n            \"\"\"\n            Add binary support\n            \"\"\"\n            response = self.apigateway_client.get_rest_api(\n                restApiId=api_id\n            )\n            if \"binaryMediaTypes\" not in response or \"*/*\" not in response[\"binaryMediaTypes\"]:\n                self.apigateway_client.update_rest_api(\n                    restApiId=api_id,\n                    patchOperations=[\n                        {\n                            'op': \"add\",\n                            'path': '/binaryMediaTypes/*~1*'\n                        }\n                    ]\n                )\n\n            if cors:\n                # fix for issue 699 and 1035, cors+binary support don't work together\n                # go through each resource and update the contentHandling type\n                response = self.apigateway_client.get_resources(restApiId=api_id)\n                resource_ids = [\n                    item['id'] for item in response['items']\n                    if 'OPTIONS' in item.get('resourceMethods', {})\n                ]\n\n                for resource_id in resource_ids:\n                    self.apigateway_client.update_integration(\n                        restApiId=api_id,\n                        resourceId=resource_id,\n                        httpMethod='OPTIONS',\n                        patchOperations=[\n                            {\n                                \"op\": \"replace\",\n                                \"path\": \"/contentHandling\",\n                                \"value\": \"CONVERT_TO_TEXT\"\n                            }\n                        ]\n                    )\n\n    def remove_binary_support(self, api_id, cors=False):\n        \"\"\"\n        Remove binary support\n        \"\"\"\n        response = self.apigateway_client.get_rest_api(\n            restApiId=api_id\n        )\n        if \"binaryMediaTypes\" in response and \"*/*\" in response[\"binaryMediaTypes\"]:\n            self.apigateway_client.update_rest_api(\n                restApiId=api_id,\n                patchOperations=[\n                    {\n                        'op': 'remove',\n                        'path': '/binaryMediaTypes/*~1*'\n                    }\n                ]\n            )\n        if cors:\n            # go through each resource and change the contentHandling type\n            response = self.apigateway_client.get_resources(restApiId=api_id)\n            resource_ids = [\n                item['id'] for item in response['items']\n                if 'OPTIONS' in item.get('resourceMethods', {})\n            ]\n\n            for resource_id in resource_ids:\n                self.apigateway_client.update_integration(\n                    restApiId=api_id,\n                    resourceId=resource_id,\n                    httpMethod='OPTIONS',\n                    patchOperations=[\n                        {\n                            \"op\": \"replace\",\n                            \"path\": \"/contentHandling\",\n                            \"value\": \"\"\n                        }\n                    ]\n                )\n\n    def add_api_compression(self, api_id, min_compression_size):\n        \"\"\"\n        Add Rest API compression\n        \"\"\"\n        self.apigateway_client.update_rest_api(\n            restApiId=api_id,\n            patchOperations=[\n                {\n                    'op': 'replace',\n                    'path': '/minimumCompressionSize',\n                    'value': str(min_compression_size)\n                }\n            ]\n        )\n\n    def remove_api_compression(self, api_id):\n        \"\"\"\n        Remove Rest API compression\n        \"\"\"\n        self.apigateway_client.update_rest_api(\n            restApiId=api_id,\n            patchOperations=[\n                {\n                    'op': 'replace',\n                    'path': '/minimumCompressionSize',\n                }\n            ]\n        )\n\n    def get_api_keys(self, api_id, stage_name):\n        \"\"\"\n        Generator that allows to iterate per API keys associated to an api_id and a stage_name.\n        \"\"\"\n        response = self.apigateway_client.get_api_keys(limit=500)\n        stage_key = '{}/{}'.format(api_id, stage_name)\n        for api_key in response.get('items'):\n            if stage_key in api_key.get('stageKeys'):\n                yield api_key.get('id')\n\n    def create_api_key(self, api_id, stage_name):\n        \"\"\"\n        Create new API key and link it with an api_id and a stage_name\n        \"\"\"\n        response = self.apigateway_client.create_api_key(\n            name='{}_{}'.format(stage_name, api_id),\n            description='Api Key for {}'.format(api_id),\n            enabled=True,\n            stageKeys=[\n                {\n                    'restApiId': '{}'.format(api_id),\n                    'stageName': '{}'.format(stage_name)\n                },\n            ]\n        )\n        print('Created a new x-api-key: {}'.format(response['id']))\n\n    def remove_api_key(self, api_id, stage_name):\n        \"\"\"\n        Remove a generated API key for api_id and stage_name\n        \"\"\"\n        response = self.apigateway_client.get_api_keys(\n            limit=1,\n            nameQuery='{}_{}'.format(stage_name, api_id)\n        )\n        for api_key in response.get('items'):\n            self.apigateway_client.delete_api_key(\n                apiKey=\"{}\".format(api_key['id'])\n            )\n\n    def add_api_stage_to_api_key(self, api_key, api_id, stage_name):\n        \"\"\"\n        Add api stage to Api key\n        \"\"\"\n        self.apigateway_client.update_api_key(\n            apiKey=api_key,\n            patchOperations=[\n                {\n                    'op': 'add',\n                    'path': '/stages',\n                    'value': '{}/{}'.format(api_id, stage_name)\n                }\n            ]\n        )\n\n    def get_patch_op(self, keypath, value, op='replace'):\n        \"\"\"\n        Return an object that describes a change of configuration on the given staging.\n        Setting will be applied on all available HTTP methods.\n        \"\"\"\n        if isinstance(value, bool):\n            value = str(value).lower()\n        return {'op': op, 'path': '/*/*/{}'.format(keypath), 'value': value}\n\n    def get_rest_apis(self, project_name):\n        \"\"\"\n        Generator that allows to iterate per every available apis.\n        \"\"\"\n        all_apis = self.apigateway_client.get_rest_apis(\n            limit=500\n        )\n\n        for api in all_apis['items']:\n            if api['name'] != project_name:\n                continue\n            yield api\n\n    def undeploy_api_gateway(self, lambda_name, domain_name=None, base_path=None):\n        \"\"\"\n        Delete a deployed REST API Gateway.\n        \"\"\"\n        print(\"Deleting API Gateway..\")\n\n        api_id = self.get_api_id(lambda_name)\n\n        if domain_name:\n\n            # XXX - Remove Route53 smartly here?\n            # XXX - This doesn't raise, but doesn't work either.\n\n            try:\n                self.apigateway_client.delete_base_path_mapping(\n                    domainName=domain_name,\n                    basePath='(none)' if base_path is None else base_path\n                )\n            except Exception as e:\n                # We may not have actually set up the domain.\n                pass\n\n        was_deleted = self.delete_stack(lambda_name, wait=True)\n\n        if not was_deleted:\n            # try erasing it with the older method\n            for api in self.get_rest_apis(lambda_name):\n                self.apigateway_client.delete_rest_api(\n                    restApiId=api['id']\n                )\n\n    def update_stage_config(    self,\n                                project_name,\n                                stage_name,\n                                cloudwatch_log_level,\n                                cloudwatch_data_trace,\n                                cloudwatch_metrics_enabled\n                            ):\n        \"\"\"\n        Update CloudWatch metrics configuration.\n        \"\"\"\n        if cloudwatch_log_level not in self.cloudwatch_log_levels:\n            cloudwatch_log_level = 'OFF'\n\n        for api in self.get_rest_apis(project_name):\n            self.apigateway_client.update_stage(\n                restApiId=api['id'],\n                stageName=stage_name,\n                patchOperations=[\n                    self.get_patch_op('logging/loglevel', cloudwatch_log_level),\n                    self.get_patch_op('logging/dataTrace', cloudwatch_data_trace),\n                    self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled),\n                ]\n            )\n\n    def update_cognito(self, lambda_name, user_pool, lambda_configs, lambda_arn):\n        LambdaConfig = {}\n        for config in lambda_configs:\n            LambdaConfig[config] = lambda_arn\n        description = self.cognito_client.describe_user_pool(UserPoolId=user_pool)\n        description_kwargs = {}\n        for key, value in description['UserPool'].items():\n            if key in ('UserPoolId', 'Policies', 'AutoVerifiedAttributes', 'SmsVerificationMessage',\n                       'EmailVerificationMessage', 'EmailVerificationSubject', 'VerificationMessageTemplate',\n                       'SmsAuthenticationMessage', 'MfaConfiguration', 'DeviceConfiguration',\n                       'EmailConfiguration', 'SmsConfiguration', 'UserPoolTags',\n                       'AdminCreateUserConfig'):\n                description_kwargs[key] = value\n            elif key == 'LambdaConfig':\n                for lckey, lcvalue in value.items():\n                    if lckey in LambdaConfig:\n                        value[lckey] = LambdaConfig[lckey]\n                print(\"value\", value)\n                description_kwargs[key] = value\n        if 'LambdaConfig' not in description_kwargs:\n            description_kwargs['LambdaConfig'] = LambdaConfig\n        if 'TemporaryPasswordValidityDays' in description_kwargs['Policies']['PasswordPolicy']:\n            description_kwargs['AdminCreateUserConfig'].pop(\n                'UnusedAccountValidityDays', None)\n        if 'UnusedAccountValidityDays' in description_kwargs['AdminCreateUserConfig']:\n            description_kwargs['Policies']['PasswordPolicy']\\\n                ['TemporaryPasswordValidityDays'] = description_kwargs['AdminCreateUserConfig'].pop(\n                'UnusedAccountValidityDays', None)\n        result = self.cognito_client.update_user_pool(UserPoolId=user_pool, **description_kwargs)\n        if result['ResponseMetadata']['HTTPStatusCode'] != 200:\n            print(\"Cognito:  Failed to update user pool\", result)\n\n        # Now we need to add a policy to the IAM that allows cognito access\n        result = self.create_event_permission(lambda_name,\n                                              'cognito-idp.amazonaws.com',\n                                              'arn:aws:cognito-idp:{}:{}:userpool/{}'.\n                                              format(self.aws_region,\n                                                     self.sts_client.get_caller_identity().get('Account'),\n                                                     user_pool)\n                                              )\n        if result['ResponseMetadata']['HTTPStatusCode'] != 201:\n            print(\"Cognito:  Failed to update lambda permission\", result)\n\n    def delete_stack(self, name, wait=False):\n        \"\"\"\n        Delete the CF stack managed by Zappa.\n        \"\"\"\n        try:\n            stack = self.cf_client.describe_stacks(StackName=name)['Stacks'][0]\n        except: # pragma: no cover\n            print('No Zappa stack named {0}'.format(name))\n            return False\n\n        tags = {x['Key']:x['Value'] for x in stack['Tags']}\n        if tags.get('ZappaProject') == name:\n            self.cf_client.delete_stack(StackName=name)\n            if wait:\n                waiter = self.cf_client.get_waiter('stack_delete_complete')\n                print('Waiting for stack {0} to be deleted..'.format(name))\n                waiter.wait(StackName=name)\n            return True\n        else:\n            print('ZappaProject tag not found on {0}, doing nothing'.format(name))\n            return False\n\n    def create_stack_template(  self,\n                                lambda_arn,\n                                lambda_name,\n                                api_key_required,\n                                iam_authorization,\n                                authorizer,\n                                cors_options=None,\n                                description=None,\n                                endpoint_configuration=None\n                            ):\n        \"\"\"\n        Build the entire CF stack.\n        Just used for the API Gateway, but could be expanded in the future.\n        \"\"\"\n\n        auth_type = \"NONE\"\n        if iam_authorization and authorizer:\n            logger.warn(\"Both IAM Authorization and Authorizer are specified, this is not possible. \"\n                        \"Setting Auth method to IAM Authorization\")\n            authorizer = None\n            auth_type = \"AWS_IAM\"\n        elif iam_authorization:\n            auth_type = \"AWS_IAM\"\n        elif authorizer:\n            auth_type = authorizer.get(\"type\", \"CUSTOM\")\n\n        # build a fresh template\n        self.cf_template = troposphere.Template()\n        self.cf_template.add_description('Automatically generated with Zappa')\n        self.cf_api_resources = []\n        self.cf_parameters = {}\n\n        restapi = self.create_api_gateway_routes(\n                                            lambda_arn,\n                                            api_name=lambda_name,\n                                            api_key_required=api_key_required,\n                                            authorization_type=auth_type,\n                                            authorizer=authorizer,\n                                            cors_options=cors_options,\n                                            description=description,\n                                            endpoint_configuration=endpoint_configuration\n                                        )\n        return self.cf_template\n\n    def update_stack(self, name, working_bucket, wait=False, update_only=False, disable_progress=False):\n        \"\"\"\n        Update or create the CF stack managed by Zappa.\n        \"\"\"\n        capabilities = []\n\n        template = name + '-template-' + str(int(time.time())) + '.json'\n        with open(template, 'wb') as out:\n            out.write(bytes(self.cf_template.to_json(indent=None, separators=(',',':')), \"utf-8\"))\n\n        self.upload_to_s3(template, working_bucket, disable_progress=disable_progress)\n        if self.boto_session.region_name == \"us-gov-west-1\":\n            url = 'https://s3-us-gov-west-1.amazonaws.com/{0}/{1}'.format(working_bucket, template)\n        else:\n            url = 'https://s3.amazonaws.com/{0}/{1}'.format(working_bucket, template)\n\n        tags = [{'Key': key, 'Value': self.tags[key]}\n                for key in self.tags.keys()\n                if key != 'ZappaProject']\n        tags.append({'Key':'ZappaProject','Value':name})\n        update = True\n\n        try:\n            self.cf_client.describe_stacks(StackName=name)\n        except botocore.client.ClientError:\n            update = False\n\n        if update_only and not update:\n            print('CloudFormation stack missing, re-deploy to enable updates')\n            return\n\n        if not update:\n            self.cf_client.create_stack(StackName=name,\n                                        Capabilities=capabilities,\n                                        TemplateURL=url,\n                                        Tags=tags)\n            print('Waiting for stack {0} to create (this can take a bit)..'.format(name))\n        else:\n            try:\n                self.cf_client.update_stack(StackName=name,\n                                            Capabilities=capabilities,\n                                            TemplateURL=url,\n                                            Tags=tags)\n                print('Waiting for stack {0} to update..'.format(name))\n            except botocore.client.ClientError as e:\n                if e.response['Error']['Message'] == 'No updates are to be performed.':\n                    wait = False\n                else:\n                    raise\n\n        if wait:\n            total_resources = len(self.cf_template.resources)\n            current_resources = 0\n            sr = self.cf_client.get_paginator('list_stack_resources')\n            progress = tqdm(total=total_resources, unit='res', disable=disable_progress)\n            while True:\n                time.sleep(3)\n                result = self.cf_client.describe_stacks(StackName=name)\n                if not result['Stacks']:\n                    continue  # might need to wait a bit\n\n                if result['Stacks'][0]['StackStatus'] in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:\n                    break\n\n                # Something has gone wrong.\n                # Is raising enough? Should we also remove the Lambda function?\n                if result['Stacks'][0]['StackStatus'] in [\n                                                            'DELETE_COMPLETE',\n                                                            'DELETE_IN_PROGRESS',\n                                                            'ROLLBACK_IN_PROGRESS',\n                                                            'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS',\n                                                            'UPDATE_ROLLBACK_COMPLETE'\n                                                        ]:\n                    raise EnvironmentError(\"Stack creation failed. \"\n                                           \"Please check your CloudFormation console. \"\n                                           \"You may also need to `undeploy`.\")\n\n                count = 0\n                for result in sr.paginate(StackName=name):\n                    done = (1 for x in result['StackResourceSummaries']\n                            if 'COMPLETE' in x['ResourceStatus'])\n                    count += sum(done)\n                if count:\n                    # We can end up in a situation where we have more resources being created\n                    # than anticipated.\n                    if (count - current_resources) > 0:\n                        progress.update(count - current_resources)\n                current_resources = count\n            progress.close()\n\n        try:\n            os.remove(template)\n        except OSError:\n            pass\n\n        self.remove_from_s3(template, working_bucket)\n\n    def stack_outputs(self, name):\n        \"\"\"\n        Given a name, describes CloudFront stacks and returns dict of the stack Outputs\n        , else returns an empty dict.\n        \"\"\"\n        try:\n            stack = self.cf_client.describe_stacks(StackName=name)['Stacks'][0]\n            return {x['OutputKey']: x['OutputValue'] for x in stack['Outputs']}\n        except botocore.client.ClientError:\n            return {}\n\n\n    def get_api_url(self, lambda_name, stage_name):\n        \"\"\"\n        Given a lambda_name and stage_name, return a valid API URL.\n        \"\"\"\n        api_id = self.get_api_id(lambda_name)\n        if api_id:\n            return \"https://{}.execute-api.{}.amazonaws.com/{}\".format(api_id, self.boto_session.region_name, stage_name)\n        else:\n            return None\n\n    def get_api_id(self, lambda_name):\n        \"\"\"\n        Given a lambda_name, return the API id.\n        \"\"\"\n        try:\n            response = self.cf_client.describe_stack_resource(StackName=lambda_name,\n                                                              LogicalResourceId='Api')\n            return response['StackResourceDetail'].get('PhysicalResourceId', None)\n        except: # pragma: no cover\n            try:\n                # Try the old method (project was probably made on an older, non CF version)\n                response = self.apigateway_client.get_rest_apis(limit=500)\n\n                for item in response['items']:\n                    if item['name'] == lambda_name:\n                        return item['id']\n\n                logger.exception('Could not get API ID.')\n                return None\n            except: # pragma: no cover\n                # We don't even have an API deployed. That's okay!\n                return None\n\n    def create_domain_name(self,\n                           domain_name,\n                           certificate_name,\n                           certificate_body=None,\n                           certificate_private_key=None,\n                           certificate_chain=None,\n                           certificate_arn=None,\n                           lambda_name=None,\n                           stage=None,\n                           base_path=None):\n        \"\"\"\n        Creates the API GW domain and returns the resulting DNS name.\n        \"\"\"\n\n        # This is a Let's Encrypt or custom certificate\n        if not certificate_arn:\n            agw_response = self.apigateway_client.create_domain_name(\n                domainName=domain_name,\n                certificateName=certificate_name,\n                certificateBody=certificate_body,\n                certificatePrivateKey=certificate_private_key,\n                certificateChain=certificate_chain\n            )\n        # This is an AWS ACM-hosted Certificate\n        else:\n            agw_response = self.apigateway_client.create_domain_name(\n                domainName=domain_name,\n                certificateName=certificate_name,\n                certificateArn=certificate_arn\n            )\n\n        api_id = self.get_api_id(lambda_name)\n        if not api_id:\n            raise LookupError(\"No API URL to certify found - did you deploy?\")\n\n        self.apigateway_client.create_base_path_mapping(\n            domainName=domain_name,\n            basePath='' if base_path is None else base_path,\n            restApiId=api_id,\n            stage=stage\n        )\n\n        return agw_response['distributionDomainName']\n\n    def update_route53_records(self, domain_name, dns_name):\n        \"\"\"\n        Updates Route53 Records following GW domain creation\n        \"\"\"\n        zone_id = self.get_hosted_zone_id_for_domain(domain_name)\n\n        is_apex = self.route53.get_hosted_zone(Id=zone_id)['HostedZone']['Name'][:-1] == domain_name\n        if is_apex:\n            record_set = {\n                'Name': domain_name,\n                'Type': 'A',\n                'AliasTarget': {\n                    'HostedZoneId': 'Z2FDTNDATAQYW2', # This is a magic value that means \"CloudFront\"\n                    'DNSName': dns_name,\n                    'EvaluateTargetHealth': False\n                }\n            }\n        else:\n            record_set = {\n                'Name': domain_name,\n                'Type': 'CNAME',\n                'ResourceRecords': [\n                    {\n                        'Value': dns_name\n                    }\n                ],\n                'TTL': 60\n            }\n\n        # Related: https://github.com/boto/boto3/issues/157\n        # and: http://docs.aws.amazon.com/Route53/latest/APIReference/CreateAliasRRSAPI.html\n        # and policy: https://spin.atomicobject.com/2016/04/28/route-53-hosted-zone-managment/\n        # pure_zone_id = zone_id.split('/hostedzone/')[1]\n\n        # XXX: ClientError: An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation:\n        # Tried to create an alias that targets d1awfeji80d0k2.cloudfront.net., type A in zone Z1XWOQP59BYF6Z,\n        # but the alias target name does not lie within the target zone\n        response = self.route53.change_resource_record_sets(\n            HostedZoneId=zone_id,\n            ChangeBatch={\n                'Changes': [\n                    {\n                        'Action': 'UPSERT',\n                        'ResourceRecordSet': record_set\n                    }\n                ]\n            }\n        )\n\n        return response\n\n    def update_domain_name(self,\n                           domain_name,\n                           certificate_name=None,\n                           certificate_body=None,\n                           certificate_private_key=None,\n                           certificate_chain=None,\n                           certificate_arn=None,\n                           lambda_name=None,\n                           stage=None,\n                           route53=True,\n                           base_path=None):\n        \"\"\"\n        This updates your certificate information for an existing domain,\n        with similar arguments to boto's update_domain_name API Gateway api.\n\n        It returns the resulting new domain information including the new certificate's ARN\n        if created during this process.\n\n        Previously, this method involved downtime that could take up to 40 minutes\n        because the API Gateway api only allowed this by deleting, and then creating it.\n\n        Related issues:     https://github.com/Miserlou/Zappa/issues/590\n                            https://github.com/Miserlou/Zappa/issues/588\n                            https://github.com/Miserlou/Zappa/pull/458\n                            https://github.com/Miserlou/Zappa/issues/882\n                            https://github.com/Miserlou/Zappa/pull/883\n        \"\"\"\n\n        print(\"Updating domain name!\")\n\n        certificate_name = certificate_name + str(time.time())\n\n        api_gateway_domain = self.apigateway_client.get_domain_name(domainName=domain_name)\n        if not certificate_arn\\\n           and certificate_body and certificate_private_key and certificate_chain:\n            acm_certificate = self.acm_client.import_certificate(Certificate=certificate_body,\n                                                                 PrivateKey=certificate_private_key,\n                                                                 CertificateChain=certificate_chain)\n            certificate_arn = acm_certificate['CertificateArn']\n\n        self.update_domain_base_path_mapping(domain_name, lambda_name, stage, base_path)\n\n        return self.apigateway_client.update_domain_name(domainName=domain_name,\n                                                         patchOperations=[\n                                                             {\"op\" : \"replace\",\n                                                              \"path\" : \"/certificateName\",\n                                                              \"value\" : certificate_name},\n                                                             {\"op\" : \"replace\",\n                                                              \"path\" : \"/certificateArn\",\n                                                              \"value\" : certificate_arn}\n                                                         ])\n\n    def update_domain_base_path_mapping(self, domain_name, lambda_name, stage, base_path):\n        \"\"\"\n        Update domain base path mapping on API Gateway if it was changed\n        \"\"\"\n        api_id = self.get_api_id(lambda_name)\n        if not api_id:\n            print(\"Warning! Can't update base path mapping!\")\n            return\n        base_path_mappings = self.apigateway_client.get_base_path_mappings(domainName=domain_name)\n        found = False\n        for base_path_mapping in base_path_mappings.get('items', []):\n            if base_path_mapping['restApiId'] == api_id and base_path_mapping['stage'] == stage:\n                found = True\n                if base_path_mapping['basePath'] != base_path:\n                    self.apigateway_client.update_base_path_mapping(domainName=domain_name,\n                                                                    basePath=base_path_mapping['basePath'],\n                                                                    patchOperations=[\n                                                                        {\"op\" : \"replace\",\n                                                                         \"path\" : \"/basePath\",\n                                                                         \"value\" : '' if base_path is None else base_path}\n                                                                    ])\n        if not found:\n            self.apigateway_client.create_base_path_mapping(\n                domainName=domain_name,\n                basePath='' if base_path is None else base_path,\n                restApiId=api_id,\n                stage=stage\n            )\n\n    def get_all_zones(self):\n        \"\"\"Same behaviour of list_host_zones, but transparently handling pagination.\"\"\"\n        zones = {'HostedZones': []}\n\n        new_zones = self.route53.list_hosted_zones(MaxItems='100')\n        while new_zones['IsTruncated']:\n            zones['HostedZones'] += new_zones['HostedZones']\n            new_zones = self.route53.list_hosted_zones(Marker=new_zones['NextMarker'], MaxItems='100')\n\n        zones['HostedZones'] += new_zones['HostedZones']\n        return zones\n\n    def get_domain_name(self, domain_name, route53=True):\n        \"\"\"\n        Scan our hosted zones for the record of a given name.\n\n        Returns the record entry, else None.\n\n        \"\"\"\n        # Make sure api gateway domain is present\n        try:\n            self.apigateway_client.get_domain_name(domainName=domain_name)\n        except Exception:\n            return None\n\n        if not route53:\n            return True\n\n        try:\n            zones = self.get_all_zones()\n            for zone in zones['HostedZones']:\n                records = self.route53.list_resource_record_sets(HostedZoneId=zone['Id'])\n                for record in records['ResourceRecordSets']:\n                    if record['Type'] in ('CNAME', 'A') and record['Name'][:-1] == domain_name:\n                        return record\n\n        except Exception as e:\n            return None\n\n        ##\n        # Old, automatic logic.\n        # If re-introduced, should be moved to a new function.\n        # Related ticket: https://github.com/Miserlou/Zappa/pull/458\n        ##\n\n        # We may be in a position where Route53 doesn't have a domain, but the API Gateway does.\n        # We need to delete this before we can create the new Route53.\n        # try:\n        #     api_gateway_domain = self.apigateway_client.get_domain_name(domainName=domain_name)\n        #     self.apigateway_client.delete_domain_name(domainName=domain_name)\n        # except Exception:\n        #     pass\n\n        return None\n\n    ##\n    # IAM\n    ##\n\n    def get_credentials_arn(self):\n        \"\"\"\n        Given our role name, get and set the credentials_arn.\n\n        \"\"\"\n        role = self.iam.Role(self.role_name)\n        self.credentials_arn = role.arn\n        return role, self.credentials_arn\n\n    def create_iam_roles(self):\n        \"\"\"\n        Create and defines the IAM roles and policies necessary for Zappa.\n\n        If the IAM role already exists, it will be updated if necessary.\n        \"\"\"\n        attach_policy_obj = json.loads(self.attach_policy)\n        assume_policy_obj = json.loads(self.assume_policy)\n\n        if self.extra_permissions:\n            for permission in self.extra_permissions:\n                attach_policy_obj['Statement'].append(dict(permission))\n            self.attach_policy = json.dumps(attach_policy_obj)\n\n        updated = False\n\n        # Create the role if needed\n        try:\n            role, credentials_arn = self.get_credentials_arn()\n\n        except botocore.client.ClientError:\n            print(\"Creating \" + self.role_name + \" IAM Role..\")\n\n            role = self.iam.create_role(\n                RoleName=self.role_name,\n                AssumeRolePolicyDocument=self.assume_policy\n            )\n            self.credentials_arn = role.arn\n            updated = True\n\n        # create or update the role's policies if needed\n        policy = self.iam.RolePolicy(self.role_name, 'zappa-permissions')\n        try:\n            if policy.policy_document != attach_policy_obj:\n                print(\"Updating zappa-permissions policy on \" + self.role_name + \" IAM Role.\")\n\n                policy.put(PolicyDocument=self.attach_policy)\n                updated = True\n\n        except botocore.client.ClientError:\n            print(\"Creating zappa-permissions policy on \" + self.role_name + \" IAM Role.\")\n            policy.put(PolicyDocument=self.attach_policy)\n            updated = True\n\n        if role.assume_role_policy_document != assume_policy_obj and \\\n                set(role.assume_role_policy_document['Statement'][0]['Principal']['Service']) != set(assume_policy_obj['Statement'][0]['Principal']['Service']):\n            print(\"Updating assume role policy on \" + self.role_name + \" IAM Role.\")\n            self.iam_client.update_assume_role_policy(\n                RoleName=self.role_name,\n                PolicyDocument=self.assume_policy\n            )\n            updated = True\n\n        return self.credentials_arn, updated\n\n    def _clear_policy(self, lambda_name):\n        \"\"\"\n        Remove obsolete policy statements to prevent policy from bloating over the limit after repeated updates.\n        \"\"\"\n        try:\n            policy_response = self.lambda_client.get_policy(\n                FunctionName=lambda_name\n            )\n            if policy_response['ResponseMetadata']['HTTPStatusCode'] == 200:\n                statement = json.loads(policy_response['Policy'])['Statement']\n                for s in statement:\n                    delete_response = self.lambda_client.remove_permission(\n                        FunctionName=lambda_name,\n                        StatementId=s['Sid']\n                    )\n                    if delete_response['ResponseMetadata']['HTTPStatusCode'] != 204:\n                        logger.error('Failed to delete an obsolete policy statement: {}'.format(policy_response))\n            else:\n                logger.debug('Failed to load Lambda function policy: {}'.format(policy_response))\n        except ClientError as e:\n            if e.args[0].find('ResourceNotFoundException') > -1:\n                logger.debug('No policy found, must be first run.')\n            else:\n                logger.error('Unexpected client error {}'.format(e.args[0]))\n\n    ##\n    # CloudWatch Events\n    ##\n\n    def create_event_permission(self, lambda_name, principal, source_arn):\n        \"\"\"\n        Create permissions to link to an event.\n\n        Related: http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-configure-event-source.html\n        \"\"\"\n        logger.debug('Adding new permission to invoke Lambda function: {}'.format(lambda_name))\n        permission_response = self.lambda_client.add_permission(\n            FunctionName=lambda_name,\n            StatementId=''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(8)),\n            Action='lambda:InvokeFunction',\n            Principal=principal,\n            SourceArn=source_arn,\n        )\n\n        if permission_response['ResponseMetadata']['HTTPStatusCode'] != 201:\n            print('Problem creating permission to invoke Lambda function')\n            return None  # XXX: Raise?\n\n        return permission_response\n\n    def schedule_events(self, lambda_arn, lambda_name, events, default=True):\n        \"\"\"\n        Given a Lambda ARN, name and a list of events, schedule this as CloudWatch Events.\n\n        'events' is a list of dictionaries, where the dict must contains the string\n        of a 'function' and the string of the event 'expression', and an optional 'name' and 'description'.\n\n        Expressions can be in rate or cron format:\n            http://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html\n        \"\"\"\n\n        # The stream sources - DynamoDB, Kinesis and SQS - are working differently than the other services (pull vs push)\n        # and do not require event permissions. They do require additional permissions on the Lambda roles though.\n        # http://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html\n        pull_services = ['dynamodb', 'kinesis', 'sqs']\n\n        # XXX: Not available in Lambda yet.\n        # We probably want to execute the latest code.\n        # if default:\n        #     lambda_arn = lambda_arn + \":$LATEST\"\n\n        self.unschedule_events(lambda_name=lambda_name, lambda_arn=lambda_arn, events=events,\n                               excluded_source_services=pull_services)\n        for event in events:\n            function = event['function']\n            expression = event.get('expression', None) # single expression\n            expressions = event.get('expressions', None) # multiple expression\n            kwargs = event.get('kwargs', {}) # optional dict of keyword arguments for the event\n            event_source = event.get('event_source', None)\n            description = event.get('description', function)\n\n            #   - If 'cron' or 'rate' in expression, use ScheduleExpression\n            #   - Else, use EventPattern\n            #       - ex https://github.com/awslabs/aws-lambda-ddns-function\n\n            if not self.credentials_arn:\n                self.get_credentials_arn()\n\n            if expression:\n                expressions = [expression] # same code for single and multiple expression\n\n            if expressions:\n                for index, expression in enumerate(expressions):\n                    name = self.get_scheduled_event_name(event, function, lambda_name, index)\n                    # if it's possible that we truncated name, generate a unique, shortened name\n                    # https://github.com/Miserlou/Zappa/issues/970\n                    if len(name) >= 64:\n                        rule_name = self.get_hashed_rule_name(event, function, lambda_name)\n                    else:\n                        rule_name = name\n\n                    rule_response = self.events_client.put_rule(\n                        Name=rule_name,\n                        ScheduleExpression=expression,\n                        State='ENABLED',\n                        Description=description,\n                        RoleArn=self.credentials_arn\n                    )\n\n                    if 'RuleArn' in rule_response:\n                        logger.debug('Rule created. ARN {}'.format(rule_response['RuleArn']))\n\n                    # Specific permissions are necessary for any trigger to work.\n                    self.create_event_permission(lambda_name, 'events.amazonaws.com', rule_response['RuleArn'])\n\n                    # Overwriting the input, supply the original values and add kwargs\n                    input_template = '{\"time\": <time>, ' \\\n                                     '\"detail-type\": <detail-type>, ' \\\n                                     '\"source\": <source>,' \\\n                                     '\"account\": <account>, ' \\\n                                     '\"region\": <region>,' \\\n                                     '\"detail\": <detail>, ' \\\n                                     '\"version\": <version>,' \\\n                                     '\"resources\": <resources>,' \\\n                                     '\"id\": <id>,' \\\n                                     '\"kwargs\": %s' \\\n                                     '}' % json.dumps(kwargs)\n\n                    # Create the CloudWatch event ARN for this function.\n                    # https://github.com/Miserlou/Zappa/issues/359\n                    target_response = self.events_client.put_targets(\n                        Rule=rule_name,\n                        Targets=[\n                            {\n                                'Id': 'Id' + ''.join(random.choice(string.digits) for _ in range(12)),\n                                'Arn': lambda_arn,\n                                'InputTransformer': {\n                                    'InputPathsMap': {\n                                        'time': '$.time',\n                                        'detail-type': '$.detail-type',\n                                        'source': '$.source',\n                                        'account': '$.account',\n                                        'region': '$.region',\n                                        'detail': '$.detail',\n                                        'version': '$.version',\n                                        'resources': '$.resources',\n                                        'id': '$.id'\n                                    },\n                                    'InputTemplate': input_template\n                                }\n                            }\n                        ]\n                    )\n\n                    if target_response['ResponseMetadata']['HTTPStatusCode'] == 200:\n                        print(\"Scheduled {} with expression {}!\".format(rule_name, expression))\n                    else:\n                        print(\"Problem scheduling {} with expression {}.\".format(rule_name, expression))\n\n            elif event_source:\n                service = self.service_from_arn(event_source['arn'])\n\n                if service not in pull_services:\n                    svc = ','.join(event['event_source']['events'])\n                    self.create_event_permission(\n                        lambda_name,\n                        service + '.amazonaws.com',\n                        event['event_source']['arn']\n                    )\n                else:\n                    svc = service\n\n                rule_response = add_event_source(\n                    event_source,\n                    lambda_arn,\n                    function,\n                    self.boto_session\n                )\n\n                if rule_response == 'successful':\n                    print(\"Created {} event schedule for {}!\".format(svc, function))\n                elif rule_response == 'failed':\n                    print(\"Problem creating {} event schedule for {}!\".format(svc, function))\n                elif rule_response == 'exists':\n                    print(\"{} event schedule for {} already exists - Nothing to do here.\".format(svc, function))\n                elif rule_response == 'dryrun':\n                    print(\"Dryrun for creating {} event schedule for {}!!\".format(svc, function))\n            else:\n                print(\"Could not create event {} - Please define either an expression or an event source\".format(name))\n\n\n    @staticmethod\n    def get_scheduled_event_name(event, function, lambda_name, index=0):\n        name = event.get('name', function)\n        if name != function:\n            # a custom event name has been provided, make sure function name is included as postfix,\n            # otherwise zappa's handler won't be able to locate the function.\n            name = '{}-{}'.format(name, function)\n        if index:\n            # to ensure unique cloudwatch rule names in the case of multiple expressions\n            # prefix all entries bar the first with the index\n            # Related: https://github.com/Miserlou/Zappa/pull/1051\n            name = '{}-{}'.format(index, name)\n        # prefix scheduled event names with lambda name. So we can look them up later via the prefix.\n        return Zappa.get_event_name(lambda_name, name)\n\n    @staticmethod\n    def get_event_name(lambda_name, name):\n        \"\"\"\n        Returns an AWS-valid Lambda event name.\n\n        \"\"\"\n        return '{prefix:.{width}}-{postfix}'.format(prefix=lambda_name, width=max(0, 63 - len(name)), postfix=name)[:64]\n\n    @staticmethod\n    def get_hashed_rule_name(event, function, lambda_name):\n        \"\"\"\n        Returns an AWS-valid CloudWatch rule name using a digest of the event name, lambda name, and function.\n        This allows support for rule names that may be longer than the 64 char limit.\n        \"\"\"\n        event_name = event.get('name', function)\n        name_hash = hashlib.sha1('{}-{}'.format(lambda_name, event_name).encode('UTF-8')).hexdigest()\n        return Zappa.get_event_name(name_hash, function)\n\n    def delete_rule(self, rule_name):\n        \"\"\"\n        Delete a CWE rule.\n\n        This  deletes them, but they will still show up in the AWS console.\n        Annoying.\n\n        \"\"\"\n        logger.debug('Deleting existing rule {}'.format(rule_name))\n\n        # All targets must be removed before\n        # we can actually delete the rule.\n        try:\n            targets = self.events_client.list_targets_by_rule(Rule=rule_name)\n        except botocore.exceptions.ClientError as e:\n            # This avoids misbehavior if low permissions, related: https://github.com/Miserlou/Zappa/issues/286\n            error_code = e.response['Error']['Code']\n            if error_code == 'AccessDeniedException':\n                raise\n            else:\n                logger.debug('No target found for this rule: {} {}'.format(rule_name, e.args[0]))\n                return\n\n        if 'Targets' in targets and targets['Targets']:\n            self.events_client.remove_targets(Rule=rule_name, Ids=[x['Id'] for x in targets['Targets']])\n        else:  # pragma: no cover\n            logger.debug('No target to delete')\n\n        # Delete our rule.\n        self.events_client.delete_rule(Name=rule_name)\n\n    def get_event_rule_names_for_lambda(self, lambda_arn):\n        \"\"\"\n        Get all of the rule names associated with a lambda function.\n        \"\"\"\n        response = self.events_client.list_rule_names_by_target(TargetArn=lambda_arn)\n        rule_names = response['RuleNames']\n        # Iterate when the results are paginated\n        while 'NextToken' in response:\n            response = self.events_client.list_rule_names_by_target(TargetArn=lambda_arn,\n                                                                    NextToken=response['NextToken'])\n            rule_names.extend(response['RuleNames'])\n        return rule_names\n\n    def get_event_rules_for_lambda(self, lambda_arn):\n        \"\"\"\n        Get all of the rule details associated with this function.\n        \"\"\"\n        rule_names = self.get_event_rule_names_for_lambda(lambda_arn=lambda_arn)\n        return [self.events_client.describe_rule(Name=r) for r in rule_names]\n\n    def unschedule_events(self, events, lambda_arn=None, lambda_name=None, excluded_source_services=None):\n        excluded_source_services = excluded_source_services or []\n        \"\"\"\n        Given a list of events, unschedule these CloudWatch Events.\n\n        'events' is a list of dictionaries, where the dict must contains the string\n        of a 'function' and the string of the event 'expression', and an optional 'name' and 'description'.\n        \"\"\"\n        self._clear_policy(lambda_name)\n\n        rule_names = self.get_event_rule_names_for_lambda(lambda_arn=lambda_arn)\n        for rule_name in rule_names:\n            self.delete_rule(rule_name)\n            print('Unscheduled ' + rule_name + '.')\n\n        non_cwe = [e for e in events if 'event_source' in e]\n        for event in non_cwe:\n            # TODO: This WILL miss non CW events that have been deployed but changed names. Figure out a way to remove\n            # them no matter what.\n            # These are non CWE event sources.\n            function = event['function']\n            name = event.get('name', function)\n            event_source = event.get('event_source', function)\n            service = self.service_from_arn(event_source['arn'])\n            # DynamoDB and Kinesis streams take quite a while to setup after they are created and do not need to be\n            # re-scheduled when a new Lambda function is deployed. Therefore, they should not be removed during zappa\n            # update or zappa schedule.\n            if service not in excluded_source_services:\n                remove_event_source(\n                    event_source,\n                    lambda_arn,\n                    function,\n                    self.boto_session\n                )\n                print(\"Removed event {}{}.\".format(\n                        name,\n                        \" ({})\".format(str(event_source['events'])) if 'events' in event_source else '')\n                )\n\n    ###\n    # Async / SNS\n    ##\n\n    def create_async_sns_topic(self, lambda_name, lambda_arn):\n        \"\"\"\n        Create the SNS-based async topic.\n        \"\"\"\n        topic_name = get_topic_name(lambda_name)\n        # Create SNS topic\n        topic_arn = self.sns_client.create_topic(\n            Name=topic_name)['TopicArn']\n        # Create subscription\n        self.sns_client.subscribe(\n            TopicArn=topic_arn,\n            Protocol='lambda',\n            Endpoint=lambda_arn\n        )\n        # Add Lambda permission for SNS to invoke function\n        self.create_event_permission(\n            lambda_name=lambda_name,\n            principal='sns.amazonaws.com',\n            source_arn=topic_arn\n        )\n        # Add rule for SNS topic as a event source\n        add_event_source(\n            event_source={\n                \"arn\": topic_arn,\n                \"events\": [\"sns:Publish\"]\n            },\n            lambda_arn=lambda_arn,\n            target_function=\"zappa.asynchronous.route_task\",\n            boto_session=self.boto_session\n        )\n        return topic_arn\n\n    def remove_async_sns_topic(self, lambda_name):\n        \"\"\"\n        Remove the async SNS topic.\n        \"\"\"\n        topic_name = get_topic_name(lambda_name)\n        removed_arns = []\n        for sub in self.sns_client.list_subscriptions()['Subscriptions']:\n            if topic_name in sub['TopicArn']:\n                self.sns_client.delete_topic(TopicArn=sub['TopicArn'])\n                removed_arns.append(sub['TopicArn'])\n        return removed_arns\n\n\n    ###\n    # Async / DynamoDB\n    ##\n\n    def _set_async_dynamodb_table_ttl(self, table_name):\n        self.dynamodb_client.update_time_to_live(\n            TableName=table_name,\n            TimeToLiveSpecification={\n                'Enabled': True,\n                'AttributeName': 'ttl'\n            }\n        )\n\n\n    def create_async_dynamodb_table(self, table_name, read_capacity, write_capacity):\n        \"\"\"\n        Create the DynamoDB table for async task return values\n        \"\"\"\n        try:\n            dynamodb_table = self.dynamodb_client.describe_table(TableName=table_name)\n            return False, dynamodb_table\n\n        # catch this exception (triggered if the table doesn't exist)\n        except botocore.exceptions.ClientError:\n            dynamodb_table = self.dynamodb_client.create_table(\n                AttributeDefinitions=[\n                    {\n                        'AttributeName': 'id',\n                        'AttributeType': 'S'\n                    }\n                ],\n                TableName=table_name,\n                KeySchema=[\n                    {\n                        'AttributeName': 'id',\n                        'KeyType': 'HASH'\n                    },\n                ],\n                ProvisionedThroughput = {\n                    'ReadCapacityUnits': read_capacity,\n                    'WriteCapacityUnits': write_capacity\n                }\n            )\n            if dynamodb_table:\n                try:\n                    self._set_async_dynamodb_table_ttl(table_name)\n                except botocore.exceptions.ClientError:\n                    # this fails because the operation is async, so retry\n                    time.sleep(10)\n                    self._set_async_dynamodb_table_ttl(table_name)\n\n        return True, dynamodb_table\n\n\n    def remove_async_dynamodb_table(self, table_name):\n        \"\"\"\n        Remove the DynamoDB Table used for async return values\n        \"\"\"\n        self.dynamodb_client.delete_table(TableName=table_name)\n\n    ##\n    # CloudWatch Logging\n    ##\n\n    def fetch_logs(self, lambda_name, filter_pattern='', limit=10000, start_time=0):\n        \"\"\"\n        Fetch the CloudWatch logs for a given Lambda name.\n        \"\"\"\n        log_name = '/aws/lambda/' + lambda_name\n        streams = self.logs_client.describe_log_streams(\n            logGroupName=log_name,\n            descending=True,\n            orderBy='LastEventTime'\n        )\n\n        all_streams = streams['logStreams']\n        all_names = [stream['logStreamName'] for stream in all_streams]\n\n        events = []\n        response = {}\n        while not response or 'nextToken' in response:\n            extra_args = {}\n            if 'nextToken' in response:\n                extra_args['nextToken'] = response['nextToken']\n\n            # Amazon uses millisecond epoch for some reason.\n            # Thanks, Jeff.\n            start_time = start_time * 1000\n            end_time = int(time.time()) * 1000\n\n            response = self.logs_client.filter_log_events(\n                logGroupName=log_name,\n                logStreamNames=all_names,\n                startTime=start_time,\n                endTime=end_time,\n                filterPattern=filter_pattern,\n                limit=limit,\n                interleaved=True, # Does this actually improve performance?\n                **extra_args\n            )\n            if response and 'events' in response:\n                events += response['events']\n\n        return sorted(events, key=lambda k: k['timestamp'])\n\n    def remove_log_group(self, group_name):\n        \"\"\"\n        Filter all log groups that match the name given in log_filter.\n        \"\"\"\n        print(\"Removing log group: {}\".format(group_name))\n        try:\n            self.logs_client.delete_log_group(logGroupName=group_name)\n        except botocore.exceptions.ClientError as e:\n            print(\"Couldn't remove '{}' because of: {}\".format(group_name, e))\n\n    def remove_lambda_function_logs(self, lambda_function_name):\n        \"\"\"\n        Remove all logs that are assigned to a given lambda function id.\n        \"\"\"\n        self.remove_log_group('/aws/lambda/{}'.format(lambda_function_name))\n\n    def remove_api_gateway_logs(self, project_name):\n        \"\"\"\n        Removed all logs that are assigned to a given rest api id.\n        \"\"\"\n        for rest_api in self.get_rest_apis(project_name):\n            for stage in self.apigateway_client.get_stages(restApiId=rest_api['id'])['item']:\n                self.remove_log_group('API-Gateway-Execution-Logs_{}/{}'.format(rest_api['id'], stage['stageName']))\n\n    ##\n    # Route53 Domain Name Entries\n    ##\n\n    def get_hosted_zone_id_for_domain(self, domain):\n        \"\"\"\n        Get the Hosted Zone ID for a given domain.\n\n        \"\"\"\n        all_zones = self.get_all_zones()\n        return self.get_best_match_zone(all_zones, domain)\n\n    @staticmethod\n    def get_best_match_zone(all_zones, domain):\n        \"\"\"Return zone id which name is closer matched with domain name.\"\"\"\n\n        # Related: https://github.com/Miserlou/Zappa/issues/459\n        public_zones = [zone for zone in all_zones['HostedZones'] if not zone['Config']['PrivateZone']]\n\n        zones = {zone['Name'][:-1]: zone['Id'] for zone in public_zones if zone['Name'][:-1] in domain}\n        if zones:\n            keys = max(zones.keys(), key=lambda a: len(a))  # get longest key -- best match.\n            return zones[keys]\n        else:\n            return None\n\n    def set_dns_challenge_txt(self, zone_id, domain, txt_challenge):\n        \"\"\"\n        Set DNS challenge TXT.\n        \"\"\"\n        print(\"Setting DNS challenge..\")\n        resp = self.route53.change_resource_record_sets(\n            HostedZoneId=zone_id,\n            ChangeBatch=self.get_dns_challenge_change_batch('UPSERT', domain, txt_challenge)\n        )\n\n        return resp\n\n    def remove_dns_challenge_txt(self, zone_id, domain, txt_challenge):\n        \"\"\"\n        Remove DNS challenge TXT.\n        \"\"\"\n        print(\"Deleting DNS challenge..\")\n        resp = self.route53.change_resource_record_sets(\n            HostedZoneId=zone_id,\n            ChangeBatch=self.get_dns_challenge_change_batch('DELETE', domain, txt_challenge)\n        )\n\n        return resp\n\n    @staticmethod\n    def get_dns_challenge_change_batch(action, domain, txt_challenge):\n        \"\"\"\n        Given action, domain and challenge, return a change batch to use with\n        route53 call.\n\n        :param action: DELETE | UPSERT\n        :param domain: domain name\n        :param txt_challenge: challenge\n        :return: change set for a given action, domain and TXT challenge.\n        \"\"\"\n        return {\n            'Changes': [{\n                'Action': action,\n                'ResourceRecordSet': {\n                    'Name': '_acme-challenge.{0}'.format(domain),\n                    'Type': 'TXT',\n                    'TTL': 60,\n                    'ResourceRecords': [{\n                        'Value': '\"{0}\"'.format(txt_challenge)\n                    }]\n                }\n            }]\n        }\n\n    ##\n    # Utility\n    ##\n\n    def shell(self):\n        \"\"\"\n        Spawn a PDB shell.\n        \"\"\"\n        import pdb\n        pdb.set_trace()\n\n    def load_credentials(self, boto_session=None, profile_name=None):\n        \"\"\"\n        Load AWS credentials.\n\n        An optional boto_session can be provided, but that's usually for testing.\n\n        An optional profile_name can be provided for config files that have multiple sets\n        of credentials.\n        \"\"\"\n        # Automatically load credentials from config or environment\n        if not boto_session:\n\n            # If provided, use the supplied profile name.\n            if profile_name:\n                self.boto_session = boto3.Session(profile_name=profile_name, region_name=self.aws_region)\n            elif os.environ.get('AWS_ACCESS_KEY_ID') and os.environ.get('AWS_SECRET_ACCESS_KEY'):\n                region_name = os.environ.get('AWS_DEFAULT_REGION') or self.aws_region\n                session_kw = {\n                    \"aws_access_key_id\": os.environ.get('AWS_ACCESS_KEY_ID'),\n                    \"aws_secret_access_key\": os.environ.get('AWS_SECRET_ACCESS_KEY'),\n                    \"region_name\": region_name,\n                }\n\n                # If we're executing in a role, AWS_SESSION_TOKEN will be present, too.\n                if os.environ.get(\"AWS_SESSION_TOKEN\"):\n                    session_kw[\"aws_session_token\"] = os.environ.get(\"AWS_SESSION_TOKEN\")\n\n                self.boto_session = boto3.Session(**session_kw)\n            else:\n                self.boto_session = boto3.Session(region_name=self.aws_region)\n\n            logger.debug(\"Loaded boto session from config: %s\", boto_session)\n        else:\n            logger.debug(\"Using provided boto session: %s\", boto_session)\n            self.boto_session = boto_session\n\n        # use provided session's region in case it differs\n        self.aws_region = self.boto_session.region_name\n\n        if self.boto_session.region_name not in LAMBDA_REGIONS:\n            print(\"Warning! AWS Lambda may not be available in this AWS Region!\")\n\n        if self.boto_session.region_name not in API_GATEWAY_REGIONS:\n            print(\"Warning! AWS API Gateway may not be available in this AWS Region!\")\n\n    @staticmethod\n    def service_from_arn(arn):\n        return arn.split(':')[2]\n"
  },
  {
    "path": "zappa/ext/__init__.py",
    "content": ""
  },
  {
    "path": "zappa/ext/django_zappa.py",
    "content": "import os\nimport sys\n\n# add the Lambda root path into the sys.path\nsys.path.append('/var/task')\n\n\ndef get_django_wsgi(settings_module):\n    from django.core.wsgi import get_wsgi_application\n    os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", settings_module)\n\n    import django\n\n    if django.VERSION[0] <= 1 and django.VERSION[1] < 7:\n        # call django.setup only for django <1.7.0\n        # (because setup already in get_wsgi_application since that)\n        # https://github.com/django/django/commit/80d74097b4bd7186ad99b6d41d0ed90347a39b21\n        django.setup()\n\n    return get_wsgi_application()\n"
  },
  {
    "path": "zappa/handler.py",
    "content": "import base64\nimport boto3\nimport collections\nimport datetime\nimport importlib\nimport inspect\nimport json\nimport logging\nimport os\nimport sys\nimport traceback\nimport tarfile\n\nfrom builtins import str\nfrom werkzeug.wrappers import Response\n\n# This file may be copied into a project's root,\n# so handle both scenarios.\ntry:\n    from zappa.middleware import ZappaWSGIMiddleware\n    from zappa.wsgi import create_wsgi_request, common_log\n    from zappa.utilities import merge_headers, parse_s3_url\nexcept ImportError as e:  # pragma: no cover\n    from .middleware import ZappaWSGIMiddleware\n    from .wsgi import create_wsgi_request, common_log\n    from .utilities import merge_headers, parse_s3_url\n\n\n# Set up logging\nlogging.basicConfig()\nlogger = logging.getLogger()\nlogger.setLevel(logging.INFO)\n\n\nclass LambdaHandler:\n    \"\"\"\n    Singleton for avoiding duplicate setup.\n\n    Pattern provided by @benbangert.\n    \"\"\"\n\n    __instance = None\n    settings = None\n    settings_name = None\n    session = None\n\n    # Application\n    app_module = None\n    wsgi_app = None\n    trailing_slash = False\n\n    def __new__(cls, settings_name=\"zappa_settings\", session=None):\n        \"\"\"Singleton instance to avoid repeat setup\"\"\"\n        if LambdaHandler.__instance is None:\n            print(\"Instancing..\")\n            LambdaHandler.__instance = object.__new__(cls)\n        return LambdaHandler.__instance\n\n    def __init__(self, settings_name=\"zappa_settings\", session=None):\n\n        # We haven't cached our settings yet, load the settings and app.\n        if not self.settings:\n            # Loading settings from a python module\n            self.settings = importlib.import_module(settings_name)\n            self.settings_name = settings_name\n            self.session = session\n\n            # Custom log level\n            if self.settings.LOG_LEVEL:\n                level = logging.getLevelName(self.settings.LOG_LEVEL)\n                logger.setLevel(level)\n\n            remote_env = getattr(self.settings, 'REMOTE_ENV', None)\n            remote_bucket, remote_file = parse_s3_url(remote_env)\n\n            if remote_bucket and remote_file:\n                self.load_remote_settings(remote_bucket, remote_file)\n\n            # Let the system know that this will be a Lambda/Zappa/Stack\n            os.environ[\"SERVERTYPE\"] = \"AWS Lambda\"\n            os.environ[\"FRAMEWORK\"] = \"Zappa\"\n            try:\n                os.environ[\"PROJECT\"] = self.settings.PROJECT_NAME\n                os.environ[\"STAGE\"] = self.settings.API_STAGE\n            except Exception:  # pragma: no cover\n                pass\n\n            # Set any locally defined env vars\n            # Environment variable keys can't be Unicode\n            # https://github.com/Miserlou/Zappa/issues/604\n            for key in self.settings.ENVIRONMENT_VARIABLES.keys():\n                os.environ[str(key)] = self.settings.ENVIRONMENT_VARIABLES[key]\n\n            # Pulling from S3 if given a zip path\n            project_archive_path = getattr(self.settings, 'ARCHIVE_PATH', None)\n            if project_archive_path:\n                self.load_remote_project_archive(project_archive_path)\n\n\n            # Load compiled library to the PythonPath\n            # checks if we are the slim_handler since this is not needed otherwise\n            # https://github.com/Miserlou/Zappa/issues/776\n            is_slim_handler = getattr(self.settings, 'SLIM_HANDLER', False)\n            if is_slim_handler:\n                included_libraries = getattr(self.settings, 'INCLUDE', ['libmysqlclient.so.18'])\n                try:\n                    from ctypes import cdll, util\n                    for library in included_libraries:\n                        try:\n                            cdll.LoadLibrary(os.path.join(os.getcwd(), library))\n                        except OSError:\n                            print(\"Failed to find library: {}...right filename?\".format(library))\n                except ImportError:\n                    print (\"Failed to import cytpes library\")\n\n            # This is a non-WSGI application\n            # https://github.com/Miserlou/Zappa/pull/748\n            if not hasattr(self.settings, 'APP_MODULE') and not self.settings.DJANGO_SETTINGS:\n                self.app_module = None\n                wsgi_app_function = None\n            # This is probably a normal WSGI app (Or django with overloaded wsgi application)\n            # https://github.com/Miserlou/Zappa/issues/1164\n            elif hasattr(self.settings, 'APP_MODULE'):\n                if self.settings.DJANGO_SETTINGS:\n                    sys.path.append('/var/task')\n                    from django.conf import ENVIRONMENT_VARIABLE as SETTINGS_ENVIRONMENT_VARIABLE\n                    # add the Lambda root path into the sys.path\n                    self.trailing_slash = True\n                    os.environ[SETTINGS_ENVIRONMENT_VARIABLE] = self.settings.DJANGO_SETTINGS\n                else:\n                    self.trailing_slash = False\n\n                # The app module\n                self.app_module = importlib.import_module(self.settings.APP_MODULE)\n\n                # The application\n                wsgi_app_function = getattr(self.app_module, self.settings.APP_FUNCTION)\n            # Django gets special treatment.\n            else:\n                try:  # Support both for tests\n                    from zappa.ext.django_zappa import get_django_wsgi\n                except ImportError:  # pragma: no cover\n                    from django_zappa_app import get_django_wsgi\n\n                # Get the Django WSGI app from our extension\n                wsgi_app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS)\n                self.trailing_slash = True\n\n            self.wsgi_app = ZappaWSGIMiddleware(wsgi_app_function)\n\n    def load_remote_project_archive(self, project_zip_path):\n        \"\"\"\n        Puts the project files from S3 in /tmp and adds to path\n        \"\"\"\n        project_folder = '/tmp/{0!s}'.format(self.settings.PROJECT_NAME)\n        if not os.path.isdir(project_folder):\n            # The project folder doesn't exist in this cold lambda, get it from S3\n            if not self.session:\n                boto_session = boto3.Session()\n            else:\n                boto_session = self.session\n\n            # Download zip file from S3\n            remote_bucket, remote_file = parse_s3_url(project_zip_path)\n            s3 = boto_session.resource('s3')\n            archive_on_s3 = s3.Object(remote_bucket, remote_file).get()\n\n            with tarfile.open(fileobj=archive_on_s3['Body'], mode=\"r|gz\") as t:\n                t.extractall(project_folder)\n\n        # Add to project path\n        sys.path.insert(0, project_folder)\n\n        # Change working directory to project folder\n        # Related: https://github.com/Miserlou/Zappa/issues/702\n        os.chdir(project_folder)\n        return True\n\n    def load_remote_settings(self, remote_bucket, remote_file):\n        \"\"\"\n        Attempt to read a file from s3 containing a flat json object. Adds each\n        key->value pair as environment variables. Helpful for keeping\n        sensitiZve or stage-specific configuration variables in s3 instead of\n        version control.\n        \"\"\"\n        if not self.session:\n            boto_session = boto3.Session()\n        else:\n            boto_session = self.session\n\n        s3 = boto_session.resource('s3')\n        try:\n            remote_env_object = s3.Object(remote_bucket, remote_file).get()\n        except Exception as e:  # pragma: no cover\n            # catch everything aws might decide to raise\n            print('Could not load remote settings file.', e)\n            return\n\n        try:\n            content = remote_env_object['Body'].read()\n        except Exception as e:  # pragma: no cover\n            # catch everything aws might decide to raise\n            print('Exception while reading remote settings file.', e)\n            return\n\n        try:\n            settings_dict = json.loads(content)\n        except (ValueError, TypeError):  # pragma: no cover\n            print('Failed to parse remote settings!')\n            return\n\n        # add each key-value to environment - overwrites existing keys!\n        for key, value in settings_dict.items():\n            if self.settings.LOG_LEVEL == \"DEBUG\":\n                print('Adding {} -> {} to environment'.format(\n                    key,\n                    value\n                ))\n            # Environment variable keys can't be Unicode\n            # https://github.com/Miserlou/Zappa/issues/604\n            try:\n                os.environ[str(key)] = value\n            except Exception:\n                if self.settings.LOG_LEVEL == \"DEBUG\":\n                    print(\"Environment variable keys must be non-unicode!\")\n\n    @staticmethod\n    def import_module_and_get_function(whole_function):\n        \"\"\"\n        Given a modular path to a function, import that module\n        and return the function.\n        \"\"\"\n        module, function = whole_function.rsplit('.', 1)\n        app_module = importlib.import_module(module)\n        app_function = getattr(app_module, function)\n        return app_function\n\n    @classmethod\n    def lambda_handler(cls, event, context):  # pragma: no cover\n        handler = cls()\n        exception_handler = handler.settings.EXCEPTION_HANDLER\n        try:\n            return handler.handler(event, context)\n        except Exception as ex:\n            exception_processed = cls._process_exception(exception_handler=exception_handler,\n                                                         event=event, context=context, exception=ex)\n            if not exception_processed:\n                # Only re-raise exception if handler directed so. Allows handler to control if lambda has to retry\n                # an event execution in case of failure.\n                raise\n\n    @classmethod\n    def _process_exception(cls, exception_handler, event, context, exception):\n        exception_processed = False\n        if exception_handler:\n            try:\n                handler_function = cls.import_module_and_get_function(exception_handler)\n                exception_processed = handler_function(exception, event, context)\n            except Exception as cex:\n                logger.error(msg='Failed to process exception via custom handler.')\n                print(cex)\n        return exception_processed\n\n    @staticmethod\n    def run_function(app_function, event, context):\n        \"\"\"\n        Given a function and event context,\n        detect signature and execute, returning any result.\n        \"\"\"\n        # getargspec does not support python 3 method with type hints\n        # Related issue: https://github.com/Miserlou/Zappa/issues/1452\n        if hasattr(inspect, \"getfullargspec\"):  # Python 3\n            args, varargs, keywords, defaults, _, _, _ = inspect.getfullargspec(app_function)\n        else:  # Python 2\n            args, varargs, keywords, defaults = inspect.getargspec(app_function)\n        num_args = len(args)\n        if num_args == 0:\n            result = app_function(event, context) if varargs else app_function()\n        elif num_args == 1:\n            result = app_function(event, context) if varargs else app_function(event)\n        elif num_args == 2:\n            result = app_function(event, context)\n        else:\n            raise RuntimeError(\"Function signature is invalid. Expected a function that accepts at most \"\n                               \"2 arguments or varargs.\")\n        return result\n\n    def get_function_for_aws_event(self, record):\n        \"\"\"\n        Get the associated function to execute for a triggered AWS event\n\n        Support S3, SNS, DynamoDB, kinesis and SQS events\n        \"\"\"\n        if 's3' in record:\n            if ':' in record['s3']['configurationId']:\n                return record['s3']['configurationId'].split(':')[-1]\n\n        arn = None\n        if 'Sns' in record:\n            try:\n                message = json.loads(record['Sns']['Message'])\n                if message.get('command'):\n                    return message['command']\n            except ValueError:\n                pass\n            arn = record['Sns'].get('TopicArn')\n        elif 'dynamodb' in record or 'kinesis' in record:\n            arn = record.get('eventSourceARN')\n        elif 'eventSource' in record and record.get('eventSource') == 'aws:sqs':\n            arn = record.get('eventSourceARN')\n        elif 's3' in record:\n            arn = record['s3']['bucket']['arn']\n\n        if arn:\n            return self.settings.AWS_EVENT_MAPPING.get(arn)\n\n        return None\n\n    def get_function_from_bot_intent_trigger(self, event):\n        \"\"\"\n        For the given event build ARN and return the configured function\n        \"\"\"\n        intent = event.get('currentIntent')\n        if intent:\n            intent = intent.get('name')\n            if intent:\n                return self.settings.AWS_BOT_EVENT_MAPPING.get(\n                    \"{}:{}\".format(intent, event.get('invocationSource'))\n                )\n\n    def get_function_for_cognito_trigger(self, trigger):\n        \"\"\"\n        Get the associated function to execute for a cognito trigger\n        \"\"\"\n        print(\"get_function_for_cognito_trigger\", self.settings.COGNITO_TRIGGER_MAPPING, trigger, self.settings.COGNITO_TRIGGER_MAPPING.get(trigger))\n        return self.settings.COGNITO_TRIGGER_MAPPING.get(trigger)\n\n    def handler(self, event, context):\n        \"\"\"\n        An AWS Lambda function which parses specific API Gateway input into a\n        WSGI request, feeds it to our WSGI app, processes the response, and returns\n        that back to the API Gateway.\n\n        \"\"\"\n        settings = self.settings\n\n        # If in DEBUG mode, log all raw incoming events.\n        if settings.DEBUG:\n            logger.debug('Zappa Event: {}'.format(event))\n\n        # Set any API Gateway defined Stage Variables\n        # as env vars\n        if event.get('stageVariables'):\n            for key in event['stageVariables'].keys():\n                os.environ[str(key)] = event['stageVariables'][key]\n\n        # This is the result of a keep alive, recertify\n        # or scheduled event.\n        if event.get('detail-type') == 'Scheduled Event':\n\n            whole_function = event['resources'][0].split('/')[-1].split('-')[-1]\n\n            # This is a scheduled function.\n            if '.' in whole_function:\n                app_function = self.import_module_and_get_function(whole_function)\n\n                # Execute the function!\n                return self.run_function(app_function, event, context)\n\n            # Else, let this execute as it were.\n\n        # This is a direct command invocation.\n        elif event.get('command', None):\n\n            whole_function = event['command']\n            app_function = self.import_module_and_get_function(whole_function)\n            result = self.run_function(app_function, event, context)\n            print(\"Result of %s:\" % whole_function)\n            print(result)\n            return result\n\n        # This is a direct, raw python invocation.\n        # It's _extremely_ important we don't allow this event source\n        # to be overridden by unsanitized, non-admin user input.\n        elif event.get('raw_command', None):\n\n            raw_command = event['raw_command']\n            exec(raw_command)\n            return\n\n        # This is a Django management command invocation.\n        elif event.get('manage', None):\n\n            from django.core import management\n\n            try:  # Support both for tests\n                from zappa.ext.django_zappa import get_django_wsgi\n            except ImportError as e:  # pragma: no cover\n                from django_zappa_app import get_django_wsgi\n\n            # Get the Django WSGI app from our extension\n            # We don't actually need the function,\n            # but we do need to do all of the required setup for it.\n            app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS)\n\n            # Couldn't figure out how to get the value into stdout with StringIO..\n            # Read the log for now. :[]\n            management.call_command(*event['manage'].split(' '))\n            return {}\n\n        # This is an AWS-event triggered invocation.\n        elif event.get('Records', None):\n\n            records = event.get('Records')\n            result = None\n            whole_function = self.get_function_for_aws_event(records[0])\n            if whole_function:\n                app_function = self.import_module_and_get_function(whole_function)\n                result = self.run_function(app_function, event, context)\n                logger.debug(result)\n            else:\n                logger.error(\"Cannot find a function to process the triggered event.\")\n            return result\n\n        # this is an AWS-event triggered from Lex bot's intent\n        elif event.get('bot'):\n            result = None\n            whole_function = self.get_function_from_bot_intent_trigger(event)\n            if whole_function:\n                app_function = self.import_module_and_get_function(whole_function)\n                result = self.run_function(app_function, event, context)\n                logger.debug(result)\n            else:\n                logger.error(\"Cannot find a function to process the triggered event.\")\n            return result\n\n        # This is an API Gateway authorizer event\n        elif event.get('type') == 'TOKEN':\n            whole_function = self.settings.AUTHORIZER_FUNCTION\n            if whole_function:\n                app_function = self.import_module_and_get_function(whole_function)\n                policy = self.run_function(app_function, event, context)\n                return policy\n            else:\n                logger.error(\"Cannot find a function to process the authorization request.\")\n                raise Exception('Unauthorized')\n\n        # This is an AWS Cognito Trigger Event\n        elif event.get('triggerSource', None):\n            triggerSource = event.get('triggerSource')\n            whole_function = self.get_function_for_cognito_trigger(triggerSource)\n            result = event\n            if whole_function:\n                app_function = self.import_module_and_get_function(whole_function)\n                result = self.run_function(app_function, event, context)\n                logger.debug(result)\n            else:\n                logger.error(\"Cannot find a function to handle cognito trigger {}\".format(triggerSource))\n            return result\n\n        # This is a CloudWatch event\n        # Related: https://github.com/Miserlou/Zappa/issues/1924\n        elif event.get('awslogs', None):\n            result = None\n            whole_function = '{}.{}'.format(settings.APP_MODULE, settings.APP_FUNCTION)\n            app_function = self.import_module_and_get_function(whole_function)\n            if app_function:\n                result = self.run_function(app_function, event, context)\n                logger.debug(\"Result of %s:\" % whole_function)\n                logger.debug(result)\n            else:\n                logger.error(\"Cannot find a function to process the triggered event.\")\n            return result\n\n        # Normal web app flow\n        try:\n            # Timing\n            time_start = datetime.datetime.now()\n\n            # This is a normal HTTP request\n            if event.get('httpMethod', None):\n                script_name = ''\n                is_elb_context = False\n                headers = merge_headers(event)\n                if event.get('requestContext', None) and event['requestContext'].get('elb', None):\n                    # Related: https://github.com/Miserlou/Zappa/issues/1715\n                    # inputs/outputs for lambda loadbalancer\n                    # https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html\n                    is_elb_context = True\n                    # host is lower-case when forwarded from ELB\n                    host = headers.get('host')\n                    # TODO: pathParameters is a first-class citizen in apigateway but not available without\n                    # some parsing work for ELB (is this parameter used for anything?)\n                    event['pathParameters'] = ''\n                else:\n                    if headers:\n                        host = headers.get('Host')\n                    else:\n                        host = None\n                    logger.debug('host found: [{}]'.format(host))\n\n                    if host:\n                        if 'amazonaws.com' in host:\n                            logger.debug('amazonaws found in host')\n                            # The path provided in th event doesn't include the\n                            # stage, so we must tell Flask to include the API\n                            # stage in the url it calculates. See https://github.com/Miserlou/Zappa/issues/1014\n                            script_name = '/' + settings.API_STAGE\n                    else:\n                        # This is a test request sent from the AWS console\n                        if settings.DOMAIN:\n                            # Assume the requests received will be on the specified\n                            # domain. No special handling is required\n                            pass\n                        else:\n                            # Assume the requests received will be to the\n                            # amazonaws.com endpoint, so tell Flask to include the\n                            # API stage\n                            script_name = '/' + settings.API_STAGE\n\n                base_path = getattr(settings, 'BASE_PATH', None)\n\n                # Create the environment for WSGI and handle the request\n                environ = create_wsgi_request(\n                    event,\n                    script_name=script_name,\n                    base_path=base_path,\n                    trailing_slash=self.trailing_slash,\n                    binary_support=settings.BINARY_SUPPORT,\n                    context_header_mappings=settings.CONTEXT_HEADER_MAPPINGS\n                )\n\n                # We are always on https on Lambda, so tell our wsgi app that.\n                environ['HTTPS'] = 'on'\n                environ['wsgi.url_scheme'] = 'https'\n                environ['lambda.context'] = context\n                environ['lambda.event'] = event\n\n                # Execute the application\n                with Response.from_app(self.wsgi_app, environ) as response:\n                    # This is the object we're going to return.\n                    # Pack the WSGI response into our special dictionary.\n                    zappa_returndict = dict()\n\n                    # Issue #1715: ALB support. ALB responses must always include\n                    # base64 encoding and status description\n                    if is_elb_context:\n                        zappa_returndict.setdefault('isBase64Encoded', False)\n                        zappa_returndict.setdefault('statusDescription', response.status)\n\n                    if response.data:\n                        if settings.BINARY_SUPPORT and \\\n                                not response.mimetype.startswith(\"text/\") \\\n                                and response.mimetype != \"application/json\":\n                            zappa_returndict['body'] = base64.b64encode(response.data).decode('utf-8')\n                            zappa_returndict[\"isBase64Encoded\"] = True\n                        else:\n                            zappa_returndict['body'] = response.get_data(as_text=True)\n\n                    zappa_returndict['statusCode'] = response.status_code\n                    if 'headers' in event:\n                        zappa_returndict['headers'] = {}\n                        for key, value in response.headers:\n                            zappa_returndict['headers'][key] = value\n                    if 'multiValueHeaders' in event:\n                        zappa_returndict['multiValueHeaders'] = {}\n                        for key, value in response.headers:\n                            zappa_returndict['multiValueHeaders'][key] = response.headers.getlist(key)\n\n                    # Calculate the total response time,\n                    # and log it in the Common Log format.\n                    time_end = datetime.datetime.now()\n                    delta = time_end - time_start\n                    response_time_ms = delta.total_seconds() * 1000\n                    response.content = response.data\n                    common_log(environ, response, response_time=response_time_ms)\n\n                    return zappa_returndict\n        except Exception as e:  # pragma: no cover\n            # Print statements are visible in the logs either way\n            print(e)\n            exc_info = sys.exc_info()\n            message = ('An uncaught exception happened while servicing this request. '\n                       'You can investigate this with the `zappa tail` command.')\n\n            # If we didn't even build an app_module, just raise.\n            if not settings.DJANGO_SETTINGS:\n                try:\n                    self.app_module\n                except NameError as ne:\n                    message = 'Failed to import module: {}'.format(ne.message)\n\n            # Call exception handler for unhandled exceptions\n            exception_handler = self.settings.EXCEPTION_HANDLER\n            self._process_exception(exception_handler=exception_handler,\n                                    event=event, context=context, exception=e)\n\n            # Return this unspecified exception as a 500, using template that API Gateway expects.\n            content = collections.OrderedDict()\n            content['statusCode'] = 500\n            body = {'message': message}\n            if settings.DEBUG:  # only include traceback if debug is on.\n                body['traceback'] = traceback.format_exception(*exc_info)  # traceback as a list for readability.\n            content['body'] = json.dumps(str(body), sort_keys=True, indent=4)\n            return content\n\n\ndef lambda_handler(event, context):  # pragma: no cover\n    return LambdaHandler.lambda_handler(event, context)\n\n\ndef keep_warm_callback(event, context):\n    \"\"\"Method is triggered by the CloudWatch event scheduled when keep_warm setting is set to true.\"\"\"\n    lambda_handler(event={}, context=context)  # overriding event with an empty one so that web app initialization will\n    # be triggered.\n"
  },
  {
    "path": "zappa/letsencrypt.py",
    "content": "#!/usr/bin/env python\n\"\"\"\nCreate and install a Let's Encrypt cert for an API Gateway.\n\nThis file is a descendant of @diafygi's 'acme-tiny',\nwith http-01 replaced with dns-01 via AWS Route 53.\n\nYou must generate your own account.key:\nopenssl genrsa 2048 > account.key # Keep it secret, keep safe!\n\n\"\"\"\n\nimport atexit\nimport base64\nimport copy\nimport json\nimport hashlib\nimport logging\nimport re\nimport subprocess\nimport os\nimport shutil\nimport sys\nimport time\nimport tempfile\n\nimport binascii\nimport textwrap\nimport requests\n\nfrom urllib.request import urlopen\n\n# Staging\n# Amazon doesn't accept these though.\n# DEFAULT_CA = \"https://acme-staging.api.letsencrypt.org\"\n\n# Production\nDEFAULT_CA = \"https://acme-v01.api.letsencrypt.org\"\n\nLOGGER = logging.getLogger(__name__)\nLOGGER.addHandler(logging.StreamHandler())\n\n\ndef get_cert_and_update_domain(\n                                zappa_instance,\n                                lambda_name,\n                                api_stage,\n                                domain=None,\n                                manual=False,\n                            ):\n    \"\"\"\n    Main cert installer path.\n    \"\"\"\n\n    try:\n        create_domain_key()\n        create_domain_csr(domain)\n        get_cert(zappa_instance)\n        create_chained_certificate()\n\n        with open('{}/signed.crt'.format(gettempdir())) as f:\n            certificate_body = f.read()\n\n        with open('{}/domain.key'.format(gettempdir())) as f:\n            certificate_private_key = f.read()\n\n        with open('{}/intermediate.pem'.format(gettempdir())) as f:\n            certificate_chain = f.read()\n\n        if not manual:\n            if domain:\n                if not zappa_instance.get_domain_name(domain):\n                    zappa_instance.create_domain_name(\n                        domain_name=domain,\n                        certificate_name=domain + \"-Zappa-LE-Cert\",\n                        certificate_body=certificate_body,\n                        certificate_private_key=certificate_private_key,\n                        certificate_chain=certificate_chain,\n                        certificate_arn=None,\n                        lambda_name=lambda_name,\n                        stage=api_stage\n                    )\n                    print(\"Created a new domain name. Please note that it can take up to 40 minutes for this domain to be created and propagated through AWS, but it requires no further work on your part.\")\n                else:\n                    zappa_instance.update_domain_name(\n                        domain_name=domain,\n                        certificate_name=domain + \"-Zappa-LE-Cert\",\n                        certificate_body=certificate_body,\n                        certificate_private_key=certificate_private_key,\n                        certificate_chain=certificate_chain,\n                        certificate_arn=None,\n                        lambda_name=lambda_name,\n                        stage=api_stage\n                    )\n        else:\n            print(\"Cerificate body:\\n\")\n            print(certificate_body)\n\n            print(\"\\nCerificate private key:\\n\")\n            print(certificate_private_key)\n\n            print(\"\\nCerificate chain:\\n\")\n            print(certificate_chain)\n\n    except Exception as e:\n        print(e)\n        return False\n\n    return True\n\n\ndef create_domain_key():\n    devnull = open(os.devnull, 'wb')\n    out = subprocess.check_output(['openssl', 'genrsa', '2048'], stderr=devnull)\n    with open(os.path.join(gettempdir(), 'domain.key'), 'wb') as f:\n        f.write(out)\n\n\ndef create_domain_csr(domain):\n    subj = \"/CN=\" + domain\n    cmd = [\n        'openssl', 'req',\n        '-new',\n        '-sha256',\n        '-key', os.path.join(gettempdir(), 'domain.key'),\n        '-subj', subj\n    ]\n\n    devnull = open(os.devnull, 'wb')\n    out = subprocess.check_output(cmd, stderr=devnull)\n    with open(os.path.join(gettempdir(), 'domain.csr'), 'wb') as f:\n        f.write(out)\n\n\ndef create_chained_certificate():\n    signed_crt = open(os.path.join(gettempdir(), 'signed.crt'), 'rb').read()\n\n    cross_cert_url = \"https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem\"\n    cert = requests.get(cross_cert_url)\n    with open(os.path.join(gettempdir(), 'intermediate.pem'), 'wb') as intermediate_pem:\n        intermediate_pem.write(cert.content)\n\n    with open(os.path.join(gettempdir(), 'chained.pem'), 'wb') as chained_pem:\n        chained_pem.write(signed_crt)\n        chained_pem.write(cert.content)\n\n\ndef parse_account_key():\n    \"\"\"Parse account key to get public key\"\"\"\n    LOGGER.info(\"Parsing account key...\")\n    cmd = [\n        'openssl', 'rsa',\n        '-in', os.path.join(gettempdir(), 'account.key'),\n        '-noout',\n        '-text'\n    ]\n    devnull = open(os.devnull, 'wb')\n    return subprocess.check_output(cmd, stderr=devnull)\n\n\ndef parse_csr():\n    \"\"\"\n    Parse certificate signing request for domains\n    \"\"\"\n    LOGGER.info(\"Parsing CSR...\")\n    cmd = [\n        'openssl', 'req',\n        '-in', os.path.join(gettempdir(), 'domain.csr'),\n        '-noout',\n        '-text'\n    ]\n    devnull = open(os.devnull, 'wb')\n    out = subprocess.check_output(cmd, stderr=devnull)\n    domains = set([])\n    common_name = re.search(r\"Subject:.*? CN\\s?=\\s?([^\\s,;/]+)\", out.decode('utf8'))\n    if common_name is not None:\n        domains.add(common_name.group(1))\n    subject_alt_names = re.search(r\"X509v3 Subject Alternative Name: \\n +([^\\n]+)\\n\", out.decode('utf8'), re.MULTILINE | re.DOTALL)\n    if subject_alt_names is not None:\n        for san in subject_alt_names.group(1).split(\", \"):\n            if san.startswith(\"DNS:\"):\n                domains.add(san[4:])\n\n    return domains\n\n\ndef get_boulder_header(key_bytes):\n    \"\"\"\n    Use regular expressions to find crypto values from parsed account key,\n    and return a header we can send to our Boulder instance.\n    \"\"\"\n    pub_hex, pub_exp = re.search(\n        r\"modulus:\\n\\s+00:([a-f0-9\\:\\s]+?)\\npublicExponent: ([0-9]+)\",\n        key_bytes.decode('utf8'), re.MULTILINE | re.DOTALL).groups()\n    pub_exp = \"{0:x}\".format(int(pub_exp))\n    pub_exp = \"0{0}\".format(pub_exp) if len(pub_exp) % 2 else pub_exp\n    header = {\n        \"alg\": \"RS256\",\n        \"jwk\": {\n            \"e\": _b64(binascii.unhexlify(pub_exp.encode(\"utf-8\"))),\n            \"kty\": \"RSA\",\n            \"n\": _b64(binascii.unhexlify(re.sub(r\"(\\s|:)\", \"\", pub_hex).encode(\"utf-8\"))),\n        },\n    }\n\n    return header\n\n\ndef register_account():\n    \"\"\"\n    Agree to LE TOS\n    \"\"\"\n    LOGGER.info(\"Registering account...\")\n    code, result = _send_signed_request(DEFAULT_CA + \"/acme/new-reg\", {\n        \"resource\": \"new-reg\",\n        \"agreement\": \"https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf\",\n    })\n    if code == 201:  # pragma: no cover\n        LOGGER.info(\"Registered!\")\n    elif code == 409:  # pragma: no cover\n        LOGGER.info(\"Already registered!\")\n    else:  # pragma: no cover\n        raise ValueError(\"Error registering: {0} {1}\".format(code, result))\n\n\ndef get_cert(zappa_instance, log=LOGGER, CA=DEFAULT_CA):\n    \"\"\"\n    Call LE to get a new signed CA.\n    \"\"\"\n    out = parse_account_key()\n    header = get_boulder_header(out)\n    accountkey_json = json.dumps(header['jwk'], sort_keys=True, separators=(',', ':'))\n    thumbprint = _b64(hashlib.sha256(accountkey_json.encode('utf8')).digest())\n\n    # find domains\n    domains = parse_csr()\n\n    # get the certificate domains and expiration\n    register_account()\n\n    # verify each domain\n    for domain in domains:\n        log.info(\"Verifying {0}...\".format(domain))\n\n        # get new challenge\n        code, result = _send_signed_request(CA + \"/acme/new-authz\", {\n            \"resource\": \"new-authz\",\n            \"identifier\": {\"type\": \"dns\", \"value\": domain},\n        })\n        if code != 201:\n            raise ValueError(\"Error requesting challenges: {0} {1}\".format(code, result))\n\n        challenge = [ch for ch in json.loads(result.decode('utf8'))['challenges'] if ch['type'] == \"dns-01\"][0]\n        token = re.sub(r\"[^A-Za-z0-9_\\-]\", \"_\", challenge['token'])\n        keyauthorization = \"{0}.{1}\".format(token, thumbprint).encode('utf-8')\n\n        # sha256_b64\n        digest = _b64(hashlib.sha256(keyauthorization).digest())\n\n        zone_id = zappa_instance.get_hosted_zone_id_for_domain(domain)\n        if not zone_id:\n            raise ValueError(\"Could not find Zone ID for: \" + domain)\n        zappa_instance.set_dns_challenge_txt(zone_id, domain, digest)  # resp is unused\n\n        print(\"Waiting for DNS to propagate..\")\n\n        # What's optimal here?\n        # import time  # double import; import in loop; shadowed import\n        time.sleep(45)\n\n        # notify challenge are met\n        code, result = _send_signed_request(challenge['uri'], {\n            \"resource\": \"challenge\",\n            \"keyAuthorization\": keyauthorization.decode('utf-8'),\n        })\n        if code != 202:\n            raise ValueError(\"Error triggering challenge: {0} {1}\".format(code, result))\n\n        # wait for challenge to be verified\n        verify_challenge(challenge['uri'])\n\n        # Challenge verified, clean up R53\n        zappa_instance.remove_dns_challenge_txt(zone_id, domain, digest)\n\n    # Sign\n    result = sign_certificate()\n    # Encode to PEM format\n    encode_certificate(result)\n\n    return True\n\n\ndef verify_challenge(uri):\n    \"\"\"\n    Loop until our challenge is verified, else fail.\n    \"\"\"\n    while True:\n        try:\n            resp = urlopen(uri)\n            challenge_status = json.loads(resp.read().decode('utf8'))\n        except IOError as e:\n            raise ValueError(\"Error checking challenge: {0} {1}\".format(\n                e.code, json.loads(e.read().decode('utf8'))))\n        if challenge_status['status'] == \"pending\":\n            time.sleep(2)\n        elif challenge_status['status'] == \"valid\":\n            LOGGER.info(\"Domain verified!\")\n            break\n        else:\n            raise ValueError(\"Domain challenge did not pass: {0}\".format(\n                challenge_status))\n\n\ndef sign_certificate():\n    \"\"\"\n    Get the new certificate.\n    Returns the signed bytes.\n\n    \"\"\"\n    LOGGER.info(\"Signing certificate...\")\n    cmd = [\n        'openssl', 'req',\n        '-in', os.path.join(gettempdir(), 'domain.csr'),\n        '-outform', 'DER'\n    ]\n    devnull = open(os.devnull, 'wb')\n    csr_der = subprocess.check_output(cmd, stderr=devnull)\n    code, result = _send_signed_request(DEFAULT_CA + \"/acme/new-cert\", {\n        \"resource\": \"new-cert\",\n        \"csr\": _b64(csr_der),\n    })\n    if code != 201:\n        raise ValueError(\"Error signing certificate: {0} {1}\".format(code, result))\n    LOGGER.info(\"Certificate signed!\")\n\n    return result\n\n\ndef encode_certificate(result):\n    \"\"\"\n    Encode cert bytes to PEM encoded cert file.\n    \"\"\"\n    cert_body = \"\"\"-----BEGIN CERTIFICATE-----\\n{0}\\n-----END CERTIFICATE-----\\n\"\"\".format(\n        \"\\n\".join(textwrap.wrap(base64.b64encode(result).decode('utf8'), 64)))\n    signed_crt = open(\"{}/signed.crt\".format(gettempdir()), \"w\")\n    signed_crt.write(cert_body)\n    signed_crt.close()\n\n    return True\n\n##\n# Request Utility\n##\n\n\ndef _b64(b):\n    \"\"\"\n    Helper function base64 encode for jose spec\n    \"\"\"\n    return base64.urlsafe_b64encode(b).decode('utf8').replace(\"=\", \"\")\n\n\ndef _send_signed_request(url, payload):\n    \"\"\"\n    Helper function to make signed requests to Boulder\n    \"\"\"\n    payload64 = _b64(json.dumps(payload).encode('utf8'))\n\n    out = parse_account_key()\n    header = get_boulder_header(out)\n\n    protected = copy.deepcopy(header)\n    protected[\"nonce\"] = urlopen(DEFAULT_CA + \"/directory\").headers['Replay-Nonce']\n    protected64 = _b64(json.dumps(protected).encode('utf8'))\n    cmd = [\n        'openssl', 'dgst',\n        '-sha256',\n        '-sign', os.path.join(gettempdir(), 'account.key')\n    ]\n    proc = subprocess.Popen(\n        cmd,\n        stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE\n    )\n    out, err = proc.communicate(\"{0}.{1}\".format(protected64, payload64).encode('utf8'))\n    if proc.returncode != 0: # pragma: no cover\n        raise IOError(\"OpenSSL Error: {0}\".format(err))\n    data = json.dumps({\n        \"header\": header, \"protected\": protected64,\n        \"payload\": payload64, \"signature\": _b64(out),\n    })\n    try:\n        resp = urlopen(url, data.encode('utf8'))\n        return resp.getcode(), resp.read()\n    except IOError as e:\n        return getattr(e, \"code\", None), getattr(e, \"read\", e.__str__)()\n\n##\n# Temporary Directory Utility\n##\n\n\n__tempdir = None\n\ndef gettempdir():\n    \"\"\"\n    Lazily creates a temporary directory in a secure manner. When Python exits,\n    or the cleanup() function is called, the directory is erased.\n    \"\"\"\n    global __tempdir\n    if __tempdir is not None:\n        return __tempdir\n    __tempdir = tempfile.mkdtemp()\n    return __tempdir\n\n\n@atexit.register\ndef cleanup():\n    \"\"\"\n    Delete any temporary files.\n    \"\"\"\n    global __tempdir\n    if __tempdir is not None:\n        shutil.rmtree(__tempdir)\n        __tempdir = None\n"
  },
  {
    "path": "zappa/middleware.py",
    "content": "from werkzeug.wsgi import ClosingIterator\n\n\ndef all_casings(input_string):\n    \"\"\"\n    Permute all casings of a given string.\n\n    A pretty algorithm, via @Amber\n    http://stackoverflow.com/questions/6792803/finding-all-possible-case-permutations-in-python\n    \"\"\"\n    if not input_string:\n        yield \"\"\n    else:\n        first = input_string[:1]\n        if first.lower() == first.upper():\n            for sub_casing in all_casings(input_string[1:]):\n                yield first + sub_casing\n        else:\n            for sub_casing in all_casings(input_string[1:]):\n                yield first.lower() + sub_casing\n                yield first.upper() + sub_casing\n\n\nclass ZappaWSGIMiddleware:\n    \"\"\"\n    Middleware functions necessary for a Zappa deployment.\n\n    Most hacks have now been remove except for Set-Cookie permutation.\n    \"\"\"\n    def __init__(self, application):\n        self.application = application\n\n    def __call__(self, environ, start_response):\n        \"\"\"\n        We must case-mangle the Set-Cookie header name or AWS will use only a\n        single one of these headers.\n        \"\"\"\n\n        def encode_response(status, headers, exc_info=None):\n            \"\"\"\n            This makes the 'set-cookie' headers name lowercase,\n            all the non-cookie headers should be sent unharmed.\n            Related: https://github.com/Miserlou/Zappa/issues/1965\n            \"\"\"\n\n            new_headers = [header for header in headers\n                           if ((type(header[0]) != str) or (header[0].lower() != 'set-cookie'))]\n            cookie_headers = [(header[0].lower(), header[1]) for header in headers\n                              if ((type(header[0]) == str) and (header[0].lower() == \"set-cookie\"))]\n            new_headers = new_headers + cookie_headers\n\n            return start_response(status, new_headers, exc_info)\n\n        # Call the application with our modifier\n        response = self.application(environ, encode_response)\n\n        # Return the response as a WSGI-safe iterator\n        return ClosingIterator(response)\n"
  },
  {
    "path": "zappa/policies.py",
    "content": ""
  },
  {
    "path": "zappa/utilities.py",
    "content": "import botocore\nimport calendar\nimport datetime\nimport durationpy\nimport fnmatch\nimport io\nimport json\nimport logging\nimport os\nimport re\nimport shutil\nimport stat\nimport sys\n\nfrom past.builtins import basestring\n\nfrom urllib.parse import urlparse\n\nLOG = logging.getLogger(__name__)\n\n##\n# Settings / Packaging\n##\n\ndef copytree(src, dst, metadata=True, symlinks=False, ignore=None):\n    \"\"\"\n    This is a contributed re-implementation of 'copytree' that\n    should work with the exact same behavior on multiple platforms.\n\n    When `metadata` is False, file metadata such as permissions and modification\n    times are not copied.\n    \"\"\"\n\n    def copy_file(src, dst, item):\n        s = os.path.join(src, item)\n        d = os.path.join(dst, item)\n\n        if symlinks and os.path.islink(s): # pragma: no cover\n            if os.path.lexists(d):\n                os.remove(d)\n            os.symlink(os.readlink(s), d)\n            if metadata:\n                try:\n                    st = os.lstat(s)\n                    mode = stat.S_IMODE(st.st_mode)\n                    os.lchmod(d, mode)\n                except:\n                    pass  # lchmod not available\n        elif os.path.isdir(s):\n            copytree(s, d, metadata, symlinks, ignore)\n        else:\n            shutil.copy2(s, d) if metadata else shutil.copy(s, d)\n    try:\n        lst = os.listdir(src)\n        if not os.path.exists(dst):\n            os.makedirs(dst)\n            if metadata:\n                shutil.copystat(src, dst)\n    except NotADirectoryError:  # egg-link files\n        copy_file(os.path.dirname(src), os.path.dirname(dst), os.path.basename(src))\n        return\n\n    if ignore:\n        excl = ignore(src, lst)\n        lst = [x for x in lst if x not in excl]\n\n    for item in lst:\n        copy_file(src, dst, item)\n\n\ndef parse_s3_url(url):\n    \"\"\"\n    Parses S3 URL.\n\n    Returns bucket (domain) and file (full path).\n    \"\"\"\n    bucket = ''\n    path = ''\n    if url:\n        result = urlparse(url)\n        bucket = result.netloc\n        path = result.path.strip('/')\n    return bucket, path\n\ndef human_size(num, suffix='B'):\n    \"\"\"\n    Convert bytes length to a human-readable version\n    \"\"\"\n    for unit in ('', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi'):\n        if abs(num) < 1024.0:\n            return \"{0:3.1f}{1!s}{2!s}\".format(num, unit, suffix)\n        num /= 1024.0\n    return \"{0:.1f}{1!s}{2!s}\".format(num, 'Yi', suffix)\n\ndef string_to_timestamp(timestring):\n    \"\"\"\n    Accepts a str, returns an int timestamp.\n    \"\"\"\n\n    ts = None\n\n    # Uses an extended version of Go's duration string.\n    try:\n        delta = durationpy.from_str(timestring);\n        past = datetime.datetime.utcnow() - delta\n        ts = calendar.timegm(past.timetuple())\n        return ts\n    except Exception as e:\n        pass\n\n    if ts:\n        return ts\n    # else:\n    #     print(\"Unable to parse timestring.\")\n    return 0\n\n##\n# `init` related\n##\n\ndef detect_django_settings():\n    \"\"\"\n    Automatically try to discover Django settings files,\n    return them as relative module paths.\n    \"\"\"\n\n    matches = []\n    for root, dirnames, filenames in os.walk(os.getcwd()):\n        for filename in fnmatch.filter(filenames, '*settings.py'):\n            full = os.path.join(root, filename)\n            if 'site-packages' in full:\n                continue\n            full = os.path.join(root, filename)\n            package_path = full.replace(os.getcwd(), '')\n            package_module = package_path.replace(os.sep, '.').split('.', 1)[1].replace('.py', '')\n\n            matches.append(package_module)\n    return matches\n\ndef detect_flask_apps():\n    \"\"\"\n    Automatically try to discover Flask apps files,\n    return them as relative module paths.\n    \"\"\"\n\n    matches = []\n    for root, dirnames, filenames in os.walk(os.getcwd()):\n        for filename in fnmatch.filter(filenames, '*.py'):\n            full = os.path.join(root, filename)\n            if 'site-packages' in full:\n                continue\n\n            full = os.path.join(root, filename)\n\n            with io.open(full, 'r', encoding='utf-8') as f:\n                lines = f.readlines()\n                for line in lines:\n                    app = None\n\n                    # Kind of janky..\n                    if '= Flask(' in line:\n                        app = line.split('= Flask(')[0].strip()\n                    if '=Flask(' in line:\n                        app = line.split('=Flask(')[0].strip()\n\n                    if not app:\n                        continue\n\n                    package_path = full.replace(os.getcwd(), '')\n                    package_module = package_path.replace(os.sep, '.').split('.', 1)[1].replace('.py', '')\n                    app_module = package_module + '.' + app\n\n                    matches.append(app_module)\n\n    return matches\n\ndef get_venv_from_python_version():\n    return 'python{}.{}'.format(*sys.version_info)\n\ndef get_runtime_from_python_version():\n    \"\"\"\n    \"\"\"\n    if sys.version_info[0] < 3:\n        raise ValueError(\"Python 2.x is no longer supported.\")\n    else:\n        if sys.version_info[1] <= 6:\n            return 'python3.6'\n        elif sys.version_info[1] <= 7:\n            return 'python3.7'\n        else:\n            return 'python3.8'\n\n##\n# Async Tasks\n##\n\ndef get_topic_name(lambda_name):\n    \"\"\" Topic name generation \"\"\"\n    return '%s-zappa-async' % lambda_name\n\n##\n# Event sources / Kappa\n##\n\ndef get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False):\n    \"\"\"\n\n    Given an event_source dictionary item, a session and a lambda_arn,\n    hack into Kappa's Gibson, create out an object we can call\n    to schedule this event, and return the event source.\n\n    \"\"\"\n    import kappa.function\n    import kappa.restapi\n    import kappa.event_source.base\n    import kappa.event_source.dynamodb_stream\n    import kappa.event_source.kinesis\n    import kappa.event_source.s3\n    import kappa.event_source.sns\n    import kappa.event_source.cloudwatch\n    import kappa.policy\n    import kappa.role\n    import kappa.awsclient\n\n    class PseudoContext:\n        def __init__(self):\n            return\n\n    class PseudoFunction:\n        def __init__(self):\n            return\n\n    # Mostly adapted from kappa - will probably be replaced by kappa support\n    class SqsEventSource(kappa.event_source.base.EventSource):\n\n        def __init__(self, context, config):\n            super().__init__(context, config)\n            self._lambda = kappa.awsclient.create_client(\n                'lambda', context.session)\n\n        def _get_uuid(self, function):\n            uuid = None\n            response = self._lambda.call(\n                'list_event_source_mappings',\n                FunctionName=function.name,\n                EventSourceArn=self.arn)\n            LOG.debug(response)\n            if len(response['EventSourceMappings']) > 0:\n                uuid = response['EventSourceMappings'][0]['UUID']\n            return uuid\n\n        def add(self, function):\n            try:\n                response = self._lambda.call(\n                    'create_event_source_mapping',\n                    FunctionName=function.name,\n                    EventSourceArn=self.arn,\n                    BatchSize=self.batch_size,\n                    Enabled=self.enabled\n                    )\n                LOG.debug(response)\n            except Exception:\n                LOG.exception('Unable to add event source')\n\n        def enable(self, function):\n            self._config['enabled'] = True\n            try:\n                response = self._lambda.call(\n                    'update_event_source_mapping',\n                    UUID=self._get_uuid(function),\n                    Enabled=self.enabled\n                    )\n                LOG.debug(response)\n            except Exception:\n                LOG.exception('Unable to enable event source')\n\n        def disable(self, function):\n            self._config['enabled'] = False\n            try:\n                response = self._lambda.call(\n                    'update_event_source_mapping',\n                    FunctionName=function.name,\n                    Enabled=self.enabled\n                    )\n                LOG.debug(response)\n            except Exception:\n                LOG.exception('Unable to disable event source')\n\n        def update(self, function):\n            response = None\n            uuid = self._get_uuid(function)\n            if uuid:\n                try:\n                    response = self._lambda.call(\n                        'update_event_source_mapping',\n                        BatchSize=self.batch_size,\n                        Enabled=self.enabled,\n                        FunctionName=function.arn)\n                    LOG.debug(response)\n                except Exception:\n                    LOG.exception('Unable to update event source')\n\n        def remove(self, function):\n            response = None\n            uuid = self._get_uuid(function)\n            if uuid:\n                response = self._lambda.call(\n                    'delete_event_source_mapping',\n                    UUID=uuid)\n                LOG.debug(response)\n            return response\n\n        def status(self, function):\n            response = None\n            LOG.debug('getting status for event source %s', self.arn)\n            uuid = self._get_uuid(function)\n            if uuid:\n                try:\n                    response = self._lambda.call(\n                        'get_event_source_mapping',\n                        UUID=self._get_uuid(function))\n                    LOG.debug(response)\n                except botocore.exceptions.ClientError:\n                    LOG.debug('event source %s does not exist', self.arn)\n                    response = None\n            else:\n                LOG.debug('No UUID for event source %s', self.arn)\n            return response\n\n    class ExtendedSnsEventSource(kappa.event_source.sns.SNSEventSource):\n        @property\n        def filters(self):\n            return self._config.get('filters')\n\n        def add_filters(self, function):\n            try:\n                subscription = self.exists(function)\n                if subscription:\n                    response = self._sns.call(\n                        'set_subscription_attributes',\n                        SubscriptionArn=subscription['SubscriptionArn'],\n                        AttributeName='FilterPolicy',\n                        AttributeValue=json.dumps(self.filters)\n                    )\n                    kappa.event_source.sns.LOG.debug(response)\n            except Exception:\n                kappa.event_source.sns.LOG.exception('Unable to add filters for SNS topic %s', self.arn)\n\n        def add(self, function):\n            super().add(function)\n            if self.filters:\n                self.add_filters(function)\n\n    event_source_map = {\n        'dynamodb': kappa.event_source.dynamodb_stream.DynamoDBStreamEventSource,\n        'kinesis': kappa.event_source.kinesis.KinesisEventSource,\n        's3': kappa.event_source.s3.S3EventSource,\n        'sns': ExtendedSnsEventSource,\n        'sqs': SqsEventSource,\n        'events': kappa.event_source.cloudwatch.CloudWatchEventSource\n    }\n\n    arn = event_source['arn']\n    _, _, svc, _ = arn.split(':', 3)\n\n    event_source_func = event_source_map.get(svc, None)\n    if not event_source_func:\n        raise ValueError('Unknown event source: {0}'.format(arn))\n\n    def autoreturn(self, function_name):\n        return function_name\n\n    event_source_func._make_notification_id = autoreturn\n\n    ctx = PseudoContext()\n    ctx.session = boto_session\n\n    funk = PseudoFunction()\n    funk.name = lambda_arn\n\n    # Kappa 0.6.0 requires this nasty hacking,\n    # hopefully we can remove at least some of this soon.\n    # Kappa 0.7.0 introduces a whole host over other changes we don't\n    # really want, so we're stuck here for a little while.\n\n    # Related:  https://github.com/Miserlou/Zappa/issues/684\n    #           https://github.com/Miserlou/Zappa/issues/688\n    #           https://github.com/Miserlou/Zappa/commit/3216f7e5149e76921ecdf9451167846b95616313\n    if svc == 's3':\n        split_arn = lambda_arn.split(':')\n        arn_front = ':'.join(split_arn[:-1])\n        arn_back = split_arn[-1]\n        ctx.environment = arn_back\n        funk.arn = arn_front\n        funk.name = ':'.join([arn_back, target_function])\n    else:\n        funk.arn = lambda_arn\n\n    funk._context = ctx\n\n    event_source_obj = event_source_func(ctx, event_source)\n\n    return event_source_obj, ctx, funk\n\ndef add_event_source(event_source, lambda_arn, target_function, boto_session, dry=False):\n    \"\"\"\n    Given an event_source dictionary, create the object and add the event source.\n    \"\"\"\n\n    event_source_obj, ctx, funk = get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False)\n    # TODO: Detect changes in config and refine exists algorithm\n    if not dry:\n        if not event_source_obj.status(funk):\n            event_source_obj.add(funk)\n            return 'successful' if event_source_obj.status(funk) else 'failed'\n        else:\n            return 'exists'\n\n    return 'dryrun'\n\ndef remove_event_source(event_source, lambda_arn, target_function, boto_session, dry=False):\n    \"\"\"\n    Given an event_source dictionary, create the object and remove the event source.\n    \"\"\"\n\n    event_source_obj, ctx, funk = get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False)\n\n    # This is slightly dirty, but necessary for using Kappa this way.\n    funk.arn = lambda_arn\n    if not dry:\n        rule_response = event_source_obj.remove(funk)\n        return rule_response\n    else:\n        return event_source_obj\n\ndef get_event_source_status(event_source, lambda_arn, target_function, boto_session, dry=False):\n    \"\"\"\n    Given an event_source dictionary, create the object and get the event source status.\n    \"\"\"\n\n    event_source_obj, ctx, funk = get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False)\n    return event_source_obj.status(funk)\n\n##\n# Analytics / Surveillance / Nagging\n##\n\ndef check_new_version_available(this_version):\n    \"\"\"\n    Checks if a newer version of Zappa is available.\n\n    Returns True is updateable, else False.\n\n    \"\"\"\n    import requests\n\n    pypi_url = 'https://pypi.org/pypi/Zappa/json'\n    resp = requests.get(pypi_url, timeout=1.5)\n    top_version = resp.json()['info']['version']\n\n    return this_version != top_version\n\n\nclass InvalidAwsLambdaName(Exception):\n    \"\"\"Exception: proposed AWS Lambda name is invalid\"\"\"\n    pass\n\n\ndef validate_name(name, maxlen=80):\n    \"\"\"Validate name for AWS Lambda function.\n    name: actual name (without `arn:aws:lambda:...:` prefix and without\n        `:$LATEST`, alias or version suffix.\n    maxlen: max allowed length for name without prefix and suffix.\n\n    The value 80 was calculated from prefix with longest known region name\n    and assuming that no alias or version would be longer than `$LATEST`.\n\n    Based on AWS Lambda spec\n    http://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html\n\n    Return: the name\n    Raise: InvalidAwsLambdaName, if the name is invalid.\n    \"\"\"\n    if not isinstance(name, basestring):\n        msg = \"Name must be of type string\"\n        raise InvalidAwsLambdaName(msg)\n    if len(name) > maxlen:\n        msg = \"Name is longer than {maxlen} characters.\"\n        raise InvalidAwsLambdaName(msg.format(maxlen=maxlen))\n    if len(name) == 0:\n        msg = \"Name must not be empty string.\"\n        raise InvalidAwsLambdaName(msg)\n    if not re.match(\"^[a-zA-Z0-9-_]+$\", name):\n        msg = \"Name can only contain characters from a-z, A-Z, 0-9, _ and -\"\n        raise InvalidAwsLambdaName(msg)\n    return name\n\n\ndef contains_python_files_or_subdirs(folder):\n    \"\"\"\n    Checks (recursively) if the directory contains .py or .pyc files\n    \"\"\"\n    for root, dirs, files in os.walk(folder):\n        if [filename for filename in files if filename.endswith('.py') or filename.endswith('.pyc')]:\n            return True\n\n        for d in dirs:\n            for _, subdirs, subfiles in os.walk(d):\n                if [filename for filename in subfiles if filename.endswith('.py') or filename.endswith('.pyc')]:\n                    return True\n\n    return False\n\n\ndef conflicts_with_a_neighbouring_module(directory_path):\n    \"\"\"\n    Checks if a directory lies in the same directory as a .py file with the same name.\n    \"\"\"\n    parent_dir_path, current_dir_name = os.path.split(os.path.normpath(directory_path))\n    neighbours = os.listdir(parent_dir_path)\n    conflicting_neighbour_filename = current_dir_name+'.py'\n    return conflicting_neighbour_filename in neighbours\n\n\n# https://github.com/Miserlou/Zappa/issues/1188\ndef titlecase_keys(d):\n    \"\"\"\n    Takes a dict with keys of type str and returns a new dict with all keys titlecased.\n    \"\"\"\n    return {k.title(): v for k, v in d.items()}\n\n\n# https://github.com/Miserlou/Zappa/issues/1688\ndef is_valid_bucket_name(name):\n    \"\"\"\n    Checks if an S3 bucket name is valid according to https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules\n    \"\"\"\n    # Bucket names must be at least 3 and no more than 63 characters long.\n    if (len(name) < 3 or len(name) > 63):\n        return False\n    # Bucket names must not contain uppercase characters or underscores.\n    if (any(x.isupper() for x in name)):\n        return False\n    if \"_\" in name:\n        return False\n    # Bucket names must start with a lowercase letter or number.\n    if not (name[0].islower() or name[0].isdigit()):\n        return False\n    # Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.).\n    for label in name.split(\".\"):\n        # Each label must start and end with a lowercase letter or a number.\n        if len(label) < 1:\n            return False\n        if not (label[0].islower() or label[0].isdigit()):\n            return False\n        if not (label[-1].islower() or label[-1].isdigit()):\n            return False\n    # Bucket names must not be formatted as an IP address (for example, 192.168.5.4).\n    looks_like_IP = True\n    for label in name.split(\".\"):\n        if not label.isdigit():\n            looks_like_IP = False\n            break\n    if looks_like_IP:\n        return False\n\n    return True\n\n\ndef merge_headers(event):\n    \"\"\"\n    Merge the values of headers and multiValueHeaders into a single dict.\n    Opens up support for multivalue headers via API Gateway and ALB.\n    See: https://github.com/Miserlou/Zappa/pull/1756\n    \"\"\"\n    headers = event.get('headers') or {}\n    multi_headers = (event.get('multiValueHeaders') or {}).copy()\n    for h in set(headers.keys()):\n        if h not in multi_headers:\n            multi_headers[h] = [headers[h]]\n    for h in multi_headers.keys():\n        multi_headers[h] = ', '.join(multi_headers[h])\n    return multi_headers\n"
  },
  {
    "path": "zappa/wsgi.py",
    "content": "import base64\nimport logging\nimport six\nimport sys\n\nfrom requestlogger import ApacheFormatter\nfrom werkzeug import urls\nfrom urllib.parse import urlencode\n\nfrom .utilities import merge_headers, titlecase_keys\n\nBINARY_METHODS = [\n                    \"POST\",\n                    \"PUT\",\n                    \"PATCH\",\n                    \"DELETE\",\n                    \"CONNECT\",\n                    \"OPTIONS\"\n                ]\n\n\ndef create_wsgi_request(event_info,\n                        server_name='zappa',\n                        script_name=None,\n                        trailing_slash=True,\n                        binary_support=False,\n                        base_path=None,\n                        context_header_mappings={},\n                        ):\n        \"\"\"\n        Given some event_info via API Gateway,\n        create and return a valid WSGI request environ.\n        \"\"\"\n        method = event_info['httpMethod']\n        headers = merge_headers(event_info) or {} # Allow for the AGW console 'Test' button to work (Pull #735)\n\n        \"\"\"\n        API Gateway and ALB both started allowing for multi-value querystring\n        params in Nov. 2018. If there aren't multi-value params present, then\n        it acts identically to 'queryStringParameters', so we can use it as a\n        drop-in replacement.\n\n        The one caveat here is that ALB will only include _one_ of\n        queryStringParameters _or_ multiValueQueryStringParameters, which means\n        we have to check for the existence of one and then fall back to the\n        other.\n        \"\"\"\n        if 'multiValueQueryStringParameters' in event_info:\n            query = event_info['multiValueQueryStringParameters']\n            query_string = urlencode(query, doseq=True) if query else ''\n        else:\n            query = event_info.get('queryStringParameters', {})\n            query_string = urlencode(query) if query else ''\n\n        if context_header_mappings:\n            for key, value in context_header_mappings.items():\n                parts = value.split('.')\n                header_val = event_info['requestContext']\n                for part in parts:\n                    if part not in header_val:\n                        header_val = None\n                        break\n                    else:\n                        header_val = header_val[part]\n                if header_val is not None:\n                    headers[key] = header_val\n\n        # Extract remote user from context if Authorizer is enabled\n        remote_user = None\n        if event_info['requestContext'].get('authorizer'):\n            remote_user = event_info['requestContext']['authorizer'].get('principalId')\n        elif event_info['requestContext'].get('identity'):\n            remote_user = event_info['requestContext']['identity'].get('userArn')\n\n        # Related:  https://github.com/Miserlou/Zappa/issues/677\n        #           https://github.com/Miserlou/Zappa/issues/683\n        #           https://github.com/Miserlou/Zappa/issues/696\n        #           https://github.com/Miserlou/Zappa/issues/836\n        #           https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Summary_table\n        if binary_support and (method in BINARY_METHODS):\n            if event_info.get('isBase64Encoded', False):\n                encoded_body = event_info['body']\n                body = base64.b64decode(encoded_body)\n            else:\n                body = event_info['body']\n                if isinstance(body, six.string_types):\n                    body = body.encode(\"utf-8\")\n\n        else:\n            body = event_info['body']\n            if isinstance(body, six.string_types):\n                body = body.encode(\"utf-8\")\n\n        # Make header names canonical, e.g. content-type => Content-Type\n        # https://github.com/Miserlou/Zappa/issues/1188\n        headers = titlecase_keys(headers)\n\n        path = urls.url_unquote(event_info['path'])\n        if base_path:\n            script_name = '/' + base_path\n\n            if path.startswith(script_name):\n                path = path[len(script_name):]\n\n        x_forwarded_for = headers.get('X-Forwarded-For', '')\n        if ',' in x_forwarded_for:\n            # The last one is the cloudfront proxy ip. The second to last is the real client ip.\n            # Everything else is user supplied and untrustworthy.\n            remote_addr = x_forwarded_for.split(', ')[-2]\n        else:\n            remote_addr = x_forwarded_for or '127.0.0.1'\n\n        environ = {\n            'PATH_INFO': get_wsgi_string(path),\n            'QUERY_STRING': get_wsgi_string(query_string),\n            'REMOTE_ADDR': remote_addr,\n            'REQUEST_METHOD': method,\n            'SCRIPT_NAME': get_wsgi_string(str(script_name)) if script_name else '',\n            'SERVER_NAME': str(server_name),\n            'SERVER_PORT': headers.get('X-Forwarded-Port', '80'),\n            'SERVER_PROTOCOL': str('HTTP/1.1'),\n            'wsgi.version': (1, 0),\n            'wsgi.url_scheme': headers.get('X-Forwarded-Proto', 'http'),\n            'wsgi.input': body,\n            'wsgi.errors': sys.stderr,\n            'wsgi.multiprocess': False,\n            'wsgi.multithread': False,\n            'wsgi.run_once': False,\n        }\n\n        # Input processing\n        if method in [\"POST\", \"PUT\", \"PATCH\", \"DELETE\"]:\n            if 'Content-Type' in headers:\n                environ['CONTENT_TYPE'] = headers['Content-Type']\n\n            # This must be Bytes or None\n            environ['wsgi.input'] = six.BytesIO(body)\n            if body:\n                environ['CONTENT_LENGTH'] = str(len(body))\n            else:\n                environ['CONTENT_LENGTH'] = '0'\n\n        for header in headers:\n            wsgi_name = \"HTTP_\" + header.upper().replace('-', '_')\n            environ[wsgi_name] = str(headers[header])\n\n        if script_name:\n            environ['SCRIPT_NAME'] = script_name\n            path_info = environ['PATH_INFO']\n\n            if script_name in path_info:\n                environ['PATH_INFO'].replace(script_name, '')\n\n        if remote_user:\n            environ['REMOTE_USER'] = remote_user\n\n        if event_info['requestContext'].get('authorizer'):\n            environ['API_GATEWAY_AUTHORIZER'] = event_info['requestContext']['authorizer']\n\n        return environ\n\n\ndef common_log(environ, response, response_time=None):\n    \"\"\"\n    Given the WSGI environ and the response,\n    log this event in Common Log Format.\n\n    \"\"\"\n\n    logger = logging.getLogger()\n\n    if response_time:\n        formatter = ApacheFormatter(with_response_time=True)\n        try:\n            log_entry = formatter(response.status_code, environ,\n                                  len(response.content), rt_us=response_time)\n        except TypeError:\n            # Upstream introduced a very annoying breaking change on the rt_ms/rt_us kwarg.\n            log_entry = formatter(response.status_code, environ,\n                                  len(response.content), rt_ms=response_time)\n    else:\n        formatter = ApacheFormatter(with_response_time=False)\n        log_entry = formatter(response.status_code, environ,\n                              len(response.content))\n\n    logger.info(log_entry)\n\n    return log_entry\n\n\n# Related: https://github.com/Miserlou/Zappa/issues/1199\ndef get_wsgi_string(string, encoding='utf-8'):\n    \"\"\"\n    Returns wsgi-compatible string\n    \"\"\"\n    return string.encode(encoding).decode('iso-8859-1')\n"
  }
]