Repository: Miserlou/Zappa Branch: master Commit: 5a11c17f5ecf Files: 474 Total size: 1.4 MB Directory structure: gitextract_xj1w1emc/ ├── .github/ │ ├── ISSUE_TEMPLATE.md │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── MANIFEST.in ├── README.md ├── docs/ │ ├── domain_with_free_ssl_dns.md │ └── domain_with_free_ssl_http.md ├── example/ │ ├── README.md │ ├── app.py │ ├── authmodule.py │ ├── mymodule.py │ ├── policy/ │ │ └── deploy.json │ └── requirements.txt ├── requirements.in ├── requirements.sh ├── requirements.txt ├── setup.py ├── test.sh ├── test_requirements.in ├── test_requirements.txt ├── test_settings.json ├── test_settings.py ├── tests/ │ ├── README.md │ ├── __init__.py │ ├── data/ │ │ ├── test1/ │ │ │ └── this_dir_is_not_a_module.txt │ │ ├── test1.py │ │ └── test2/ │ │ └── test.py │ ├── name_scenarios.json │ ├── placebo/ │ │ ├── TestZappa.test_cli_aws/ │ │ │ ├── apigateway.CreateApiKey_1.json │ │ │ ├── apigateway.CreateDeployment_1.json │ │ │ ├── apigateway.CreateDeployment_2.json │ │ │ ├── apigateway.CreateDeployment_3.json │ │ │ ├── apigateway.CreateResource_1.json │ │ │ ├── apigateway.CreateResource_2.json │ │ │ ├── apigateway.CreateResource_3.json │ │ │ ├── apigateway.CreateResource_4.json │ │ │ ├── apigateway.CreateResource_5.json │ │ │ ├── apigateway.CreateResource_6.json │ │ │ ├── apigateway.CreateResource_7.json │ │ │ ├── apigateway.CreateResource_8.json │ │ │ ├── apigateway.CreateResource_9.json │ │ │ ├── apigateway.DeleteApiKey_1.json │ │ │ ├── apigateway.DeleteRestApi_1.json │ │ │ ├── apigateway.DeleteRestApi_2.json │ │ │ ├── apigateway.GetApiKeys_1.json │ │ │ ├── apigateway.GetResources_1.json │ │ │ ├── apigateway.GetResources_2.json │ │ │ ├── apigateway.GetResources_3.json │ │ │ ├── apigateway.GetRestApi_1.json │ │ │ ├── apigateway.GetRestApi_2.json │ │ │ ├── apigateway.GetRestApis_1.json │ │ │ ├── apigateway.GetRestApis_2.json │ │ │ ├── apigateway.GetRestApis_3.json │ │ │ ├── apigateway.GetRestApis_4.json │ │ │ ├── apigateway.GetRestApis_5.json │ │ │ ├── apigateway.GetRestApis_6.json │ │ │ ├── apigateway.GetRestApis_7.json │ │ │ ├── apigateway.GetRestApis_8.json │ │ │ ├── apigateway.GetRestApis_9.json │ │ │ ├── apigateway.GetStages_1.json │ │ │ ├── apigateway.UpdateRestApi_1.json │ │ │ ├── apigateway.UpdateStage_1.json │ │ │ ├── apigateway.UpdateStage_2.json │ │ │ ├── apigateway.UpdateStage_3.json │ │ │ ├── cloudformation.CreateStack_1.json │ │ │ ├── cloudformation.DeleteStack_1.json │ │ │ ├── cloudformation.DescribeStackResource_1.json │ │ │ ├── cloudformation.DescribeStackResource_2.json │ │ │ ├── cloudformation.DescribeStackResource_3.json │ │ │ ├── cloudformation.DescribeStacks_1.json │ │ │ ├── cloudformation.DescribeStacks_10.json │ │ │ ├── cloudformation.DescribeStacks_11.json │ │ │ ├── cloudformation.DescribeStacks_12.json │ │ │ ├── cloudformation.DescribeStacks_13.json │ │ │ ├── cloudformation.DescribeStacks_14.json │ │ │ ├── cloudformation.DescribeStacks_15.json │ │ │ ├── cloudformation.DescribeStacks_16.json │ │ │ ├── cloudformation.DescribeStacks_2.json │ │ │ ├── cloudformation.DescribeStacks_3.json │ │ │ ├── cloudformation.DescribeStacks_4.json │ │ │ ├── cloudformation.DescribeStacks_5.json │ │ │ ├── cloudformation.DescribeStacks_6.json │ │ │ ├── cloudformation.DescribeStacks_7.json │ │ │ ├── cloudformation.DescribeStacks_8.json │ │ │ ├── cloudformation.DescribeStacks_9.json │ │ │ ├── cloudformation.ListStackResources_1.json │ │ │ ├── cloudformation.ListStackResources_10.json │ │ │ ├── cloudformation.ListStackResources_11.json │ │ │ ├── cloudformation.ListStackResources_12.json │ │ │ ├── cloudformation.ListStackResources_2.json │ │ │ ├── cloudformation.ListStackResources_3.json │ │ │ ├── cloudformation.ListStackResources_4.json │ │ │ ├── cloudformation.ListStackResources_5.json │ │ │ ├── cloudformation.ListStackResources_6.json │ │ │ ├── cloudformation.ListStackResources_7.json │ │ │ ├── cloudformation.ListStackResources_8.json │ │ │ ├── cloudformation.ListStackResources_9.json │ │ │ ├── cloudformation.UpdateStack_1.json │ │ │ ├── cognito-idp.DescribeUserPool_1.json │ │ │ ├── cognito-idp.UpdateUserPool_1.json │ │ │ ├── events.DeleteRule_1.json │ │ │ ├── events.DeleteRule_2.json │ │ │ ├── events.DeleteRule_3.json │ │ │ ├── events.DeleteRule_4.json │ │ │ ├── events.DeleteRule_5.json │ │ │ ├── events.DeleteRule_6.json │ │ │ ├── events.DeleteRule_7.json │ │ │ ├── events.DeleteRule_8.json │ │ │ ├── events.DeleteRule_9.json │ │ │ ├── events.ListRuleNamesByTarget_1.json │ │ │ ├── events.ListRuleNamesByTarget_2.json │ │ │ ├── events.ListRuleNamesByTarget_3.json │ │ │ ├── events.ListRuleNamesByTarget_4.json │ │ │ ├── events.ListRuleNamesByTarget_5.json │ │ │ ├── events.ListRuleNamesByTarget_6.json │ │ │ ├── events.ListRuleNamesByTarget_7.json │ │ │ ├── events.ListRuleNamesByTarget_8.json │ │ │ ├── events.ListTargetsByRule_1.json │ │ │ ├── events.ListTargetsByRule_10.json │ │ │ ├── events.ListTargetsByRule_11.json │ │ │ ├── events.ListTargetsByRule_12.json │ │ │ ├── events.ListTargetsByRule_2.json │ │ │ ├── events.ListTargetsByRule_3.json │ │ │ ├── events.ListTargetsByRule_4.json │ │ │ ├── events.ListTargetsByRule_5.json │ │ │ ├── events.ListTargetsByRule_6.json │ │ │ ├── events.ListTargetsByRule_7.json │ │ │ ├── events.ListTargetsByRule_8.json │ │ │ ├── events.ListTargetsByRule_9.json │ │ │ ├── events.PutRule_1.json │ │ │ ├── events.PutRule_10.json │ │ │ ├── events.PutRule_11.json │ │ │ ├── events.PutRule_12.json │ │ │ ├── events.PutRule_13.json │ │ │ ├── events.PutRule_14.json │ │ │ ├── events.PutRule_2.json │ │ │ ├── events.PutRule_3.json │ │ │ ├── events.PutRule_4.json │ │ │ ├── events.PutRule_5.json │ │ │ ├── events.PutRule_6.json │ │ │ ├── events.PutRule_7.json │ │ │ ├── events.PutRule_8.json │ │ │ ├── events.PutRule_9.json │ │ │ ├── events.PutTargets_1.json │ │ │ ├── events.PutTargets_10.json │ │ │ ├── events.PutTargets_11.json │ │ │ ├── events.PutTargets_12.json │ │ │ ├── events.PutTargets_13.json │ │ │ ├── events.PutTargets_14.json │ │ │ ├── events.PutTargets_2.json │ │ │ ├── events.PutTargets_3.json │ │ │ ├── events.PutTargets_4.json │ │ │ ├── events.PutTargets_5.json │ │ │ ├── events.PutTargets_6.json │ │ │ ├── events.PutTargets_7.json │ │ │ ├── events.PutTargets_8.json │ │ │ ├── events.PutTargets_9.json │ │ │ ├── events.RemoveTargets_1.json │ │ │ ├── events.RemoveTargets_2.json │ │ │ ├── events.RemoveTargets_3.json │ │ │ ├── events.RemoveTargets_4.json │ │ │ ├── events.RemoveTargets_5.json │ │ │ ├── events.RemoveTargets_6.json │ │ │ ├── events.RemoveTargets_7.json │ │ │ ├── events.RemoveTargets_8.json │ │ │ ├── events.RemoveTargets_9.json │ │ │ ├── iam.GetRolePolicy_1.json │ │ │ ├── iam.GetRolePolicy_10.json │ │ │ ├── iam.GetRolePolicy_11.json │ │ │ ├── iam.GetRolePolicy_12.json │ │ │ ├── iam.GetRolePolicy_2.json │ │ │ ├── iam.GetRolePolicy_3.json │ │ │ ├── iam.GetRolePolicy_4.json │ │ │ ├── iam.GetRolePolicy_5.json │ │ │ ├── iam.GetRolePolicy_6.json │ │ │ ├── iam.GetRolePolicy_7.json │ │ │ ├── iam.GetRolePolicy_8.json │ │ │ ├── iam.GetRolePolicy_9.json │ │ │ ├── iam.GetRole_1.json │ │ │ ├── iam.GetRole_10.json │ │ │ ├── iam.GetRole_11.json │ │ │ ├── iam.GetRole_12.json │ │ │ ├── iam.GetRole_2.json │ │ │ ├── iam.GetRole_3.json │ │ │ ├── iam.GetRole_4.json │ │ │ ├── iam.GetRole_5.json │ │ │ ├── iam.GetRole_6.json │ │ │ ├── iam.GetRole_7.json │ │ │ ├── iam.GetRole_8.json │ │ │ ├── iam.GetRole_9.json │ │ │ ├── iam.PutRolePolicy_1.json │ │ │ ├── lambda.AddPermission_1.json │ │ │ ├── lambda.AddPermission_10.json │ │ │ ├── lambda.AddPermission_11.json │ │ │ ├── lambda.AddPermission_12.json │ │ │ ├── lambda.AddPermission_13.json │ │ │ ├── lambda.AddPermission_14.json │ │ │ ├── lambda.AddPermission_2.json │ │ │ ├── lambda.AddPermission_3.json │ │ │ ├── lambda.AddPermission_4.json │ │ │ ├── lambda.AddPermission_5.json │ │ │ ├── lambda.AddPermission_6.json │ │ │ ├── lambda.AddPermission_7.json │ │ │ ├── lambda.AddPermission_8.json │ │ │ ├── lambda.AddPermission_9.json │ │ │ ├── lambda.CreateFunction_1.json │ │ │ ├── lambda.CreateFunction_2.json │ │ │ ├── lambda.CreateFunction_3.json │ │ │ ├── lambda.CreateFunction_4.json │ │ │ ├── lambda.CreateFunction_5.json │ │ │ ├── lambda.DeleteFunctionConcurrency_1.json │ │ │ ├── lambda.DeleteFunction_1.json │ │ │ ├── lambda.DeleteFunction_2.json │ │ │ ├── lambda.GetAlias_1.json │ │ │ ├── lambda.GetFunctionConfiguration_1.json │ │ │ ├── lambda.GetFunction_1.json │ │ │ ├── lambda.GetFunction_2.json │ │ │ ├── lambda.GetFunction_3.json │ │ │ ├── lambda.GetFunction_4.json │ │ │ ├── lambda.GetFunction_5.json │ │ │ ├── lambda.GetFunction_6.json │ │ │ ├── lambda.GetFunction_7.json │ │ │ ├── lambda.GetFunction_8.json │ │ │ ├── lambda.GetPolicy_1.json │ │ │ ├── lambda.ListVersionsByFunction_1.json │ │ │ ├── lambda.ListVersionsByFunction_2.json │ │ │ ├── lambda.ListVersionsByFunction_3.json │ │ │ ├── lambda.ListVersionsByFunction_4.json │ │ │ ├── lambda.UpdateAlias_1.json │ │ │ ├── lambda.UpdateFunctionCode_1.json │ │ │ ├── lambda.UpdateFunctionCode_2.json │ │ │ ├── lambda.UpdateFunctionCode_3.json │ │ │ ├── lambda.UpdateFunctionCode_4.json │ │ │ ├── lambda.UpdateFunctionCode_5.json │ │ │ ├── lambda.UpdateFunctionCode_6.json │ │ │ ├── lambda.UpdateFunctionConfiguration_1.json │ │ │ ├── logs.DeleteLogGroup_1.json │ │ │ ├── logs.DeleteLogGroup_2.json │ │ │ ├── logs.DeleteLogGroup_3.json │ │ │ ├── logs.DescribeLogStreams_1.json │ │ │ ├── logs.DescribeLogStreams_2.json │ │ │ ├── logs.DescribeLogStreams_3.json │ │ │ ├── logs.DescribeLogStreams_4.json │ │ │ ├── logs.FilterLogEvents_1.json │ │ │ ├── logs.FilterLogEvents_2.json │ │ │ ├── logs.FilterLogEvents_3.json │ │ │ ├── logs.FilterLogEvents_4.json │ │ │ ├── s3.CompleteMultipartUpload_1.json │ │ │ ├── s3.CompleteMultipartUpload_2.json │ │ │ ├── s3.CompleteMultipartUpload_3.json │ │ │ ├── s3.CompleteMultipartUpload_4.json │ │ │ ├── s3.CompleteMultipartUpload_5.json │ │ │ ├── s3.CompleteMultipartUpload_6.json │ │ │ ├── s3.CreateBucket_1.json │ │ │ ├── s3.CreateBucket_10.json │ │ │ ├── s3.CreateBucket_2.json │ │ │ ├── s3.CreateBucket_3.json │ │ │ ├── s3.CreateBucket_4.json │ │ │ ├── s3.CreateBucket_5.json │ │ │ ├── s3.CreateBucket_6.json │ │ │ ├── s3.CreateBucket_7.json │ │ │ ├── s3.CreateBucket_8.json │ │ │ ├── s3.CreateBucket_9.json │ │ │ ├── s3.CreateMultipartUpload_1.json │ │ │ ├── s3.CreateMultipartUpload_2.json │ │ │ ├── s3.CreateMultipartUpload_3.json │ │ │ ├── s3.CreateMultipartUpload_4.json │ │ │ ├── s3.CreateMultipartUpload_5.json │ │ │ ├── s3.CreateMultipartUpload_6.json │ │ │ ├── s3.CreateMultipartUpload_7.json │ │ │ ├── s3.CreateMultipartUpload_8.json │ │ │ ├── s3.DeleteObject_1.json │ │ │ ├── s3.DeleteObject_2.json │ │ │ ├── s3.DeleteObject_3.json │ │ │ ├── s3.DeleteObject_4.json │ │ │ ├── s3.DeleteObject_5.json │ │ │ ├── s3.DeleteObject_6.json │ │ │ ├── s3.HeadBucket_1.json │ │ │ ├── s3.HeadBucket_2.json │ │ │ ├── s3.HeadBucket_3.json │ │ │ ├── s3.HeadBucket_4.json │ │ │ ├── s3.HeadBucket_5.json │ │ │ ├── s3.HeadBucket_6.json │ │ │ ├── s3.PutObject_1.json │ │ │ ├── s3.PutObject_2.json │ │ │ ├── s3.UploadPart_1.json │ │ │ ├── s3.UploadPart_10.json │ │ │ ├── s3.UploadPart_11.json │ │ │ ├── s3.UploadPart_12.json │ │ │ ├── s3.UploadPart_13.json │ │ │ ├── s3.UploadPart_14.json │ │ │ ├── s3.UploadPart_15.json │ │ │ ├── s3.UploadPart_16.json │ │ │ ├── s3.UploadPart_17.json │ │ │ ├── s3.UploadPart_18.json │ │ │ ├── s3.UploadPart_19.json │ │ │ ├── s3.UploadPart_2.json │ │ │ ├── s3.UploadPart_20.json │ │ │ ├── s3.UploadPart_21.json │ │ │ ├── s3.UploadPart_22.json │ │ │ ├── s3.UploadPart_23.json │ │ │ ├── s3.UploadPart_24.json │ │ │ ├── s3.UploadPart_25.json │ │ │ ├── s3.UploadPart_26.json │ │ │ ├── s3.UploadPart_27.json │ │ │ ├── s3.UploadPart_28.json │ │ │ ├── s3.UploadPart_29.json │ │ │ ├── s3.UploadPart_3.json │ │ │ ├── s3.UploadPart_30.json │ │ │ ├── s3.UploadPart_31.json │ │ │ ├── s3.UploadPart_32.json │ │ │ ├── s3.UploadPart_33.json │ │ │ ├── s3.UploadPart_34.json │ │ │ ├── s3.UploadPart_35.json │ │ │ ├── s3.UploadPart_36.json │ │ │ ├── s3.UploadPart_37.json │ │ │ ├── s3.UploadPart_38.json │ │ │ ├── s3.UploadPart_39.json │ │ │ ├── s3.UploadPart_4.json │ │ │ ├── s3.UploadPart_40.json │ │ │ ├── s3.UploadPart_41.json │ │ │ ├── s3.UploadPart_42.json │ │ │ ├── s3.UploadPart_43.json │ │ │ ├── s3.UploadPart_44.json │ │ │ ├── s3.UploadPart_45.json │ │ │ ├── s3.UploadPart_46.json │ │ │ ├── s3.UploadPart_47.json │ │ │ ├── s3.UploadPart_48.json │ │ │ ├── s3.UploadPart_5.json │ │ │ ├── s3.UploadPart_6.json │ │ │ ├── s3.UploadPart_7.json │ │ │ ├── s3.UploadPart_8.json │ │ │ ├── s3.UploadPart_9.json │ │ │ ├── sns.ListSubscriptionsByTopic_1.json │ │ │ ├── sns.ListSubscriptionsByTopic_2.json │ │ │ ├── sns.ListSubscriptionsByTopic_3.json │ │ │ ├── sns.ListSubscriptionsByTopic_4.json │ │ │ ├── sns.ListSubscriptionsByTopic_5.json │ │ │ ├── sns.ListSubscriptionsByTopic_6.json │ │ │ ├── sns.ListSubscriptionsByTopic_7.json │ │ │ ├── sns.ListSubscriptionsByTopic_8.json │ │ │ ├── sns.SetSubscriptionAttributes_1.json │ │ │ ├── sns.Subscribe_1.json │ │ │ ├── sns.Subscribe_2.json │ │ │ ├── sns.Subscribe_3.json │ │ │ ├── sns.Subscribe_4.json │ │ │ ├── sns.Subscribe_5.json │ │ │ ├── sns.Subscribe_6.json │ │ │ ├── sns.Unsubscribe_1.json │ │ │ ├── sns.Unsubscribe_2.json │ │ │ ├── sns.Unsubscribe_3.json │ │ │ ├── sns.Unsubscribe_4.json │ │ │ ├── sns.Unsubscribe_5.json │ │ │ └── sts.GetCallerIdentity_1.json │ │ ├── TestZappa.test_cli_aws_status/ │ │ │ ├── apigateway.GetApiKeys_1.json │ │ │ ├── apigateway.GetRestApis_1.json │ │ │ ├── events.DescribeRule_1.json │ │ │ ├── events.ListRuleNamesByTarget_1.json │ │ │ ├── events.ListRules_1.json │ │ │ ├── lambda.GetFunction_1.json │ │ │ ├── lambda.ListVersionsByFunction_1.json │ │ │ ├── monitoring.GetMetricStatistics_1.json │ │ │ └── monitoring.GetMetricStatistics_2.json │ │ ├── TestZappa.test_cli_cognito_triggers/ │ │ │ ├── cognito-idp.DescribeUserPool_1.json │ │ │ ├── cognito-idp.UpdateUserPool_1.json │ │ │ ├── lambda.AddPermission_1.json │ │ │ └── sts.GetCallerIdentity_1.json │ │ ├── TestZappa.test_cognito_trigger/ │ │ │ ├── cognito-idp.DescribeUserPool_1.json │ │ │ ├── cognito-idp.UpdateUserPool_1.json │ │ │ ├── lambda.AddPermission_1.json │ │ │ └── sts.GetCallerIdentity_1.json │ │ ├── TestZappa.test_cognito_trigger_existing/ │ │ │ ├── cognito-idp.DescribeUserPool_1.json │ │ │ ├── cognito-idp.UpdateUserPool_1.json │ │ │ ├── lambda.AddPermission_1.json │ │ │ └── sts.GetCallerIdentity_1.json │ │ ├── TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/ │ │ │ ├── cognito-idp.DescribeUserPool_1.json │ │ │ ├── cognito-idp.UpdateUserPool_1.json │ │ │ ├── lambda.AddPermission_1.json │ │ │ └── sts.GetCallerIdentity_1.json │ │ ├── TestZappa.test_copy_on_s3/ │ │ │ ├── s3.AbortMultipartUpload_1.json │ │ │ ├── s3.CompleteMultipartUpload_1.json │ │ │ ├── s3.CopyObject_1.json │ │ │ ├── s3.CreateBucket_1.json │ │ │ ├── s3.CreateMultipartUpload_1.json │ │ │ ├── s3.HeadBucket_1.json │ │ │ ├── s3.HeadObject_1.json │ │ │ ├── s3.PutObject_1.json │ │ │ └── s3.UploadPart_1.json │ │ ├── TestZappa.test_create_iam_roles/ │ │ │ ├── iam.CreateRole_1.json │ │ │ ├── iam.GetRolePolicy_1.json │ │ │ ├── iam.GetRolePolicy_2.json │ │ │ ├── iam.GetRole_1.json │ │ │ ├── iam.GetRole_2.json │ │ │ └── iam.PutRolePolicy_1.json │ │ ├── TestZappa.test_create_lambda_function_local/ │ │ │ ├── lambda.CreateAlias_1.json │ │ │ ├── lambda.CreateFunction_1.json │ │ │ ├── lambda.DeleteFunctionConcurrency_1.json │ │ │ ├── lambda.GetAlias_1.json │ │ │ ├── lambda.UpdateAlias_1.json │ │ │ └── lambda.UpdateFunctionCode_1.json │ │ ├── TestZappa.test_create_lambda_function_s3/ │ │ │ ├── lambda.CreateAlias_1.json │ │ │ ├── lambda.CreateFunction_1.json │ │ │ ├── lambda.DeleteFunctionConcurrency_1.json │ │ │ ├── lambda.GetAlias_1.json │ │ │ ├── lambda.UpdateAlias_1.json │ │ │ └── lambda.UpdateFunctionCode_1.json │ │ ├── TestZappa.test_deploy_api_gateway/ │ │ │ ├── apigateway.CreateDeployment_1.json │ │ │ ├── apigateway.CreateRestApi_1.json │ │ │ ├── apigateway.GetResources_1.json │ │ │ ├── apigateway.GetRestApi_1.json │ │ │ ├── apigateway.GetRestApis_1.json │ │ │ ├── apigateway.PutIntegrationResponse_1.json │ │ │ ├── apigateway.PutIntegration_1.json │ │ │ ├── apigateway.PutMethodResponse_1.json │ │ │ ├── apigateway.PutMethod_1.json │ │ │ └── apigateway.UpdateStage_1.json │ │ ├── TestZappa.test_fetch_logs/ │ │ │ ├── logs.DescribeLogStreams_1.json │ │ │ └── logs.FilterLogEvents_1.json │ │ ├── TestZappa.test_get_api_url/ │ │ │ └── apigateway.GetRestApis_1.json │ │ ├── TestZappa.test_handler/ │ │ │ └── s3.GetObject_1.json │ │ ├── TestZappa.test_invoke_lambda_function/ │ │ │ └── lambda.Invoke_1.json │ │ ├── TestZappa.test_rollback_lambda_function_version/ │ │ │ ├── lambda.GetFunction_1.json │ │ │ ├── lambda.ListVersionsByFunction_1.json │ │ │ ├── lambda.ListVersionsByFunction_2.json │ │ │ └── lambda.UpdateFunctionCode_1.json │ │ └── TestZappa.test_upload_remove_s3/ │ │ ├── s3.CompleteMultipartUpload_1.json │ │ ├── s3.CreateBucket_1.json │ │ ├── s3.CreateMultipartUpload_1.json │ │ ├── s3.DeleteObject_1.json │ │ ├── s3.HeadBucket_1.json │ │ ├── s3.HeadObject_1.json │ │ ├── s3.PutObject_1.json │ │ └── s3.UploadPart_1.json │ ├── test_app.py │ ├── test_bad_circular_extends_settings.json │ ├── test_bad_environment_vars.json │ ├── test_bad_settings.json │ ├── test_bad_stage_name_settings.json │ ├── test_bot_exception_handler_settings.py │ ├── test_bot_handler_being_triggered.py │ ├── test_event_script_app.py │ ├── test_event_script_settings.py │ ├── test_exception_handler_settings.py │ ├── test_handler.py │ ├── test_non_ascii_environment_var_key.json │ ├── test_one_env.json │ ├── test_settings.toml │ ├── test_settings.yaml │ ├── test_settings.yml │ ├── test_wsgi_script_name_app.py │ ├── test_wsgi_script_name_settings.py │ ├── tests.py │ ├── tests_async.py │ ├── tests_async_old.py │ ├── tests_docs.py │ ├── tests_middleware.py │ ├── tests_placebo.py │ └── utils.py └── zappa/ ├── __init__.py ├── async.py ├── asynchronous.py ├── cli.py ├── core.py ├── ext/ │ ├── __init__.py │ └── django_zappa.py ├── handler.py ├── letsencrypt.py ├── middleware.py ├── policies.py ├── utilities.py └── wsgi.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ ## Context ## Expected Behavior ## Actual Behavior ## Possible Fix ## Steps to Reproduce 1. 2. 3. ## Your Environment * Zappa version used: * Operating System and Python version: * The output of `pip freeze`: * Link to your project (optional): * Your `zappa_settings.json`: ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ## Description ## GitHub Issues ================================================ FILE: .gitignore ================================================ *~ *.zip # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coveragerc .coverage.* .cache nosetests.xml coverage.xml *,cover .hypothesis/ # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ # pyenv .python-version # PyCharm # Project settings from the PyCharm IDE are stored in the .idea folder .idea/ # Apple OS X specific files are put into the .DS_Store file .DS_Store # Vim stuff: *.swp *.swo *~ tests/zappa_settings.json tests/example_template_outputs # Locally generated settings file zappa_settings.json # Sublime Text stuff *.sublime-project *.sublime-workspace README.test.md .vscode .mypy_cache .pytest_cache ================================================ FILE: .travis.yml ================================================ language: python python: - "3.6" - "3.7" - "3.8" dist: xenial # command to install dependencies cache: - pip install: - "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" # command to run tests env: - TESTCASE=tests/tests_docs.py - TESTCASE=tests/test_handler.py - TESTCASE=tests/tests_middleware.py - TESTCASE=tests/tests_placebo.py - TESTCASE=tests/tests_async.py - TESTCASE=tests/tests.py before_script: # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics script: - nosetests $TESTCASE --with-coverage --cover-package=zappa --with-timer # - coverage combine --append after_success: coveralls notifications: slack: zappateam:TTJ0mfHunDK0IBweKkEXjGpR ================================================ FILE: CHANGELOG.md ================================================ # Zappa Changelog ## 0.52.0 * Remove dateutil version restriction * Fix failed downloads of wheel packages with non-alphanumeric characters * Last release from Miserlou/Zappa * Removed references to zappa.io ## 0.51.0 * Lambda Layers * Cognito support * Skip venv check if --no_venv argument is passed * Fix for abi3 filename matching * Wait for the Load Balancer to become active before proceeding * Add option 'Scheme' for alb config * Allow full path exclusions while packaging * Workaround for werkzeug incompatibility * And assorted fixes ## 0.50.0 * Updated manylinux to support manylinux1/manylinux2010/manylinux2014 packages * Fixed issue with duplicated cookie headers in API Gateway * Various maintenance updates to the README file * Remove old python 2.7 code (not all yet) * Use pip-tools to manage dependencies (and remove pinned dependencies from the package) * Add option for concurrency limit * Use safe_load with YAML * Support for ABI3 binary packages (particularly cryptography) * Remove dependency on lambda-packages ## 0.49.0 * Added support for Python 3.8 * Fixed boto3 reporting of long names * Added support for new AWS Regions * Minor bug and README fixes ## 0.48.2 * Last version with Python 2.7 support. * Fix for invalid values of HTTP_HOST and others (introduced in 0.48.0) ## 0.48.1 * Fix for an issue where you couldn't update a function if it had been deployed with a version prior to 0.48.0 * Support for private (VPC-only) API Gateway endpoints ## 0.48.0 * Deprecation of zappa.async because async is a reserved word in 3.7, please use zappa.asynchronous * Support for Application Load Balancer as an alternative to API Gateway * Improvements in manylinux wheel downloads * Support for multi-value query strings * Python 3.7 support * Support for multi-value headers * Support for the new 256kB async limit * Bunch of small typos, fixes and documentation improvements * Use Django 2 on tests with python 3 * Stop applying tags on buckets not created by zappa * Be more forgiving on 504 errors during deployment * Fix cleanup of DynamoDB table for async tasks * Detection of invalid bucket names * Flake8 checks added to tests ## 0.47.1 * Handle accounts with more than 100 domains in route 53 * Force requests upgrade to 2.20.0 for compatibility with urllib3 1.24 * Allow defining API Gateway policies (including restricting access to one IP address) ## 0.47.0 * Support for SQS events * Added test to enforce running of doctoc * Add support for running django as a WSGI app (for NewRelic and others) * Updates AWS regions for lambda and API Gateway * Fix support for gcloud and other packages with slim_handler * Add --disable-keep-open to zappa tail * Dependency updates * Fix pyenv invocation * Add custom base_path stripping support * Multiple documentation fixes and improvements * first iteration of a documented deploy policy ## 0.46.2 * hotfix for creating virtual environments ## 0.46.1 * Hotfix for pipenv support (pip >10.0.1) * Adds AWS GovCloud support! * Test fix ## 0.46.0 _Okay, I dropped the ball for a long time. Bad BDFL!_ _New releases will come much faster once again_ * Pip10 compatibility * Add support for base path configuration in API gateway custom domain. * Fix path case sensitivity in get_installed_packages * Move task decorator async decision from import time to call time. * Fix documentation error in authorizer stanza of zappa_settings.json. * Adding explicit UTF-8 encoding for Flask app detection * Bump lambda packages version * Fix for work with latest Werkezeug * Fixed parameter name from 'FunctionNmae' -> 'FunctionName' * Remove `use`; fixes #1522 * Philippe Trounev is awesome * fix case sensitivity problem for comparing package location * isBase64Encoded is a boolean flag instead of string true * check pip return code as sometimes pypi lookup fails * Add support to delete old versions of lambda functions. * Reactor title casing of dict keys into a utility function * Add `role_arn` settings variable * ..and too many more, check the changelog! ## 0.45.1 * Make `package_info.json` consistent across Python versions * Fixes to `task_sns` ## 0.45.0 * Add support for SQLite on Python 3.6 (LP bump) * Add unique package identifier file * Fixes #1171 don't colorize partial words * Various small changes * More robust OpenSSL parsing for LE * Update applies tags * Allows deploying and updating from existing S3 package ## 0.44.3 * Slim handler packaging hotfix - thanks @mcrowson! ## 0.44.2 * Non-Dynamo asynx hotfix - thanks @jwkvam! ## 0.44.1 * Packaging hotfix - thank Yunseop! ## 0.44.0 * Async responses (thanks Sean!) * Remove setLevel call from common log * Fix #1023 * Merge #1058, 1059, 1073 * Allow overriding of endpoint_url arg * Add support for API Gateway stage variables * Add AWS X-Ray support (thanks @mathom!) * Events take kwargs (Thanks @mcrowson!) * Detect P2/3 during `init` * Include stage names in `slim_handler` zips * Allow `-s` with `manage` * Use same S3 bucket for global endpoints * Fix bug with mixed-case packages * Cache wheels, fix 0-byte wheels ## 0.43.2 * Add index prefix to each subsequent schedule expression for the same event (#1051) * fix/Only update CORS on resources which have an OPTIONS method (#1036) * Support for binary support and cors simultaneously (#1011) * Set Flask script name based on domain which the request was made to (#1015) * Fix SNS Async (#1055) * GZip for slim handler * Force color option * Various dep bumps ## 0.43.1 * Fixes #1001, don't override AWS env vars if k:v not set. Thanks Nik and Sean! ## 0.43.0 * Checks for the key 'Environment' when fetching remote lambda env vars (#988) * except BotoCoreError before general exception in zappa.cli.update * make cookie hack case-insensitive * Fix #998 - Make environment variable keys strings instead of byte arrays in python 3.6 * Add --disable_progress command line parameter * #946 - Allow setting cors to false. * #870 Lambda from outside * Implement context header mappings - Feature Request Issue #939 * Separating out native AWS environment variables ##962 * Rule name shortening * Splintering aws_environment_variables from environment_variables (to avoid overwriting AWS native env vars). ## 0.42.2 * Add exclude for __pycache__ contents (#943) * Fix #937 - Use get_data * Add support for configuring APIGW cache TTL and encryption #942 * Addressing #909: Don't load credentials for 'package' command ## 0.42.1 * Small fixes for #918, #922, #803, #802, #799, #888, #903, #893, #828, #874, and others. * Support for manylinux wheels Python 3.6 package downloading. * Py3 `certify` fixes. * Add support for multiple expressions when scheduling * Fix content-type headers not passing through on DELETE * Avoid creating __init__.py in a directory next to a module (.py file) with the same name * Check recursively if there is any .py{,c} file in a directory before creating __init__.py * Fix SNS event tasks * Bump lambda-packages ## 0.42.0 * Cached manylinux wheel installed * New dependency installation formatting * Clarify "stage" vs "environment" terminology in code * Fix problem with capitalized packages * Delete local package if using wheels version. This saves several MBs on package size in some cases (e.g. numpy). * Thanks to @mcrowson, @nikbora and @schuyler1d ## 0.41.3 * Various Python3 fixes * Remove some dead code * More binary package fixes thanks to and @nikbora and @bxm156 * Improved async tasks thanks to @schuyler1d * Various small changes ## 0.41.2 * Support for new `lambda-packages` format (Python3 support) * Fix `setup.py` on Windows Python3 * Fix #818 - python3 import for LE * Support AWS-specific environment variables (with KMS) ## 0.41.1 * Add `template` command * Add `--json` in more places * Add `--output` to package * Support for manylinux wheels Python 3.6 package downloading #803 from nikbora * Fix PyEnv exit code #799 ## 0.41.0 * Add Python3 Support! #793, #6 * Deprecate `lets_encrypt_expression` * Refactor a bunch of stuff to work with Python3 package restrictions >:[ * #776 fix for libmysqlclient.so.18 error when using `slim_handler` * add profile and region detection to init - thanks @pdpol * #774 Wsgi environment improvements (Fix untrustworthy remote_addr) * Only create `__init__.py` file if there are python files or sub dirs in the folder * Update docs to reflect lambda name prepended to role_name * Guard log responses (thanks @scoates) ## 0.40.0 * Add Async Task Support! Lots of tickets and PRs related, including #61, #603, #694 and #732. * More info here: https://blog.zappa.io/posts/zappa-introduces-seamless-asynchronous-task-execution * Fix Django non-WSGI function initialization, #748 * Add support for AWS Lambda Dead Letter Queue, #740 * Fix API Gateway test button (the bolt button), #735 * Switch to using per-lambda-name (project-stage) rather than a single default LambdaExecutionRole ## 0.39.1 * Fix broken Let's Encrypt trying to use new ACM ARNs * Add `apigateway_description` setting, fixes #722 * More aggressive virtualenvironment checking ## 0.39.0 * Add `certificate_arn` setting, support for AWS Certificate Manager (#710) * Fix zip permissions when building on Windows (#714) * Change the active working directory to `/tmp` when using the slim handler so that relative filepaths work. (#711) ## 0.38.1 * Hotfix for broken Django deploys ## 0.38.0 * Add confirm to `certify` * Add `--manual` to `--certify` * Fix `certify` for existing domains * Add `extra_permissions` setting * Add `shell` command ## 0.37.2 * Revert to Kappa 0.6.0 #684 and others * Add binary support for more HTTP methods, #696 ## 0.37.1 * Add binary upload support, fix #683 ## 0.37.0 * Add support for custom, non-Let's Encrypt certificates, thanks to Benjamin Congdon * Change default permissions to allow executable binaries, #682 * Fix binary support for Django POST, #677 ## 0.36.1 * Remove Kappa 0.6 specific hack * Bring back '-' substitution ## 0.36.0 * Add automatic support for serving binary files! Via @wobeng, closes #481 * Fixes `rollback` default back to 1 from 0, #673 * Ensure correct chmodding during package creation, #484 * Update regions that Zappa supports, #667 * Validate function names based on actual gateway rules #521 * Fix unschedule events with trimmed names #662 * Fix a few places where `extends` wasn't respecting `stage_config`, #655 * Begin to remove some dead code * Dependency bumps ## 0.35.2 * Adds `--non-http` to `tail` ## 0.35.1 * Fix 64bit `lambda-packages` (#645) * Fix wheel packages (#642) ## 0.35.0 * Replace ZappaCookie with Set-Cookie permutation! :D (#636) * Bump `lambda-packages` version * Fix installed_packages_name_set (#637) * Add `slim_handler` (#548) * Various small requirements bumps and other fixes. ## 0.34.0 * Adds `--since` and `--filter` to `tail` * Fixes `unschedule` command when used with specific stage ## 0.33.0 * Adds `package` command * Forbids the use of unicode environment variable keys * Initialize wsgi.errors to sys.stderr (was '') * Accept `AWS_SESSION_TOKEN` when executing via an IAM role (#589) * Set `REMOTE_USER` even when using `iam_authorization` * Rename `lets_encrypt_schedule` to `lets_encrypt_expression` (#571) * Messages in `tail` are now sequential * Bump version requirements, update README * Various other small changes ## 0.32.1 * File `tail` broken in CLI refactor ## 0.32.0 * Add Cognito Authorizers * Refactor CLI, add Bash Completion * Improve manylinux wheels * Varios fixes and req bumps ## 0.31.0 * Adds the `cors` feature, big thanks to @AusIV! * Adds support for `-e` eggs, thanks to @schuyler1d and @xuru! * Adds support for YAML settings files. Eat up, hipsters. ## 0.30.1 * Add `--http` filter to `tail` * Prefer `apigateway_enabled` but still respect `use_apigateway`, #493 ## 0.30.0 * Adds colors to `zappa tail` output, fixes #492 * Adds `--no-color` CLI argument * Adds fatal warning for bad `app_function`s, fixes #485. ## 0.29.2 * Fix S3 broken S3 events * Move `use_apigateway` to `apigateway_enabled` ## 0.29.1 * Fixes progress bar error for manylinux packages * Safely handle freezes when downloading from PyPI * Adds `s3://` syntax for remote env files. (#478, thanks @Leandr!) ## 0.29.0 * Adds `extends` syntax to settings file. * Fixes Django migrations, #464 * Adds support for manylinux wheels! #398 * Fixes multiple events in `status` command * Fixes support for `certify` on apex domains, #451 ## 0.28.3 * Filter private hosted zones to avoid conflicts while certifying * Fix small Python3 bug (#457) * Fix for #453 (windows os.path) * Re-raise Zappa exception with full traceback * Skip pyc on django migrations, fixes #436 * Delete correct domain name, #448 ## 0.28.2 * added region and lambda name to not deployed error ## 0.28.1 * Add "global" mode to init. Expect a blog post soon! * Small refactors and dependency upgrades. ## 0.28.0 * `--json` for machine readable status output * `--all` for global deployment prep * Better exit code handling * Get AWS region from profile if not set in zappa_settings.json * Fix broken Django management command invocation * Add Kinesis permission * Add capability to specify authoriser arn * Various refactors and small fixes ## 0.27.1 * Bump lambda-packages * Fix new Django unicode problems (#397) * Ensure env vars are strings via @scoates * Fix #382 ## 0.27.0 * Remove many hacks using new API Gateway features. * Closes #303, #363, #361 * See the [blog post](https://blog.zappa.io/posts/unhacking-zappa-with-new-apigateway-features) for more details! * Bump dependencies - make sure you reinstall your requirements! * Improved stack update handling. ### 0.26.1 (Never Published) * Warn on namespace collisions. * Bump lambda-packages version. ## 0.26.0 * Use simplified API Gateway configuration, via @koriaf. * Add better support for `use_apigateway` without any supplied app function. Reported by @mguidone. * Truncate illegally long event functions names. Reported by @mguidone. ## 0.25.1 * Remove 'boto' from default excludes. #333, thanks Claude! * Don't allow invalid API Gateway characters in the config. Thanks @scoates! * Better respect for `use_apigateway` in `update` command. * Avoids hang with API Gateway limit reached. * Fix DynamoDB/Kinesis event sources, add docs. Big thanks Claude! ## 0.25.0 * Add ability to invoke raw python strings, like so: `zappa invoke dev "print 1+2+3" --raw` * Fixes multi-argument `manage` commands. * Updated related documentation. * Fixes places where program was exiting with status 0 instead of -1. Thanks @mattc! * Adds old-to-new-style check on delete, thanks @mathom. ## 0.24.2 * Fix a problem from trying to `update` old-style API routes using new Tropo code. Ensures `touch` works as intended again. Fix by @mathom. ## 0.24.1 * Add a helpful failure warning for users without permissions to automatically manage execution roles. * Fix potential div by zero error in new Tropo code. ## 0.24.0 * Use Troposphere/CloudFormation to create API Gateway routes - Thanks, @mathom! * `zappa update` now updates changes to API Gateway routes * Redirect HTML content injection is fixed * Redirect HTML content injection now only happens for 'text/html' content types. This is a partial solution to #303. * Added CHANGELOG.md ## 0.0.1 - 0.23.2 * Didn't keep a changelog * Sorry! * Read the commit log :) ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2017 Rich Jones Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MANIFEST.in ================================================ include README.md LICENSE requirements.txt test_requirements.txt requirements.in test_requirements.in recursive-include zappa *.py ================================================ FILE: README.md ================================================ 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! ================================================ FILE: docs/domain_with_free_ssl_dns.md ================================================ # Using Let's Encrypt with Zappa If 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! ### Step 1: Creating a Hosted Zone To 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. In 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: [![Console](http://i.imgur.com/1DflCR4.png)](https://console.aws.amazon.com/route53/) In your domain registrar's settings, set these new values as your domain's nameservers. These may take up to an hour to propagate. ### Step 2: Generating an AWS Account Key Next, you'll need to generate an account key that you'll use with Let's Encrypt. To generate it, simply: ``` $ openssl genrsa 2048 > account.key; ``` It's very important that you keep that key safe! _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._ ### Step 3: Certification Finally, configure your `zappa_settings.json` to use this domain and key: ```javascript { "dev": { ... "domain": "test.zappa.io", // Your target domain "lets_encrypt_key": "account.key", // Path to account key ... } } ``` If 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: ```javascript { "dev": { ... "domain": "test.zappa.io", // Your target domain "lets_encrypt_key": "s3://your-secure-bucket/account.key", // S3 Path to account key ... } } ``` Then, to verify, create and install your certificate with your domain, simply run the command: ``` $ zappa certify ``` And you're done! You can now use your SSL-secured Zappa application on your target domain. **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. Let's Encrypt certificates only last for 3 months, so make sure that you remember to renew in time. ### Step 4 (Optional): Auto-Renew If you want your certificates to renew automatically, use simply need to define a `lets_encrypt_expression` in your settings, like so: ```javascript { "dev": { ... "domain": "test.zappa.io", // Your target domain "lets_encrypt_key": "s3://your-secure-bucket/account.key", // S3 Path to account key "lets_encrypt_expression": "rate(15 days)", // LE Renew schedule ... } } ``` The 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`. ================================================ FILE: docs/domain_with_free_ssl_http.md ================================================ # Using Let's Encrypt with Zappa (HTTP Validation) ## IMPORTANT!: Zappa now supports DNS-based validation out of the box, so you should probably use that if possible! This 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. ## Tool Installation First, you should have a valid Zappa website deployed to API Gateway without a domain. You'll also need to install Let's Encrypt via git: ``` $ git clone https://github.com/letsencrypt/letsencrypt $ cd letsencrypt ``` and localtunnel via npm: ``` $ npm install -g localtunnel ``` ## Generating the Certificate In one terminal, run: ``` ./letsencrypt-auto certonly -d yoursub.example.com --manual ``` Hit 'Yes' until you get to a message like this: ``` Make sure your web server displays the following content at http://yoursub.example.com/.well-known/acme-challenge/OJkbegasdfnowA_xql_kqpl8hBImj9WbM88fDF35wBE before continuing: OJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE.Dowxk8snntasdfS433FYr2xtYZ0RaBcpaEXqmdc If you don't have HTTP server configured, you can run the following command on the target server (as root): mkdir -p /tmp/letsencrypt/public_html/.well-known/acme-challenge cd /tmp/letsencrypt/public_html printf "%s" OJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE.Dowxk8snnt2LxVZS3XS433FYr2xtYZ0RaBcpaEXqmdc > .well-known/acme-challenge/OJkbegIsNpnowA_xql_kqpl8hBImj9WbM88fDF35wBE # run only once per server: $(command -v python2 || command -v python2.7 || command -v python2.6) -c \ "import BaseHTTPServer, SimpleHTTPServer; \ s = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \ s.serve_forever()" Press ENTER to continue ``` Next, in another terminal, run the command it gave you as root. ``` sudo $(command -v python2 || command -v python2.7 || command -v python2.6) -c \ "import BaseHTTPServer, SimpleHTTPServer; \ s = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \ s.serve_forever()" ``` In a third terminal, run the following command (make sure firewall is off or allow port 80 through): ``` lt --port 80 --subdomain yoursub ``` Then, in a browser, visit http://yoursub.localtunnel.me/.well-known/acme-challenge/ and make sure that your challenge value is there. Next, 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. Then, 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/ ## Installing the Certificate In 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. | value | AWS API Gateway Custom Domain Name Setting field | | --- | --- | --- | | `yoursub.example.com` | Domain name | | `yoursub.example.com` | Certificate name | | `privkey.pem` | Certificate private key | | `cert.pem` | Certificate body | | `fullchain.pem` | Certificate chain. **Note**: only copy the 2nd part of the chain because the 1st part is the Certificate body, already provided. Finally, 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! ================================================ FILE: example/README.md ================================================ # Zappa Example This will deploy a simple Flask app ## Setup # configure your AWS keys $ aws configure ## Deploy WSGI App # deploy API to dev environment $ zappa deploy dev_api # Zappa will creates the API Gateway url for you similar to this $ curl https://zzz.execute-api.us-west-2.amazonaws.com/dev_api ## Schedule You can deploy just a function with a schedule: # deploy API to dev environment (doesn't create APIGateway resource) $ zappa deploy dev_event # schedule CloudWatch to run this Lambda function every minute $ zappa schedule dev_event # watch log $ zappa tail dev_event You can also call a scheduled function packaged along with your normal WSGI app: # deploy API to prod environment $ zappa deploy prod # schedule CloudWatch to run mymodule.myfunc every 5 minutes $ zappa schedule prod This function can optionally take the usual `event` and `context` lambda arguments. See `mymodule.myfunc_with_events` for an example of this. ## Local Testing To test locally you can execute the WSGI app like you would normally. $ python app.py You can also call your scheduled function locally. When deployed, the handler will import and run this function. For example, in "prod" it is defined as "mymodule.myfunc", so it can be called as such: $ python -c "import mymodule; mymodule.myfunc()" If your function uses the events argument you will need to send a dict with what the function expects. Scheduled events use a structure similar to the following: ```python { "account": "123456789012", "region": "us-east-1", "detail": {}, "detail-type": "Scheduled Event", "source": "aws.events", "time": "1970-01-01T00:00:00Z", "id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c", "resources": [ "arn:aws:events:us-east-1:123456789012:rule/mymodule.myfunc" ] } ``` If your function is also using the context, check out [mock](https://pypi.python.org/pypi/mock) for help building an artificial context object. ================================================ FILE: example/app.py ================================================ import logging from flask import Flask app = Flask(__name__) logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) @app.route('/', methods=['GET', 'POST']) def lambda_handler(event=None, context=None): logger.info('Lambda function invoked index()') return 'Flask says Hello!!' if __name__ == '__main__': app.run(debug=True) ================================================ FILE: example/authmodule.py ================================================ """ Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed 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 http://aws.amazon.com/apache2.0/ or 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. """ import re import time import pprint import json def lambda_handler(event, context): print("Client token: " + event['authorizationToken']) print("Method ARN: " + event['methodArn']) """validate the incoming token""" """and produce the principal user identifier associated with the token""" """this could be accomplished in a number of ways:""" """1. Call out to OAuth provider""" """2. Decode a JWT token inline""" """3. Lookup in a self-managed DB""" principalId = "user|a1b2c3d4" """you can send a 401 Unauthorized response to the client by failing like so:""" """raise Exception('Unauthorized')""" """if the token is valid, a policy must be generated which will allow or deny access to the client""" """if access is denied, the client will receive a 403 Access Denied response""" """if access is allowed, API Gateway will proceed with the backend integration configured on the method that was called""" """this function must generate a policy that is associated with the recognized principal user identifier.""" """depending on your use case, you might store policies in a DB, or generate them on the fly""" """keep in mind, the policy is cached for 5 minutes by default (TTL is configurable in the authorizer)""" """and will apply to subsequent calls to any method/resource in the RestApi""" """made with the same token""" """the example policy below denies access to all resources in the RestApi""" tmp = event['methodArn'].split(':') apiGatewayArnTmp = tmp[5].split('/') awsAccountId = tmp[4] policy = AuthPolicy(principalId, awsAccountId) policy.restApiId = apiGatewayArnTmp[0] policy.region = tmp[3] policy.stage = apiGatewayArnTmp[1] # Blueprint denies all methods by default # policy.denyAllMethods() # Example allows all methods policy.allowAllMethods() """policy.allowMethod(HttpVerb.GET, "/pets/*")""" """finally, build the policy and exit the function using return""" return policy.build() class HttpVerb: GET = "GET" POST = "POST" PUT = "PUT" PATCH = "PATCH" HEAD = "HEAD" DELETE = "DELETE" OPTIONS = "OPTIONS" ALL = "*" class AuthPolicy: awsAccountId = "" """The AWS account id the policy will be generated for. This is used to create the method ARNs.""" principalId = "" """The principal used for the policy, this should be a unique identifier for the end user.""" version = "2012-10-17" """The policy version used for the evaluation. This should always be '2012-10-17'""" pathRegex = r"^[/.a-zA-Z0-9-\*]+$" """The regular expression used to validate resource paths for the policy""" """these are the internal lists of allowed and denied methods. These are lists of objects and each object has 2 properties: A resource ARN and a nullable conditions statement. the build method processes these lists and generates the appropriate statements for the final policy""" allowMethods = [] denyMethods = [] restApiId = "*" """The API Gateway API id. By default this is set to '*'""" region = "*" """The region where the API is deployed. By default this is set to '*'""" stage = "*" """The name of the stage used in the policy. By default this is set to '*'""" def __init__(self, principal, awsAccountId): self.awsAccountId = awsAccountId self.principalId = principal self.allowMethods = [] self.denyMethods = [] def _addMethod(self, effect, verb, resource, conditions): """Adds a method to the internal lists of allowed or denied methods. Each object in the internal list contains a resource ARN and a condition statement. The condition statement can be null.""" if verb != "*" and not hasattr(HttpVerb, verb): raise NameError("Invalid HTTP verb " + verb + ". Allowed verbs in HttpVerb class") resourcePattern = re.compile(self.pathRegex) if not resourcePattern.match(resource): raise NameError("Invalid resource path: " + resource + ". Path should match " + self.pathRegex) if resource[:1] == "/": resource = resource[1:] resourceArn = ("arn:aws:execute-api:" + self.region + ":" + self.awsAccountId + ":" + self.restApiId + "/" + self.stage + "/" + verb + "/" + resource) if effect.lower() == "allow": self.allowMethods.append({ 'resourceArn' : resourceArn, 'conditions' : conditions }) elif effect.lower() == "deny": self.denyMethods.append({ 'resourceArn' : resourceArn, 'conditions' : conditions }) def _getEmptyStatement(self, effect): """Returns an empty statement object prepopulated with the correct action and the desired effect.""" statement = { 'Action': 'execute-api:Invoke', 'Effect': effect[:1].upper() + effect[1:].lower(), 'Resource': [] } return statement def _getStatementForEffect(self, effect, methods): """This function loops over an array of objects containing a resourceArn and conditions statement and generates the array of statements for the policy.""" statements = [] if len(methods) > 0: statement = self._getEmptyStatement(effect) for curMethod in methods: if curMethod['conditions'] is None or len(curMethod['conditions']) == 0: statement['Resource'].append(curMethod['resourceArn']) else: conditionalStatement = self._getEmptyStatement(effect) conditionalStatement['Resource'].append(curMethod['resourceArn']) conditionalStatement['Condition'] = curMethod['conditions'] statements.append(conditionalStatement) statements.append(statement) return statements def allowAllMethods(self): """Adds a '*' allow to the policy to authorize access to all methods of an API""" self._addMethod("Allow", HttpVerb.ALL, "*", []) def denyAllMethods(self): """Adds a '*' allow to the policy to deny access to all methods of an API""" self._addMethod("Deny", HttpVerb.ALL, "*", []) def allowMethod(self, verb, resource): """Adds an API Gateway method (Http verb + Resource path) to the list of allowed methods for the policy""" self._addMethod("Allow", verb, resource, []) def denyMethod(self, verb, resource): """Adds an API Gateway method (Http verb + Resource path) to the list of denied methods for the policy""" self._addMethod("Deny", verb, resource, []) def allowMethodWithConditions(self, verb, resource, conditions): """Adds an API Gateway method (Http verb + Resource path) to the list of allowed methods and includes a condition for the policy statement. More on AWS policy conditions here: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition""" self._addMethod("Allow", verb, resource, conditions) def denyMethodWithConditions(self, verb, resource, conditions): """Adds an API Gateway method (Http verb + Resource path) to the list of denied methods and includes a condition for the policy statement. More on AWS policy conditions here: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition""" self._addMethod("Deny", verb, resource, conditions) def build(self): """Generates the policy document based on the internal lists of allowed and denied conditions. This will generate a policy with two main statements for the effect: one statement for Allow and one statement for Deny. Methods that includes conditions will have their own statement in the policy.""" if ((self.allowMethods is None or len(self.allowMethods) == 0) and (self.denyMethods is None or len(self.denyMethods) == 0)): raise NameError("No statements defined for the policy") policy = { 'principalId' : self.principalId, 'policyDocument' : { 'Version' : self.version, 'Statement' : [] } } policy['policyDocument']['Statement'].extend(self._getStatementForEffect("Allow", self.allowMethods)) policy['policyDocument']['Statement'].extend(self._getStatementForEffect("Deny", self.denyMethods)) return policy ================================================ FILE: example/mymodule.py ================================================ def myfunc(): print('Running my function in a schedule!') def myfunc_with_events(event, context): print('Event time was', event['time']) print('This log is', context.log_group_name, context.log_stream_name) print('Time left for execution:', context.get_remaining_time_in_millis()) ================================================ FILE: example/policy/deploy.json ================================================ { "Version": "2012-10-17", "Statement": [ { "Sid": "RoleManager", "Effect": "Allow", "Action": [ "iam:AttachRolePolicy", "iam:CreateRole", "iam:GetRole", "iam:PutRolePolicy" ], "Resource": [ "*" ] }, { "Sid": "RoleDelegation", "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": [ "arn:aws:iam:::role/*-ZappaLambdaExecutionRole" ] }, { "Sid": "Core", "Effect": "Allow", "Action": [ "lambda:AddPermission", "lambda:CreateFunction", "lambda:DeleteFunction", "lambda:GetFunction", "lambda:GetFunctionConfiguration", "lambda:GetPolicy", "lambda:InvokeFunction", "lambda:ListVersionsByFunction", "lambda:RemovePermission", "lambda:UpdateFunctionCode", "lambda:UpdateFunctionConfiguration", "cloudformation:CreateStack", "cloudformation:DeleteStack", "cloudformation:DescribeStackResource", "cloudformation:DescribeStacks", "cloudformation:ListStackResources", "cloudformation:UpdateStack", "logs:DescribeLogStreams", "logs:DeleteLogGroup", "logs:FilterLogEvents", "s3:CreateBucket" ], "Resource": [ "*" ] }, { "Sid": "CoreS3List", "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::" ] }, { "Sid": "CoreS3Object", "Effect": "Allow", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:PutObject", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads" ], "Resource": [ "arn:aws:s3:::/*" ] }, { "Sid": "APIGateway", "Effect": "Allow", "Action": [ "apigateway:OPTIONS", "apigateway:DELETE", "apigateway:GET", "apigateway:PATCH", "apigateway:POST", "apigateway:PUT" ], "Resource": [ "*" ] }, { "Sid": "Domain", "Effect": "Allow", "Action": [ "route53:ListHostedZones", "route53:ListResourceRecordSets", "route53:ChangeResourceRecordSets", "route53:GetHostedZone" ], "Resource": [ "*" ] }, { "Sid": "Events", "Effect": "Allow", "Action": [ "events:DeleteRule", "events:DescribeRule", "events:ListRules", "events:ListTargetsByRule", "events:ListRuleNamesByTarget", "events:PutRule", "events:PutTargets", "events:RemoveTargets" ], "Resource": [ "*" ] }, { "Sid": "SNS", "Effect": "Allow", "Action": [ "SNS:ListSubscriptionsByTopic", "SNS:Unsubscribe", "SNS:Subscribe" ], "Resource": [ "*" ] }, { "Sid": "VPCSecurity", "Effect": "Allow", "Action": [ "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcs", "ec2:DescribeVpcsRequest" ], "Resource": [ "*" ] } ] } ================================================ FILE: example/requirements.txt ================================================ Flask>=0.12 zappa>=0.17.6 ================================================ FILE: requirements.in ================================================ argcomplete boto3 durationpy hjson jmespath kappa==0.6.0 pip>=9.0.1 python-dateutil python-slugify PyYAML future # previous version don't work with urllib3 1.24 requests>=2.20.0 six toml tqdm troposphere # See https://github.com/Miserlou/Zappa/issues/2036 Werkzeug<1.0 wheel wsgi-request-logger pip-tools ================================================ FILE: requirements.sh ================================================ #! /bin/bash set -e ARGS="" if [ "$1" == "--upgrade" ]; then ARGS="-U" fi pip-compile ${ARGS} -o test_requirements.txt requirements.in test_requirements.in cp test_requirements.txt requirements.txt pip-compile -o requirements.txt requirements.in ================================================ FILE: requirements.txt ================================================ # # This file is autogenerated by pip-compile # To update, run: # # pip-compile --output-file=requirements.txt requirements.in # argcomplete==1.11.1 # via -r requirements.in (line 1) boto3==1.14.2 # via -r requirements.in (line 2), kappa botocore==1.17.2 # via boto3, s3transfer certifi==2020.4.5.2 # via requests cfn-flip==1.2.3 # via troposphere chardet==3.0.4 # via requests click==7.1.2 # via cfn-flip, kappa, pip-tools docutils==0.15.2 # via botocore durationpy==0.5 # via -r requirements.in (line 3) future==0.18.2 # via -r requirements.in (line 11) hjson==3.0.1 # via -r requirements.in (line 4) idna==2.9 # via requests jmespath==0.10.0 # via -r requirements.in (line 5), boto3, botocore kappa==0.6.0 # via -r requirements.in (line 6) pip-tools==5.2.1 # via -r requirements.in (line 22) placebo==0.9.0 # via kappa python-dateutil==2.8.1 # via -r requirements.in (line 8), botocore python-slugify==4.0.0 # via -r requirements.in (line 9) pyyaml==5.3.1 # via -r requirements.in (line 10), cfn-flip, kappa requests==2.23.0 # via -r requirements.in (line 13) s3transfer==0.3.3 # via boto3 six==1.15.0 # via -r requirements.in (line 14), cfn-flip, pip-tools, python-dateutil text-unidecode==1.3 # via python-slugify toml==0.10.1 # via -r requirements.in (line 15) tqdm==4.46.1 # via -r requirements.in (line 16) troposphere==2.6.1 # via -r requirements.in (line 17) urllib3==1.25.9 # via botocore, requests werkzeug==0.16.1 # via -r requirements.in (line 19) wheel==0.34.2 # via -r requirements.in (line 20) wsgi-request-logger==0.4.6 # via -r requirements.in (line 21) # The following packages are considered to be unsafe in a requirements file: # pip ================================================ FILE: setup.py ================================================ import os import sys from setuptools import setup from io import open from zappa import __version__ with open('README.md') as readme_file: long_description = readme_file.read() with open(os.path.join(os.path.dirname(__file__), 'requirements.in')) as f: required = f.read().splitlines() with open(os.path.join(os.path.dirname(__file__), 'test_requirements.in')) as f: test_required = f.read().splitlines() setup( name='zappa', version=__version__, packages=['zappa'], install_requires=required, tests_require=test_required, test_suite='nose.collector', include_package_data=True, license='MIT License', description='Server-less Python Web Services for AWS Lambda and API Gateway', long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/Miserlou/Zappa', author='Rich Jones', author_email='rich@openwatch.net', entry_points={ 'console_scripts': [ 'zappa=zappa.cli:handle', 'z=zappa.cli:handle', ] }, classifiers=[ 'Environment :: Console', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Framework :: Django', 'Framework :: Django :: 1.11', 'Framework :: Django :: 2.0', 'Framework :: Django :: 3.0', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], ) ================================================ FILE: test.sh ================================================ #! /bin/bash nosetests --with-coverage --cover-package=zappa # For a specific test: # nosetests tests.tests:TestZappa.test_lets_encrypt_sanity -s ================================================ FILE: test_requirements.in ================================================ coveralls Django flake8 Flask mock nose nose-timer placebo ================================================ FILE: test_requirements.txt ================================================ # # This file is autogenerated by pip-compile # To update, run: # # pip-compile --output-file=test_requirements.txt requirements.in test_requirements.in # argcomplete==1.11.1 # via -r requirements.in (line 1) asgiref==3.2.7 # via django boto3==1.14.2 # via -r requirements.in (line 2), kappa botocore==1.17.2 # via boto3, s3transfer certifi==2020.4.5.2 # via requests cfn-flip==1.2.3 # via troposphere chardet==3.0.4 # via requests click==7.1.2 # via cfn-flip, flask, kappa, pip-tools coverage==5.1 # via coveralls coveralls==2.0.0 # via -r test_requirements.in (line 1) django==3.0.7 # via -r test_requirements.in (line 2) docopt==0.6.2 # via coveralls docutils==0.15.2 # via botocore durationpy==0.5 # via -r requirements.in (line 3) flake8==3.8.3 # via -r test_requirements.in (line 3) flask==1.1.2 # via -r test_requirements.in (line 4) future==0.18.2 # via -r requirements.in (line 11) hjson==3.0.1 # via -r requirements.in (line 4) idna==2.9 # via requests itsdangerous==1.1.0 # via flask jinja2==2.11.2 # via flask jmespath==0.10.0 # via -r requirements.in (line 5), boto3, botocore kappa==0.6.0 # via -r requirements.in (line 6) markupsafe==1.1.1 # via jinja2 mccabe==0.6.1 # via flake8 mock==4.0.2 # via -r test_requirements.in (line 5) nose-timer==1.0.0 # via -r test_requirements.in (line 7) nose==1.3.7 # via -r test_requirements.in (line 6), nose-timer pip-tools==5.2.1 # via -r requirements.in (line 22) placebo==0.9.0 # via -r test_requirements.in (line 8), kappa pycodestyle==2.6.0 # via flake8 pyflakes==2.2.0 # via flake8 python-dateutil==2.8.1 # via -r requirements.in (line 8), botocore python-slugify==4.0.0 # via -r requirements.in (line 9) pytz==2020.1 # via django pyyaml==5.3.1 # via -r requirements.in (line 10), cfn-flip, kappa requests==2.23.0 # via -r requirements.in (line 13), coveralls s3transfer==0.3.3 # via boto3 six==1.15.0 # via -r requirements.in (line 14), cfn-flip, pip-tools, python-dateutil sqlparse==0.3.1 # via django text-unidecode==1.3 # via python-slugify toml==0.10.1 # via -r requirements.in (line 15) tqdm==4.46.1 # via -r requirements.in (line 16) troposphere==2.6.1 # via -r requirements.in (line 17) urllib3==1.25.9 # via botocore, requests werkzeug==0.16.1 # via -r requirements.in (line 19), flask wheel==0.34.2 # via -r requirements.in (line 20) wsgi-request-logger==0.4.6 # via -r requirements.in (line 21) # The following packages are considered to be unsafe in a requirements file: # pip ================================================ FILE: test_settings.json ================================================ { "ttt888": { "touch": false, "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "use_precompiled_packages": false, "callbacks": { "settings": "tests.test_app.callback", "post": "tests.test_app.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "tests.test_app.prebuild_me", "environment_variables": { "TEST_ENV_VAR": "test_value" }, "context_header_mappings": { "CognitoIdentityId": "identity.cognitoIdentityId", "APIStage": "stage" }, "events": [ { "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }, { "function": "test.test_app.method", "event_source": { "arn": "arn:aws:sns:::1", "events": [ "sns:Publish" ] } }, { "function": "test.test_app.method_filters", "event_source": { "arn": "arn:aws:sns:::with-filters", "filters": { "interests": ["python", "aws", "zappa"], "version": ["1.0"] }, "events": [ "sns:Publish" ] } } ], "cognito": { "user_pool": "user-pool-id", "triggers": [ {"source": "PreSignUp_SignUp", "function": "test.tasks.pre_signup_function" } ] } }, "devor": { "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [{ "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }] }, "extendo": { "extends": "ttt888", "touch": true, "prebuild_script": "test_settings.prebuild_me", "environment_variables": { "EXTENDO": "You bet" } }, "extendo2": { "extends": "extendo", "s3_bucket": "lmbda2" }, "slim_handler": { "extends": "ttt888", "slim_handler": true, "delete_local_zip": true }, "deprecated_remote_env": { "s3_bucket": "lmbda", "remote_env_bucket": "lmbda-env", "remote_env_file": "dev/env.json" }, "remote_env": { "s3_bucket": "lmbda", "remote_env": "s3://lmbda-env/prod/env.json" }, "extendofail": { "extends": "failfail", "prebuild_script": "test_settings.prebuild_me", "environment_variables": { "EXTENDO": "You bet" } }, "build_package_only_delete_local_zip_false": { "delete_local_zip": false, "use_precompiled_packages": false, "delete_s3_zip": false }, "build_package_only_delete_local_zip_true": { "delete_local_zip": true, "use_precompiled_packages": false, "delete_s3_zip": false }, "lambda_concurrency_enabled": { "extends": "ttt888", "lambda_concurrency": 6 } } ================================================ FILE: test_settings.py ================================================ APP_MODULE = 'tests.test_app' APP_FUNCTION = 'hello_world' DJANGO_SETTINGS = None DEBUG = 'True' LOG_LEVEL = 'DEBUG' SCRIPT_NAME = 'hello_world' DOMAIN = None API_STAGE = 'ttt888' PROJECT_NAME = 'ttt888' REMOTE_ENV='s3://lmbda/test_env.json' ## test_env.json #{ # "hello": "world" #} # AWS_EVENT_MAPPING = { 'arn:aws:s3:1': 'test_settings.aws_s3_event', 'arn:aws:sns:1': 'test_settings.aws_sns_event', 'arn:aws:dynamodb:1': 'test_settings.aws_dynamodb_event', 'arn:aws:kinesis:1': 'test_settings.aws_kinesis_event', 'arn:aws:sqs:1': 'test_settings.aws_sqs_event' } ENVIRONMENT_VARIABLES={'testenv': 'envtest'} AUTHORIZER_FUNCTION='test_settings.authorizer_event' def prebuild_me(): print("This is a prebuild script!") def callback(self): print("this is a callback") def aws_s3_event(event, content): return "AWS S3 EVENT" def aws_sns_event(event, content): return "AWS SNS EVENT" def aws_async_sns_event(arg1, arg2, arg3): return "AWS ASYNC SNS EVENT" def aws_dynamodb_event(event, content): return "AWS DYNAMODB EVENT" def aws_kinesis_event(event, content): return "AWS KINESIS EVENT" def aws_sqs_event(event, content): return "AWS SQS EVENT" def authorizer_event(event, content): return "AUTHORIZER_EVENT" def command(): print("command") ================================================ FILE: tests/README.md ================================================ # Zappa Test Notes Look here!: https://github.com/garnaat/placebo#usage-as-a-decorator Also useful - OSX sed replace example: ` find . -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"/ {} + ` ================================================ FILE: tests/__init__.py ================================================ ================================================ FILE: tests/data/test1/this_dir_is_not_a_module.txt ================================================ # test1 is a directory without any .py files in it, so a __init__.py file should NOT be created in it Information is not knowledge. Knowledge is not wisdom. Wisdom is not truth. Truth is not beauty. Beauty is not love. Love is not music. Music is THE BEST. ================================================ FILE: tests/data/test1.py ================================================ # this is a module def greet(): print('There is more stupidity than hydrogen in the universe, and it has a longer shelf life.') ================================================ FILE: tests/data/test2/test.py ================================================ # this is a module, so test2 should get an __init__.py def get_some_wisdom(): return 'Art is making something out of nothing, and selling it.' ================================================ FILE: tests/name_scenarios.json ================================================ [ { "id": "integer", "value": 12, "is_valid": false }, { "id": "float", "value": 3.1415, "is_valid": false }, { "id": "list", "value": [ "a", 1, null ], "is_valid": false }, { "id": null, "value": null, "is_valid": false }, { "id": "empty string", "value": "", "is_valid": false }, { "id": "ok", "value": "FrancoZappa", "is_valid": true }, { "id": "with space", "value": "Franco Zappa", "is_valid": false }, { "id": "one char", "value": "A", "is_valid": true }, { "id": "one digit", "value": "5", "is_valid": true }, { "id": "80 chars", "value": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz", "is_valid": true }, { "id": "81 chars", "value": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzza", "is_valid": false }, { "id": "bad_chars", "value": "hi&bye", "is_valid": false } ] ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateApiKey_1.json ================================================ { "status_code": 201, "data": { "name": "test", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "e861edec-5901-11e6-8f63-a3652f6325da", "HTTPHeaders": { "x-amzn-requestid": "e861edec-5901-11e6-8f63-a3652f6325da", "date": "Tue, 02 Aug 2016 22:39:00 GMT", "content-length": "148", "content-type": "application/json" } }, "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 1, "microsecond": 0, "year": 2016, "day": 2, "minute": 39 }, "lastUpdatedDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 1, "microsecond": 0, "year": 2016, "day": 2, "minute": 39 }, "enabled": true, "id": "mOebO1Q4uFa8NUGutxr833XZb3quSqa35yCRkRci", "stageKeys": [] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_1.json ================================================ { "status_code": 201, "data": { "id": "cahz60", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "8689874e-28f4-11e6-805d-312f5a261f21" }, "createdDate": { "hour": 15, "__class__": "datetime", "month": 6, "second": 20, "microsecond": 0, "year": 2016, "day": 2, "minute": 2 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_2.json ================================================ { "status_code": 201, "data": { "id": "szdwm0", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "976f3698-28f7-11e6-8233-6d2c402681cd" }, "createdDate": { "hour": 15, "__class__": "datetime", "month": 6, "second": 15, "microsecond": 0, "year": 2016, "day": 2, "minute": 24 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateDeployment_3.json ================================================ { "status_code": 201, "data": { "id": "43p5hj", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "44700020-6a74-11e6-9e18-d13c6ce86685", "HTTPHeaders": { "x-amzn-requestid": "44700020-6a74-11e6-9e18-d13c6ce86685", "date": "Thu, 25 Aug 2016 03:30:29 GMT", "content-length": "41", "content-type": "application/json" } }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 29, "microsecond": 0, "year": 2016, "day": 24, "minute": 30 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_1.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}", "pathPart": "{parameter_1}", "id": "ndmj6n", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "5a09c6b7-28f4-11e6-b8f8-d1b42d374c32" }, "parentId": "6ahk6mn0bi" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_2.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}", "pathPart": "{parameter_2}", "id": "kbdbxf", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "608b4583-28f4-11e6-805d-312f5a261f21" }, "parentId": "ndmj6n" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_3.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}/{parameter_3}", "pathPart": "{parameter_3}", "id": "ozp3pf", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "663f1468-28f4-11e6-9152-ebe760f7884c" }, "parentId": "kbdbxf" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_4.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}", "pathPart": "{parameter_4}", "id": "hynkkf", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "6cdf3ecd-28f4-11e6-87ec-8f98a402daaf" }, "parentId": "ozp3pf" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_5.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}", "pathPart": "{parameter_5}", "id": "7rfu1h", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "7386e455-28f4-11e6-9152-ebe760f7884c" }, "parentId": "hynkkf" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_6.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}/{parameter_6}", "pathPart": "{parameter_6}", "id": "f97hp3", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "7a63547b-28f4-11e6-87ec-8f98a402daaf" }, "parentId": "7rfu1h" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_7.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}/{parameter_2}/{parameter_3}/{parameter_4}/{parameter_5}/{parameter_6}/{parameter_7}", "pathPart": "{parameter_7}", "id": "y78dak", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "8062abaa-28f4-11e6-b8f8-d1b42d374c32" }, "parentId": "f97hp3" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_8.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}", "pathPart": "{parameter_1}", "id": "lkkm6z", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "90702348-28f7-11e6-a01d-971fdfddbf7e" }, "parentId": "vw69yjtx3b" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.CreateResource_9.json ================================================ { "status_code": 201, "data": { "path": "/{parameter_1}", "pathPart": "{parameter_1}", "id": "z65qvb", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "3892e3ff-6a74-11e6-831b-43c278515a41", "HTTPHeaders": { "x-amzn-requestid": "3892e3ff-6a74-11e6-831b-43c278515a41", "date": "Thu, 25 Aug 2016 03:30:07 GMT", "content-length": "91", "content-type": "application/json" } }, "parentId": "hq4rr1cie4" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteApiKey_1.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "RequestId": "db1a1c1c0-28f7-11e6-8db2-597c5c8eebes5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteRestApi_1.json ================================================ { "status_code": 202, "data": { "ResponseMetadata": { "HTTPStatusCode": 202, "RequestId": "af701457-28f7-11e6-a01d-971fdfddbf7e" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.DeleteRestApi_2.json ================================================ { "status_code": 202, "data": { "ResponseMetadata": { "HTTPStatusCode": 202, "RequestId": "a27ed33c-6a74-11e6-aaec-e994c773c0ae", "HTTPHeaders": { "x-amzn-requestid": "a27ed33c-6a74-11e6-aaec-e994c773c0ae", "date": "Thu, 25 Aug 2016 03:33:06 GMT", "content-length": "0", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetApiKeys_1.json ================================================ { "status_code": 200, "data": { "items": [ { "id": "randomid", "name": "iw5z0jpx0d" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_1.json ================================================ { "status_code": 200, "data": { "items": [ { "path": "/", "id": "6ahk6mn0bi" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "5494870d-28f4-11e6-87ec-8f98a402daaf" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_2.json ================================================ { "status_code": 200, "data": { "items": [ { "path": "/", "id": "vw69yjtx3b" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "8b7bad0d-28f7-11e6-8233-6d2c402681cd" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetResources_3.json ================================================ { "status_code": 200, "data": { "items": [ { "path": "/", "id": "hq4rr1cie4" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2d381708-6a74-11e6-831b-43c278515a41", "HTTPHeaders": { "x-amzn-requestid": "2d381708-6a74-11e6-831b-43c278515a41", "date": "Thu, 25 Aug 2016 03:29:48 GMT", "content-length": "42", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApi_1.json ================================================ { "status_code": 200, "data": { "description": "Created automatically by Zappa.", "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "6c275db7-ef2b-11e6-a318-5fc3640c993c", "HTTPHeaders": { "date": "Fri, 10 Feb 2017 00:54:05 GMT", "x-amzn-requestid": "6c275db7-ef2b-11e6-a318-5fc3640c993c", "content-length": "145", "content-type": "application/json", "connection": "keep-alive" } }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 13, "microsecond": 0, "year": 2017, "day": 9, "minute": 24 }, "binaryMediaTypes": [ "*/*" ], "id": "9q10y8x8j9", "name": "image-fly-test5" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApi_2.json ================================================ { "status_code": 200, "data": { "id": "9q10y8x8j9", "name": "image-fly-test5", "description": "Created automatically by Zappa.", "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "79948f9c-ef2b-11e6-854a-99ec105212e0", "HTTPHeaders": { "date": "Fri, 10 Feb 2017 00:54:28 GMT", "x-amzn-requestid": "79948f9c-ef2b-11e6-854a-99ec105212e0", "content-length": "118", "content-type": "application/json", "connection": "keep-alive" } }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 13, "microsecond": 0, "year": 2017, "day": 9, "minute": 24 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_1.json ================================================ { "status_code": 200, "data": { "position": "aWQ9U2xraXVnNjhlazk%3D", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "543aa6e1-28f4-11e6-805d-312f5a261f21" }, "items": [ { "description": "serverless-imagehost-devuhhh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 56, "microsecond": 0, "year": 2016, "day": 22, "minute": 41 }, "id": "0490ldmsmf", "name": "serverless-imagehost-devuhhh" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "helloworld-beta Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 2, "second": 54, "microsecond": 0, "year": 2016, "day": 3, "minute": 1 }, "id": "67urt9dyf3", "name": "helloworld-beta" }, { "description": "oort-dev3 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 9, "microsecond": 0, "year": 2016, "day": 20, "minute": 6 }, "id": "6nrpew3z4h", "name": "oort-dev3" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "serverless-imagehost-nob Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 25, "microsecond": 0, "year": 2016, "day": 11, "minute": 14 }, "id": "cc1o38ldtb", "name": "serverless-imagehost-nob" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "serverless-imagehost-devuh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "ezjhledye7", "name": "serverless-imagehost-devuh" }, { "description": "website-production Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "restful-demo-dev Zappa", "createdDate": { "hour": 23, "__class__": "datetime", "month": 4, "second": 15, "microsecond": 0, "year": 2016, "day": 4, "minute": 12 }, "id": "k6ox1w18i7", "name": "restful-demo-dev" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_2.json ================================================ { "status_code": 200, "data": { "position": "aWQ9U2xraXVnNjhlazk%3D", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "12bcd642-28f6-11e6-805d-312f5a261f21" }, "items": [ { "description": "serverless-imagehost-devuhhh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 56, "microsecond": 0, "year": 2016, "day": 22, "minute": 41 }, "id": "0490ldmsmf", "name": "serverless-imagehost-devuhhh" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "helloworld-beta Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 2, "second": 54, "microsecond": 0, "year": 2016, "day": 3, "minute": 1 }, "id": "67urt9dyf3", "name": "helloworld-beta" }, { "description": "oort-dev3 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 9, "microsecond": 0, "year": 2016, "day": 20, "minute": 6 }, "id": "6nrpew3z4h", "name": "oort-dev3" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "serverless-imagehost-nob Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 25, "microsecond": 0, "year": 2016, "day": 11, "minute": 14 }, "id": "cc1o38ldtb", "name": "serverless-imagehost-nob" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "serverless-imagehost-devuh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "ezjhledye7", "name": "serverless-imagehost-devuh" }, { "description": "website-production Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "restful-demo-dev Zappa", "createdDate": { "hour": 23, "__class__": "datetime", "month": 4, "second": 15, "microsecond": 0, "year": 2016, "day": 4, "minute": 12 }, "id": "k6ox1w18i7", "name": "restful-demo-dev" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_3.json ================================================ { "status_code": 200, "data": { "position": "aWQ9U2xwaGZheGo4NGc%3D", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "8b2f39ee-28f7-11e6-a8d7-ffa4edbd5522" }, "items": [ { "description": "serverless-imagehost-devuhhh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 56, "microsecond": 0, "year": 2016, "day": 22, "minute": 41 }, "id": "0490ldmsmf", "name": "serverless-imagehost-devuhhh" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "helloworld-beta Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 2, "second": 54, "microsecond": 0, "year": 2016, "day": 3, "minute": 1 }, "id": "67urt9dyf3", "name": "helloworld-beta" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "serverless-imagehost-nob Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 25, "microsecond": 0, "year": 2016, "day": 11, "minute": 14 }, "id": "cc1o38ldtb", "name": "serverless-imagehost-nob" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "serverless-imagehost-devuh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "ezjhledye7", "name": "serverless-imagehost-devuh" }, { "description": "website-production Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_4.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "serverless-imagehost-devuhhh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 56, "microsecond": 0, "year": 2016, "day": 22, "minute": 41 }, "id": "0490ldmsmf", "name": "serverless-imagehost-devuhhh" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "helloworld-beta Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 2, "second": 54, "microsecond": 0, "year": 2016, "day": 3, "minute": 1 }, "id": "67urt9dyf3", "name": "helloworld-beta" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "serverless-imagehost-nob Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 5, "second": 25, "microsecond": 0, "year": 2016, "day": 11, "minute": 14 }, "id": "cc1o38ldtb", "name": "serverless-imagehost-nob" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "serverless-imagehost-devuh Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "ezjhledye7", "name": "serverless-imagehost-devuh" }, { "description": "website-production Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "zappa-ttt888 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 6, "second": 54, "microsecond": 0, "year": 2016, "day": 2, "minute": 23 }, "id": "iw5z0jpx0d", "name": "zappa-ttt888" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "zappa-ttt666 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 6, "second": 53, "microsecond": 0, "year": 2016, "day": 2, "minute": 0 }, "id": "mj9gnteqc9", "name": "zappa-ttt666" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 1, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 7, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "1453992953 Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 1, "second": 56, "microsecond": 0, "year": 2016, "day": 28, "minute": 55 }, "id": "tpwx2chyc9", "name": "1453992953" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 21, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "af6602b8-28f7-11e6-8233-6d2c402681cd" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_5.json ================================================ { "status_code": 200, "data": { "position": "aWQ9U2xwaGZheGo4NGc%3D", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2cafad23-6a74-11e6-831b-43c278515a41", "HTTPHeaders": { "x-amzn-requestid": "2cafad23-6a74-11e6-831b-43c278515a41", "date": "Thu, 25 Aug 2016 03:29:47 GMT", "content-length": "2753", "content-type": "application/json" } }, "items": [ { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 8, "second": 42, "microsecond": 0, "year": 2016, "day": 23, "minute": 56 }, "id": "4sm404ad2j", "name": "baby-flask-devor" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "zappa-slack-inviter-prod Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 8, "second": 41, "microsecond": 0, "year": 2016, "day": 22, "minute": 54 }, "id": "9pi3dp8g4f", "name": "zappa-slack-inviter-prod" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "baby-pyramid-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 8, "second": 44, "microsecond": 0, "year": 2016, "day": 23, "minute": 20 }, "id": "css89s7off", "name": "baby-pyramid-dev" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_6.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 8, "second": 42, "microsecond": 0, "year": 2016, "day": 23, "minute": 56 }, "id": "4sm404ad2j", "name": "baby-flask-devor" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "zappa-slack-inviter-prod Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 8, "second": 41, "microsecond": 0, "year": 2016, "day": 22, "minute": 54 }, "id": "9pi3dp8g4f", "name": "zappa-slack-inviter-prod" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "baby-pyramid-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 8, "second": 44, "microsecond": 0, "year": 2016, "day": 23, "minute": 20 }, "id": "css89s7off", "name": "baby-pyramid-dev" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "zappa-ttt888 Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 48, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "jkib1pg4l1", "name": "zappa-ttt888" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 4, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "659dce17-6a74-11e6-aaec-e994c773c0ae", "HTTPHeaders": { "x-amzn-requestid": "659dce17-6a74-11e6-aaec-e994c773c0ae", "date": "Thu, 25 Aug 2016 03:31:23 GMT", "content-length": "6217", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_7.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 8, "second": 42, "microsecond": 0, "year": 2016, "day": 23, "minute": 56 }, "id": "4sm404ad2j", "name": "baby-flask-devor" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "zappa-slack-inviter-prod Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 8, "second": 41, "microsecond": 0, "year": 2016, "day": 22, "minute": 54 }, "id": "9pi3dp8g4f", "name": "zappa-slack-inviter-prod" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "baby-pyramid-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 8, "second": 44, "microsecond": 0, "year": 2016, "day": 23, "minute": 20 }, "id": "css89s7off", "name": "baby-pyramid-dev" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "zappa-ttt888 Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 48, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "jkib1pg4l1", "name": "zappa-ttt888" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 4, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "684546ee-6a74-11e6-831b-43c278515a41", "HTTPHeaders": { "x-amzn-requestid": "684546ee-6a74-11e6-831b-43c278515a41", "date": "Thu, 25 Aug 2016 03:31:27 GMT", "content-length": "6217", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_8.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 8, "second": 42, "microsecond": 0, "year": 2016, "day": 23, "minute": 56 }, "id": "4sm404ad2j", "name": "baby-flask-devor" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "zappa-slack-inviter-prod Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 8, "second": 41, "microsecond": 0, "year": 2016, "day": 22, "minute": 54 }, "id": "9pi3dp8g4f", "name": "zappa-slack-inviter-prod" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "baby-pyramid-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 8, "second": 44, "microsecond": 0, "year": 2016, "day": 23, "minute": 20 }, "id": "css89s7off", "name": "baby-pyramid-dev" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "zappa-ttt888 Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 48, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "jkib1pg4l1", "name": "zappa-ttt888" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 4, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a227164b-6a74-11e6-aaec-e994c773c0ae", "HTTPHeaders": { "x-amzn-requestid": "a227164b-6a74-11e6-aaec-e994c773c0ae", "date": "Thu, 25 Aug 2016 03:33:05 GMT", "content-length": "6217", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetRestApis_9.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 8, "second": 42, "microsecond": 0, "year": 2016, "day": 23, "minute": 56 }, "id": "4sm404ad2j", "name": "baby-flask-devor" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "zappa-slack-inviter-prod Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 8, "second": 41, "microsecond": 0, "year": 2016, "day": 22, "minute": 54 }, "id": "9pi3dp8g4f", "name": "zappa-slack-inviter-prod" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "baby-pyramid-dev Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 8, "second": 44, "microsecond": 0, "year": 2016, "day": 23, "minute": 20 }, "id": "css89s7off", "name": "baby-pyramid-dev" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "zappa-ttt888 Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 48, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "jkib1pg4l1", "name": "zappa-ttt888" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 4, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a269c4ec-6a74-11e6-9e18-d13c6ce86685", "HTTPHeaders": { "x-amzn-requestid": "a269c4ec-6a74-11e6-9e18-d13c6ce86685", "date": "Thu, 25 Aug 2016 03:33:05 GMT", "content-length": "6217", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.GetStages_1.json ================================================ { "status_code": 200, "data": { "item": [ { "stageName": "ttt888", "cacheClusterSize": "0.5", "variables": {}, "cacheClusterEnabled": false, "cacheClusterStatus": "NOT_AVAILABLE", "deploymentId": "43p5hj", "lastUpdatedDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 28, "microsecond": 0, "year": 2016, "day": 24, "minute": 31 }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 29, "microsecond": 0, "year": 2016, "day": 24, "minute": 30 }, "methodSettings": { "*/*": { "cacheTtlInSeconds": 300, "loggingLevel": "OFF", "dataTraceEnabled": false, "metricsEnabled": false, "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER", "throttlingRateLimit": 1000.0, "cacheDataEncrypted": false, "cachingEnabled": false, "throttlingBurstLimit": 2000, "requireAuthorizationForCacheControl": true } } } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a23bfe5b-6a74-11e6-831b-43c278515a41", "HTTPHeaders": { "x-amzn-requestid": "a23bfe5b-6a74-11e6-831b-43c278515a41", "date": "Thu, 25 Aug 2016 03:33:05 GMT", "content-length": "559", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateRestApi_1.json ================================================ { "status_code": 200, "data": { "id": "9q10y8x8j9", "name": "image-fly-test5", "description": "Created automatically by Zappa.", "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "6c33e026-ef2b-11e6-8557-cbcea87a07dc", "HTTPHeaders": { "date": "Fri, 10 Feb 2017 00:54:05 GMT", "x-amzn-requestid": "6c33e026-ef2b-11e6-8557-cbcea87a07dc", "content-length": "118", "content-type": "application/json", "connection": "keep-alive" } }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 13, "microsecond": 0, "year": 2017, "day": 9, "minute": 24 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_1.json ================================================ { "status_code": 201, "data": { "deploymentId" : "aioOASIHD1h", "stageName" : "ttt888", "description" : "Deployed by Zappa.", "cacheClusterEnabled" : false, "cacheClusterSize" : "1", "cacheClusterStatus" : "AVAILABLE", "methodSettings" : { "String" : { "metricsEnabled" : false, "loggingLevel" : "OFF", "dataTraceEnabled" : false, "throttlingBurstLimit" : 100, "throttlingRateLimit" : 100, "cachingEnabled" : false, "cacheTtlInSeconds" : 100, "cacheDataEncrypted" : false, "requireAuthorizationForCacheControl" : false } }, "variables" : { }, "createdDate" : "2011-01-01T01:01:01Z+0000", "lastUpdatedDate" : "2011-01-01T01:01:01Z+0000" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_2.json ================================================ { "status_code": 200, "data": { "stageName": "ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "45629d34-6a74-11e6-aaec-e994c773c0ae", "HTTPHeaders": { "x-amzn-requestid": "45629d34-6a74-11e6-aaec-e994c773c0ae", "date": "Thu, 25 Aug 2016 03:30:28 GMT", "content-length": "548", "content-type": "application/json" } }, "cacheClusterSize": "0.5", "variables": {}, "cacheClusterEnabled": false, "cacheClusterStatus": "NOT_AVAILABLE", "deploymentId": "43p5hj", "lastUpdatedDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 29, "microsecond": 0, "year": 2016, "day": 24, "minute": 30 }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 29, "microsecond": 0, "year": 2016, "day": 24, "minute": 30 }, "methodSettings": { "*/*": { "cacheTtlInSeconds": 300, "loggingLevel": "OFF", "dataTraceEnabled": false, "metricsEnabled": false, "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER", "throttlingRateLimit": 1000.0, "cacheDataEncrypted": false, "cachingEnabled": false, "throttlingBurstLimit": 2000, "requireAuthorizationForCacheControl": true } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/apigateway.UpdateStage_3.json ================================================ { "status_code": 200, "data": { "stageName": "ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "685acb8b-6a74-11e6-9e18-d13c6ce86685", "HTTPHeaders": { "x-amzn-requestid": "685acb8b-6a74-11e6-9e18-d13c6ce86685", "date": "Thu, 25 Aug 2016 03:31:27 GMT", "content-length": "548", "content-type": "application/json" } }, "cacheClusterSize": "0.5", "variables": {}, "cacheClusterEnabled": false, "cacheClusterStatus": "NOT_AVAILABLE", "deploymentId": "43p5hj", "lastUpdatedDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 28, "microsecond": 0, "year": 2016, "day": 24, "minute": 31 }, "createdDate": { "hour": 20, "__class__": "datetime", "month": 8, "second": 29, "microsecond": 0, "year": 2016, "day": 24, "minute": 30 }, "methodSettings": { "*/*": { "cacheTtlInSeconds": 300, "loggingLevel": "OFF", "dataTraceEnabled": false, "metricsEnabled": false, "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER", "throttlingRateLimit": 1000.0, "cacheDataEncrypted": false, "cachingEnabled": false, "throttlingBurstLimit": 2000, "requireAuthorizationForCacheControl": true } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.CreateStack_1.json ================================================ { "status_code": 200, "data": { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "081486b3-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "081486b3-7f76-11e6-b951-6975199b9748", "date": "Tue, 20 Sep 2016 21:05:59 GMT", "content-length": "382", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DeleteStack_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "3fd15252-7f76-11e6-9c9d-1d2b104a5cbc", "HTTPHeaders": { "x-amzn-requestid": "3fd15252-7f76-11e6-9c9d-1d2b104a5cbc", "date": "Tue, 20 Sep 2016 21:07:33 GMT", "content-length": "212", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_1.json ================================================ { "status_code": 200, "data": { "StackResourceDetail": { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::ApiGateway::RestApi", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "PhysicalResourceId": "hekjfezvfl", "Metadata": "{}\n", "LogicalResourceId": "Api" }, "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "218ce97d-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "218ce97d-7f76-11e6-b951-6975199b9748", "date": "Tue, 20 Sep 2016 21:06:42 GMT", "content-length": "848", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_2.json ================================================ { "status_code": 200, "data": { "StackResourceDetail": { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::ApiGateway::RestApi", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "PhysicalResourceId": "hekjfezvfl", "Metadata": "{}\n", "LogicalResourceId": "Api" }, "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "314bf9eb-7f76-11e6-adb1-97dc59990589", "HTTPHeaders": { "x-amzn-requestid": "314bf9eb-7f76-11e6-adb1-97dc59990589", "date": "Tue, 20 Sep 2016 21:07:08 GMT", "content-length": "848", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStackResource_3.json ================================================ { "status_code": 200, "data": { "StackResourceDetail": { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::ApiGateway::RestApi", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "PhysicalResourceId": "hekjfezvfl", "Metadata": "{}\n", "LogicalResourceId": "Api" }, "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "3fba6fee-7f76-11e6-9c9d-1d2b104a5cbc", "HTTPHeaders": { "x-amzn-requestid": "3fba6fee-7f76-11e6-9c9d-1d2b104a5cbc", "date": "Tue, 20 Sep 2016 21:07:33 GMT", "content-length": "848", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_1.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 400, "RequestId": "07f3de96-7f76-11e6-8ba2-2b306877d289", "HTTPHeaders": { "x-amzn-requestid": "07f3de96-7f76-11e6-8ba2-2b306877d289", "date": "Tue, 20 Sep 2016 21:05:59 GMT", "content-length": "298", "content-type": "text/xml", "connection": "close" } }, "Error": { "Message": "Stack with id zappa-ttt888 does not exist", "Code": "ValidationError", "Type": "Sender" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_10.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1961b144-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1961b144-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:29 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_11.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1b45658e-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1b45658e-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:31 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_12.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1d2ac77f-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1d2ac77f-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:35 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_13.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1f12c188-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1f12c188-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:37 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_14.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_COMPLETE", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "20f84a95-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "20f84a95-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4245", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:41 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_15.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_COMPLETE", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "30d82959-7f76-11e6-9295-3308821d25df", "HTTPHeaders": { "x-amzn-requestid": "30d82959-7f76-11e6-9295-3308821d25df", "vary": "Accept-Encoding", "content-length": "4245", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:07:07 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_16.json ================================================ { "status_code": 400, "data": { "Error": {"Code": "ValidationError", "Message": "Stack with id zappa-ttt888 does not exist", "Type": "Sender"}, "ResponseMetadata": {"HTTPHeaders": {"connection": "close", "content-length": "298", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 22:13:54 GMT", "x-amzn-requestid": "853a18e4-7f7f-11e6-ab28-0d18db97cbd1"}, "HTTPStatusCode": 400, "RequestId": "853a18e4-7f7f-11e6-ab28-0d18db97cbd1"} } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_2.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0a3a9a2e-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0a3a9a2e-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:03 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_3.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0c229427-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0c229427-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:05 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_4.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0e0473ae-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0e0473ae-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:09 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_5.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0ff01736-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0ff01736-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:12 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_6.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "11d0e573-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "11d0e573-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:15 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_7.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "13b6205a-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "13b6205a-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:19 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_8.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "159a96f6-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "159a96f6-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:22 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.DescribeStacks_9.json ================================================ { "status_code": 200, "data": { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:123456789123:stack/zappa-ttt888/081b8ab0-7f76-11e6-b5f4-50a686e4bbe6", "Description": "Automatically generated with Zappa", "Parameters": [ { "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}", "ParameterKey": "A" }, { "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}", "ParameterKey": "B" }, { "ParameterValue": "integration.response.body.Content-Type", "ParameterKey": "C" }, { "ParameterValue": "integration.response.body.Location", "ParameterKey": "D" }, { "ParameterValue": "integration.response.body.Status", "ParameterKey": "E" }, { "ParameterValue": "integration.response.body.X-Frame-Options", "ParameterKey": "F" }, { "ParameterValue": "integration.response.body.Set-Cookie", "ParameterKey": "G" }, { "ParameterValue": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content", "ParameterKey": "H" }, { "ParameterValue": "#set($_body = $util.parseJson($input.path('$.errorMessage'))['content'])\n$util.base64Decode($_body)", "ParameterKey": "I" }, { "ParameterValue": "integration.response.body.errorMessage", "ParameterKey": "J" } ], "Tags": [ { "Value": "zappa-ttt888", "Key": "ZappaProject" } ], "CreationTime": { "hour": 21, "__class__": "datetime", "month": 9, "second": 0, "microsecond": 142000, "year": 2016, "day": 20, "minute": 6 }, "StackName": "zappa-ttt888", "NotificationARNs": [], "StackStatus": "CREATE_IN_PROGRESS", "DisableRollback": false } ], "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "177e4b29-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "177e4b29-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "4248", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:25 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0a4d37d0-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0a4d37d0-7f76-11e6-b951-6975199b9748", "date": "Tue, 20 Sep 2016 21:06:03 GMT", "content-length": "315", "content-type": "text/xml" } }, "StackResourceSummaries": [] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_10.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1b5236d0-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1b5236d0-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6331", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:31 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 23, "microsecond": 140000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1DIACCZRJR5BU", "LogicalResourceId": "DELETE0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 26, "microsecond": 766000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 29, "microsecond": 718000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 504000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 31, "microsecond": 167000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 383000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 27, "microsecond": 460000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_11.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1d38d143-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1d38d143-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6247", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:35 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1DIACCZRJR5BU", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 34, "microsecond": 939000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 26, "microsecond": 766000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 29, "microsecond": 718000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 504000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 31, "microsecond": 167000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 383000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 27, "microsecond": 460000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_12.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1f1e0c2d-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "1f1e0c2d-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "5995", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:38 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1DIACCZRJR5BU", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 34, "microsecond": 939000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 26, "microsecond": 766000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 35, "microsecond": 279000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 29, "microsecond": 718000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 504000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 31, "microsecond": 167000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 35, "microsecond": 365000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PATCH0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 383000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 27, "microsecond": 460000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 36, "microsecond": 363000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0c2e53f9-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0c2e53f9-7f76-11e6-b951-6975199b9748", "date": "Tue, 20 Sep 2016 21:06:05 GMT", "content-length": "683", "content-type": "text/xml" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0e1081a1-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0e1081a1-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "2699", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:09 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 834000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LogicalResourceId": "GET0" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 697000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "OPTIONS0" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 748000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 890000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LogicalResourceId": "POST0" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 661000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "PUT0" }, { "ResourceType": "AWS::ApiGateway::Resource", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 329000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0ffb3aca-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "0ffb3aca-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "3063", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:12 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 834000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 161000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LogicalResourceId": "OPTIONS0" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 748000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 9, "microsecond": 890000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LogicalResourceId": "POST0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 218000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LogicalResourceId": "PUT0" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "11dc7e37-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "11dc7e37-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6323", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:15 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 632000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 650000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "HEAD0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 356000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 520000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 220000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 644000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LogicalResourceId": "POST1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 218000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_6.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "13c16afe-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "13c16afe-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6323", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:19 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 632000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 650000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "HEAD0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 356000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 520000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 220000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 644000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LogicalResourceId": "POST1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 218000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_7.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "15a5ba88-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "15a5ba88-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6679", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:22 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceType": "AWS::ApiGateway::Method", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 22, "microsecond": 364000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_IN_PROGRESS", "LogicalResourceId": "DELETE0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 632000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 40000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LogicalResourceId": "HEAD0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 356000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 520000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 220000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 644000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_8.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "17896ebb-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "17896ebb-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6835", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:25 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 23, "microsecond": 140000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1DIACCZRJR5BU", "LogicalResourceId": "DELETE0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 632000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 40000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LogicalResourceId": "HEAD0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 356000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 520000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 220000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 644000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.ListStackResources_9.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "196cadc7-7f76-11e6-b951-6975199b9748", "HTTPHeaders": { "x-amzn-requestid": "196cadc7-7f76-11e6-b951-6975199b9748", "vary": "Accept-Encoding", "content-length": "6499", "content-type": "text/xml", "date": "Tue, 20 Sep 2016 21:06:29 GMT" } }, "StackResourceSummaries": [ { "ResourceType": "AWS::ApiGateway::RestApi", "PhysicalResourceId": "hekjfezvfl", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 6, "microsecond": 196000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Api" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 23, "microsecond": 140000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-DELET-1DIACCZRJR5BU", "LogicalResourceId": "DELETE0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-DELET-1JK4SZOIK0707", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 26, "microsecond": 766000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "DELETE1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-GET0-1TC7D2726JX2T", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 8000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "GET0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 9000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-GET1-96GHNT9AFMME", "LogicalResourceId": "GET1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 40000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-HEAD0-97FT504P6Q9K", "LogicalResourceId": "HEAD0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-HEAD1-1DVREDZVQF491", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 504000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "HEAD1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-OPTIO-14ELHMS3EGLB1", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 631000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "OPTIONS0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 14, "microsecond": 520000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-OPTIO-1TD9GFGGTAQI9", "LogicalResourceId": "OPTIONS1" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 873000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PATCH-1J45WIOLFVTU5", "LogicalResourceId": "PATCH0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PATCH-12E8GBG6L5S4P", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 28, "microsecond": 383000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PATCH1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST0-TKUBVZLX28A7", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 15, "microsecond": 291000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST0" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-POST1-WVJLSEIQZY6H", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 27, "microsecond": 460000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "POST1" }, { "ResourceType": "AWS::ApiGateway::Method", "PhysicalResourceId": "zappa-PUT0-1T3JX7U0FAPYQ", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 20, "microsecond": 248000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "PUT0" }, { "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::ApiGateway::Method", "ResourceStatusReason": "Resource creation Initiated", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 13, "microsecond": 893000, "year": 2016, "day": 20, "minute": 6 }, "PhysicalResourceId": "zappa-PUT1-1QG4RKEWK5YVY", "LogicalResourceId": "PUT1" }, { "ResourceType": "AWS::ApiGateway::Resource", "PhysicalResourceId": "7y1l9s", "LastUpdatedTimestamp": { "hour": 21, "__class__": "datetime", "month": 9, "second": 10, "microsecond": 308000, "year": 2016, "day": 20, "minute": 6 }, "ResourceStatus": "CREATE_COMPLETE", "LogicalResourceId": "Resource1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cloudformation.UpdateStack_1.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 400, "RequestId": "30e82eed-7f76-11e6-9295-3308821d25df", "HTTPHeaders": { "x-amzn-requestid": "30e82eed-7f76-11e6-9295-3308821d25df", "date": "Tue, 20 Sep 2016 21:07:07 GMT", "content-length": "288", "content-type": "text/xml", "connection": "close" } }, "Error": { "Message": "No updates are to be performed.", "Code": "ValidationError", "Type": "Sender" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cognito-idp.DescribeUserPool_1.json ================================================ { "status_code": 200, "data": { "UserPool": { "Id": "us-east-1_9jUv74DH8", "Name": "Zappa-Test", "Policies": { "PasswordPolicy": { "MinimumLength": 8, "RequireUppercase": true, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true } }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" }, "LastModifiedDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 23, "second": 34, "microsecond": 969000 }, "CreationDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 15, "second": 36, "microsecond": 195000 }, "SchemaAttributes": [ { "Name": "sub", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": false, "Required": true, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" } }, { "Name": "name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "given_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "family_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "middle_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "nickname", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "preferred_username", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "profile", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "picture", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "website", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "gender", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "birthdate", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" } }, { "Name": "zoneinfo", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "locale", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "address", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "updated_at", "AttributeDataType": "Number", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "NumberAttributeConstraints": { "MinValue": "0" } } ], "AutoVerifiedAttributes": [ "email" ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE" }, "MfaConfiguration": "OFF", "EstimatedNumberOfUsers": 0, "EmailConfiguration": {}, "UserPoolTags": {}, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false, "UnusedAccountValidityDays": 7 } }, "ResponseMetadata": { "RequestId": "ada5049e-d365-11e7-9a5a-2b0966933efa", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:31 GMT", "x-amzn-requestid": "ada5049e-d365-11e7-9a5a-2b0966933efa", "content-length": "4132", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/cognito-idp.UpdateUserPool_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:32 GMT", "x-amzn-requestid": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "content-length": "2", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a391c043-28f7-11e6-b030-5b78d1137742" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b105f6f0-28f7-11e6-8bbf-b1fb71361919" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "66a81238-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "66a81238-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:24 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "670a080b-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "670a080b-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:25 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_6.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a061bfe1-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a061bfe1-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:01 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_7.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a099988f-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a099988f-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:02 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_8.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1d77053-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1d77053-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.DeleteRule_9.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a20a8e32-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a20a8e32-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_1.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-keep-warm-zappa-ttt666" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_2.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-keep-warm-zappa-ttt888" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_3.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-keep-warm-zappa-ttt888" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_4.json ================================================ { "status_code": 200, "data": { "RuleNames": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_5.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-ttt888-tests.test_app.schedule_me", "zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_6.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-ttt888-tests.test_app.schedule_me", "zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_7.json ================================================ { "status_code": 200, "data": { "RuleNames": [ "zappa-ttt888-tests.test_app.schedule_me", "zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback" ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListRuleNamesByTarget_8.json ================================================ { "status_code": 200, "data": { "RuleNames": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_1.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "RequestId": "53729c57-28f4-11e6-b918-078fb6d3b572" }, "Error": { "Message": "Rule zappa-keep-warm-zappa-ttt666 does not exist.", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_10.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id091815528307", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" }, { "Id": "Id238892486553", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a073e89a-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a073e89a-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:01 GMT", "content-length": "197", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_11.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id854580722537", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1b73d85-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1b73d85-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "105", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_12.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id006403247915", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" }, { "Id": "Id418990627953", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" }, { "Id": "Id765326959363", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1e7ea75-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1e7ea75-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "289", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_2.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "5010", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afd8efac-28f4-11e6-8544-73f7fd03d944" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_3.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "RequestId": "11fb334c-28f6-11e6-a522-b91d7ab8623c" }, "Error": { "Message": "Rule zappa-keep-warm-zappa-ttt777 does not exist.", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_4.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "RequestId": "8994c3fa-28f7-11e6-af9c-c96fcfc9a8ce" }, "Error": { "Message": "Rule zappa-keep-warm-zappa-ttt888 does not exist.", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_5.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "5016", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a37f230a-28f7-11e6-af9c-c96fcfc9a8ce" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_6.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "5124", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b0e1f4a9-28f7-11e6-81bf-2d60e05ac7fd" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_7.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id756017120335", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "6675de5a-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "6675de5a-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:24 GMT", "content-length": "105", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_8.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id249251389162", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "66d6276a-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "66d6276a-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:25 GMT", "content-length": "105", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.ListTargetsByRule_9.json ================================================ { "status_code": 200, "data": { "Targets": [ { "Id": "Id656622160450", "Arn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a0413ff8-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a0413ff8-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:01 GMT", "content-length": "105", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_1.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "5384eb91-28f4-11e6-a567-41a2fedb6435" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_10.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "6803aa43-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "6803aa43-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:26 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_11.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a0ab9a29-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a0ab9a29-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:02 GMT", "content-length": "96", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_12.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a0f748e8-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a0f748e8-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:02 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_13.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1314583-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1314583-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:03 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_14.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a164b18e-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a164b18e-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:03 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_2.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b009279e-28f4-11e6-a04e-f7cf2cf61140" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_3.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt777", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "1210693a-28f6-11e6-99b2-03de7e10bcbf" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_4.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "89e6187a-28f7-11e6-b77e-d3bc5df75ed1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_5.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a3a7b9c4-28f7-11e6-aca4-1fb2cb248ecc" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_6.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2b750b13-6a74-11e6-945c-0b1ddee71d5d", "HTTPHeaders": { "x-amzn-requestid": "2b750b13-6a74-11e6-945c-0b1ddee71d5d", "date": "Thu, 25 Aug 2016 03:29:45 GMT", "content-length": "96", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_7.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2bbf0bba-6a74-11e6-945c-0b1ddee71d5d", "HTTPHeaders": { "x-amzn-requestid": "2bbf0bba-6a74-11e6-945c-0b1ddee71d5d", "date": "Thu, 25 Aug 2016 03:29:46 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_8.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-tests.test_app.schedule_me", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "6724e341-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "6724e341-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:25 GMT", "content-length": "96", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutRule_9.json ================================================ { "status_code": 200, "data": { "RuleArn": "arn:aws:events:us-east-1:724336686645:rule/zappa-ttt888-zappa-keep-warm-handler.keep_warm_callback", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "67a0c9c6-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "67a0c9c6-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:26 GMT", "content-length": "112", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_1.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "53d666ee-28f4-11e6-8df8-379210332ed2" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_10.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "6831716b-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "6831716b-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:27 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_11.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a0e2b047-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a0e2b047-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:02 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_12.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1205550-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1205550-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:03 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_13.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a152afd9-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a152afd9-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:03 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_14.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1853154-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1853154-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:03 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_2.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b037b20c-28f4-11e6-a04e-f7cf2cf61140" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_3.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "124b76d2-28f6-11e6-af9c-c96fcfc9a8ce" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_4.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "8a4af54b-28f7-11e6-8f47-37e43b6a5f7e" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_5.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a3d72e36-28f7-11e6-af9c-c96fcfc9a8ce" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_6.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2ba960ba-6a74-11e6-945c-0b1ddee71d5d", "HTTPHeaders": { "x-amzn-requestid": "2ba960ba-6a74-11e6-945c-0b1ddee71d5d", "date": "Thu, 25 Aug 2016 03:29:45 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_7.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2c0ba5bb-6a74-11e6-945c-0b1ddee71d5d", "HTTPHeaders": { "x-amzn-requestid": "2c0ba5bb-6a74-11e6-945c-0b1ddee71d5d", "date": "Thu, 25 Aug 2016 03:29:46 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_8.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "6789bf2d-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "6789bf2d-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:26 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.PutTargets_9.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "67d5bcf7-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "67d5bcf7-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:26 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_1.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe0431b-28f4-11e6-b5de-4da2458e6f30" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_2.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a384c86f-28f7-11e6-af9c-c96fcfc9a8ce" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_3.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b0ea5868-28f7-11e6-80e7-290fa8f4f236" }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_4.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "668f8104-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "668f8104-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:24 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_5.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "66f128aa-6a74-11e6-b1df-6905c3c8daa6", "HTTPHeaders": { "x-amzn-requestid": "66f128aa-6a74-11e6-b1df-6905c3c8daa6", "date": "Thu, 25 Aug 2016 03:31:25 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_6.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a05192fa-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a05192fa-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:01 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_7.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a0865f69-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a0865f69-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:02 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_8.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1c7b88c-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1c7b88c-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/events.RemoveTargets_9.json ================================================ { "status_code": 200, "data": { "FailedEntries": [], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1f7c927-6a74-11e6-a237-bb13171f213e", "HTTPHeaders": { "x-amzn-requestid": "a1f7c927-6a74-11e6-a237-bb13171f213e", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "41", "content-type": "application/x-amz-json-1.1" } }, "FailedEntryCount": 0 } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_1.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_10.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_11.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "0ef3ada5-6a74-11e6-94a8-7fe6b973411e", "HTTPHeaders": { "x-amzn-requestid": "0ef3ada5-6a74-11e6-94a8-7fe6b973411e", "date": "Thu, 25 Aug 2016 03:28:57 GMT", "content-length": "3773", "content-type": "text/xml" } }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_12.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "48920b7e-6a74-11e6-90df-c50dd5221118", "HTTPHeaders": { "x-amzn-requestid": "48920b7e-6a74-11e6-90df-c50dd5221118", "date": "Thu, 25 Aug 2016 03:30:34 GMT", "content-length": "3773", "content-type": "text/xml" } }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_2.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_3.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_4.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_5.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_6.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_7.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_8.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRolePolicy_9.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81a584b4-28f7-11e6-8296-0db40e88750e" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_1.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "4d88be55-28f3-11e6-b455-b3e4bc23726a" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_10.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "99cb75ea-28f7-11e6-8296-0db40e88750e" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_11.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "0ede77c9-6a74-11e6-94a8-7fe6b973411e", "HTTPHeaders": { "x-amzn-requestid": "0ede77c9-6a74-11e6-94a8-7fe6b973411e", "date": "Thu, 25 Aug 2016 03:28:57 GMT", "content-length": "844", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_12.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "482825c1-6a74-11e6-90df-c50dd5221118", "HTTPHeaders": { "x-amzn-requestid": "482825c1-6a74-11e6-90df-c50dd5221118", "date": "Thu, 25 Aug 2016 03:30:33 GMT", "content-length": "844", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_2.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2cbf61f6-28f4-11e6-a120-7113b0af4e40" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_3.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "8ad450a4-28f4-11e6-8f14-4d8f80324ce8" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_4.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "c1d4b527-28f5-11e6-9d76-fbfa24d3c2ae" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_5.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "eed2a711-28f5-11e6-8296-0db40e88750e" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_6.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "baaaa444-28f6-11e6-967a-8b57d96c38fa" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_7.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "d7d22c50-28f6-11e6-b455-b3e4bc23726a" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_8.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "50d3f5b4-28f7-11e6-b791-1dff148dc09d" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.GetRole_9.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "81802243-28f7-11e6-8296-0db40e88750e" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/iam.PutRolePolicy_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "4b4ef6f8-8245-11e7-ae54-834f84ed42ff", "HTTPHeaders": { "x-amzn-requestid": "4b4ef6f8-8245-11e7-ae54-834f84ed42ff", "date": "Wed, 16 Aug 2017 05:39:38 GMT", "content-length": "206", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_1.json ================================================ { "status_code": 201, "data": { "ResponseMetadata": { "RequestId": "ae983eab-d365-11e7-ba13-8135763ed363", "HTTPStatusCode": 201, "HTTPHeaders": { "date": "Mon, 27 Nov 2017 11:25:33 GMT", "content-type": "application/json", "content-length": "361", "connection": "keep-alive", "x-amzn-requestid": "ae983eab-d365-11e7-ba13-8135763ed363" }, "RetryAttempts": 0 }, "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\"}}}" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_10.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "681d9abb-6a74-11e6-8483-ad8555bfc90e", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:27 GMT", "x-amzn-requestid": "681d9abb-6a74-11e6-8483-ad8555bfc90e", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_11.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "a0d0fc2e-6a74-11e6-954f-91387b9177fe", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:02 GMT", "x-amzn-requestid": "a0d0fc2e-6a74-11e6-954f-91387b9177fe", "content-length": "363", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_12.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "a10b94e1-6a74-11e6-b979-d738397cab13", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:02 GMT", "x-amzn-requestid": "a10b94e1-6a74-11e6-b979-d738397cab13", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_13.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "a1414a73-6a74-11e6-9346-db4e16abbc55", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:03 GMT", "x-amzn-requestid": "a1414a73-6a74-11e6-9346-db4e16abbc55", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_14.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "a1749012-6a74-11e6-b65f-c5206d4f8203", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:03 GMT", "x-amzn-requestid": "a1749012-6a74-11e6-b65f-c5206d4f8203", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_2.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "b02e14cf-28f4-11e6-9dd8-4b08e3c52023" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_3.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "12442376-28f6-11e6-b81e-f9a73f6721a8" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_4.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "8a323d39-28f7-11e6-8116-01b0f23dfa05" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_5.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "a3cea27d-28f7-11e6-9ef0-2d25b6dbc6b7" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_6.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "2b9738e5-6a74-11e6-b885-3d75db80b5c5", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:29:45 GMT", "x-amzn-requestid": "2b9738e5-6a74-11e6-b885-3d75db80b5c5", "content-length": "363", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_7.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "2be66a1e-6a74-11e6-aa2e-e9ecfa4b7177", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:29:46 GMT", "x-amzn-requestid": "2be66a1e-6a74-11e6-aa2e-e9ecfa4b7177", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_8.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "676aed34-6a74-11e6-92f5-8d9fb7451a83", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:26 GMT", "x-amzn-requestid": "676aed34-6a74-11e6-92f5-8d9fb7451a83", "content-length": "363", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.AddPermission_9.json ================================================ { "status_code": 201, "data": { "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\"}", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "67bc19e9-6a74-11e6-a060-3bf8dcc72e5f", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:26 GMT", "x-amzn-requestid": "67bc19e9-6a74-11e6-a060-3bf8dcc72e5f", "content-length": "379", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_1.json ================================================ { "status_code": 201, "data": { "CodeSha256": "cWF57Szks5dHvRXo5yI6Ob0OPhD8TFF8IsmuTeM3vko=", "FunctionName": "zappa-ttt666", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "4cd2e719-28f4-11e6-9c21-ed419ebd424c" }, "CodeSize": 53011393, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666", "Version": "1", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:00:43.958+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_2.json ================================================ { "status_code": 201, "data": { "CodeSha256": "oFEMiO1TSJVVYkVC0PGJM8xN6NWFY37lVfImtmIbL+s=", "FunctionName": "zappa-ttt777", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "0d8e15ce-28f6-11e6-aa0c-7b10ed279857" }, "CodeSize": 52694037, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt777", "Version": "1", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:13:16.029+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_3.json ================================================ { "status_code": 409, "data": { "ResponseMetadata": { "HTTPStatusCode": 409, "RequestId": "57205ad3-28f7-11e6-b9d3-61f7d33459a1" }, "Error": { "Message": "Function already exist: zappa-ttt777", "Code": "ResourceConflictException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_4.json ================================================ { "status_code": 201, "data": { "CodeSha256": "8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "87d0a68e-28f7-11e6-9c83-511af597005a" }, "CodeSize": 8311340, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Version": "1", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:23:48.902+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.CreateFunction_5.json ================================================ { "status_code": 201, "data": { "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "26ec757d-6a74-11e6-b534-e9ce29846b3c", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:29:44 GMT", "x-amzn-requestid": "26ec757d-6a74-11e6-b534-e9ce29846b3c", "content-length": "502", "content-type": "application/json", "connection": "keep-alive" } }, "CodeSize": 34119501, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Version": "4", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:29:40.612+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunctionConcurrency_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunction_1.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "RequestId": "b1a1c1c0-28f7-11e6-8db2-597c5c8eebe5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.DeleteFunction_2.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "RequestId": "a35f4884-6a74-11e6-9c66-eba57f539c2b", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:06 GMT", "x-amzn-requestid": "a35f4884-6a74-11e6-9c66-eba57f539c2b", "connection": "keep-alive", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetAlias_1.json ================================================ { "status_code": 200, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunctionConfiguration_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "8cd3e440-6d74-11e7-9ebd-693a5cc9b121", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/json", "date": "Thu, 20 Jul 2017 17:54:59 GMT", "x-amzn-requestid": "8cd3e440-6d74-11e7-9ebd-693a5cc9b121", "content-length": "609", "connection": "keep-alive" }, "RetryAttempts": 0 }, "FunctionName": "zappa-ttt888", "FunctionArn": "arn:aws:lambda:us-east-1:004396165043:function:zappa-ttt888", "Runtime": "python3.6", "Role": "arn:aws:iam::004396165043:role/zappa-ttt888-ZappaLambdaExecutionRole", "Handler": "handler.lambda_handler", "CodeSize": 16975308, "Description": "Zappa Deployment", "Timeout": 30, "MemorySize": 512, "LastModified": "2017-07-20T17:54:59.235+0000", "CodeSha256": "0pOcmP7sDoO6mLbZKmtH5z0XyjT8wuu/1VenHLgu/MU=", "Version": "$LATEST", "Environment": { "Variables": {} } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_1.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "1", "CodeSha256": "cWF57Szks5dHvRXo5yI6Ob0OPhD8TFF8IsmuTeM3vko=", "FunctionName": "zappa-ttt666", "MemorySize": 512, "CodeSize": 53011393, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666:1", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:00:43.958+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b0c042d3-28f4-11e6-be90-6dca90616b3e" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_2.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "1", "CodeSha256": "8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 8311340, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:23:48.902+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a4a838ef-28f7-11e6-b71d-85d581e5b915" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_3.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:29:40.612+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2abcddc1-6a74-11e6-92cb-fd2bf2ec2010", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:29:43 GMT", "x-amzn-requestid": "2abcddc1-6a74-11e6-92cb-fd2bf2ec2010", "content-length": "1501", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_4.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34293478, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:31:23.343+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "65ca5ca5-6a74-11e6-8fbb-53ef6e599bed", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:23 GMT", "x-amzn-requestid": "65ca5ca5-6a74-11e6-8fbb-53ef6e599bed", "content-length": "1505", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_5.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "4", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:4", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:29:40.612+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "68b8c9f3-6a74-11e6-a583-b36fb60f2d42", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:28 GMT", "x-amzn-requestid": "68b8c9f3-6a74-11e6-a583-b36fb60f2d42", "content-length": "1519", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_6.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:32:54.145+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9fce80d3-6a74-11e6-814e-ed78a2ae26f6", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:00 GMT", "x-amzn-requestid": "9fce80d3-6a74-11e6-814e-ed78a2ae26f6", "content-length": "1505", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_7.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:32:54.145+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a198b90e-6a74-11e6-a16f-7fad14073a60", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:03 GMT", "x-amzn-requestid": "a198b90e-6a74-11e6-a16f-7fad14073a60", "content-length": "1511", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetFunction_8.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:32:54.145+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a33fd9e2-6a74-11e6-b711-ffca1def474c", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:33:05 GMT", "x-amzn-requestid": "a33fd9e2-6a74-11e6-b711-ffca1def474c", "content-length": "1511", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.GetPolicy_1.json ================================================ { "status_code": 404, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 404, "RequestId": "43c3f6fc-7105-11e6-b082-7b8efc14ebe8", "HTTPHeaders": { "x-amzn-requestid": "43c3f6fc-7105-11e6-b082-7b8efc14ebe8", "content-length": "107", "connection": "keep-alive", "date": "Fri, 02 Sep 2016 12:03:30 GMT", "content-type": "application/json", "x-amzn-errortype": "ResourceNotFoundException" } }, "Error": { "Message": "Policy not found: arn:aws:lambda:us-east-1:032345039960:function:zappa-ttt888", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "b0bc99a5-28f4-11e6-973f-fd5204f1d818" }, "Versions": [ ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a4906bea-28f7-11e6-85a7-5f3f9dd115d7" }, "Versions": [ { "Version": "$LATEST", "CodeSha256": "O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 8436189, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:$LATEST", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:24:32.878+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "1", "CodeSha256": "8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 8311340, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:23:48.902+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "2", "CodeSha256": "O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 8436189, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:24:32.878+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_3.json ================================================ { "status_code": 404, "data": { "ResponseMetadata": { "HTTPStatusCode": 404, "RequestId": "0e2c6581-6a74-11e6-a715-5f05be30fa57", "HTTPHeaders": { "x-amzn-requestid": "0e2c6581-6a74-11e6-a715-5f05be30fa57", "content-length": "107", "connection": "keep-alive", "date": "Thu, 25 Aug 2016 03:28:56 GMT", "content-type": "application/json", "x-amzn-errortype": "ResourceNotFoundException" } }, "Error": { "Message": "Function not found: arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.ListVersionsByFunction_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "68a9d580-6a74-11e6-8630-ef2f366ba5b9", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:27 GMT", "x-amzn-requestid": "68a9d580-6a74-11e6-8630-ef2f366ba5b9", "content-length": "1559", "content-type": "application/json", "connection": "keep-alive" } }, "Versions": [ { "Version": "$LATEST", "CodeSha256": "EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34293478, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:$LATEST", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:31:23.343+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "4", "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34119501, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:4", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:29:40.612+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "5", "CodeSha256": "EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=", "FunctionName": "zappa-ttt888", "MemorySize": 512, "CodeSize": 34293478, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:5", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:31:18.572+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateAlias_1.json ================================================ { "status_code": 201, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_1.json ================================================ { "status_code": 200, "data": { "CodeSha256": "O+UgQQT1ppytR9/n9r3ULukBw473iimxxyoQUUzNiuQ=", "FunctionName": "zappa-ttt666", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aa39934a-28f4-11e6-8eab-cdf7e40cdc6c" }, "CodeSize": 53489678, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt666:2", "Version": "2", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:03:19.892+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_2.json ================================================ { "status_code": 413, "data": { "ResponseMetadata": { "HTTPStatusCode": 413, "RequestId": "191e8dbc-28f5-11e6-b71d-85d581e5b915" }, "Error": { "Message": "Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation", "Code": "RequestEntityTooLargeException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_3.json ================================================ { "status_code": 200, "data": { "CodeSha256": "O8GFyWZ+EtwhSP6TS/pnpnMkqraGfs+RncgANv/KneQ=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a239d1da-28f7-11e6-ac0c-af09793b39b4" }, "CodeSize": 8436189, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:2", "Version": "2", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:24:32.878+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_4.json ================================================ { "status_code": 200, "data": { "CodeSha256": "8UE6MFl8cvkkFxpuqn2ABeTmjedHPEODPlX1szqo1+o=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a7ffefec-28f7-11e6-bd37-ffa1d7636382" }, "CodeSize": 8311340, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:3", "Version": "3", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-06-02T19:24:50.332+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_5.json ================================================ { "status_code": 200, "data": { "CodeSha256": "EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "620dc9a2-6a74-11e6-9e11-0bd5ffc6198c", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:21 GMT", "x-amzn-requestid": "620dc9a2-6a74-11e6-9e11-0bd5ffc6198c", "content-length": "504", "content-type": "application/json", "connection": "keep-alive" } }, "CodeSize": 34293478, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:5", "Version": "5", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:31:18.572+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionCode_6.json ================================================ { "status_code": 200, "data": { "CodeSha256": "WNV6eF5pp/4LV7Q3pyMcpDxzqS8LUJ4jPGB/xBNCk+I=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "78fa29eb-6a74-11e6-aab9-f34ee8cdd438", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:32:57 GMT", "x-amzn-requestid": "78fa29eb-6a74-11e6-aab9-f34ee8cdd438", "content-length": "504", "content-type": "application/json", "connection": "keep-alive" } }, "CodeSize": 34119501, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:6", "Version": "6", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:32:54.145+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/lambda.UpdateFunctionConfiguration_1.json ================================================ { "status_code": 200, "data": { "CodeSha256": "EfObQbLlLpQdP82QkHDKIMpEXIZjPWs2ArMptozG7K0=", "FunctionName": "zappa-ttt888", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "65858b4f-6a74-11e6-a4c1-a9af34892afa", "HTTPHeaders": { "date": "Thu, 25 Aug 2016 03:31:22 GMT", "x-amzn-requestid": "65858b4f-6a74-11e6-a4c1-a9af34892afa", "content-length": "508", "content-type": "application/json", "connection": "keep-alive" } }, "CodeSize": 34293478, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888", "Version": "$LATEST", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-25T03:31:23.343+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_1.json ================================================ { "status_code": 202, "data": { "ResponseMetadata": { "HTTPStatusCode": 202, "RequestId": "aasdf-asdfasdf-asdfasdf-asdf" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_2.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "RequestId": "a24d6324-6a74-11e6-a70f-c33a89881a7c", "HTTPHeaders": { "x-amzn-requestid": "a24d6324-6a74-11e6-a70f-c33a89881a7c", "date": "Thu, 25 Aug 2016 03:33:04 GMT", "content-length": "90", "content-type": "application/x-amz-json-1.1", "nncoection": "close" } }, "Error": { "Message": "The specified log group does not exist.", "Code": "ResourceNotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DeleteLogGroup_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a38483ff-6a74-11e6-9e89-1f53bd0bcaf8", "HTTPHeaders": { "x-amzn-requestid": "a38483ff-6a74-11e6-9e89-1f53bd0bcaf8", "date": "Thu, 25 Aug 2016 03:33:06 GMT", "content-length": "0", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_1.json ================================================ { "status_code": 200, "data": { "logStreams": [ { "firstEventTimestamp": 1464895458307, "lastEventTimestamp": 1464895458308, "creationTime": 1464895458318, "uploadSequenceToken": "49547819337008687716864754247034213471967449977953728562", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "lastIngestionTime": 1464895473352, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "storedBytes": 0 }, { "firstEventTimestamp": 1464895458119, "lastEventTimestamp": 1464895458119, "creationTime": 1464895457790, "uploadSequenceToken": "49557759006499770114619173424197784266225544958614456930", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "lastIngestionTime": 1464895473222, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "storedBytes": 0 } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "ae195e73-28f7-11e6-9607-0576b04ab9e4" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_2.json ================================================ { "status_code": 200, "data": { "logStreams": [ { "firstEventTimestamp": 1464895458307, "lastEventTimestamp": 1464895458308, "creationTime": 1464895458318, "uploadSequenceToken": "49547819337008687716864754247034213471967449977953728562", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "lastIngestionTime": 1464895473352, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "storedBytes": 0 }, { "firstEventTimestamp": 1464895458119, "lastEventTimestamp": 1464895458119, "creationTime": 1464895457790, "uploadSequenceToken": "49557759006499770114619173424197784266225544958614456930", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "lastIngestionTime": 1464895473222, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "storedBytes": 0 } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "ae99d8a5-28f7-11e6-96a6-8fce84da63ed" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_3.json ================================================ { "status_code": 200, "data": { "logStreams": [ { "firstEventTimestamp": 1472095939120, "lastEventTimestamp": 1472095939120, "creationTime": 1472095937253, "uploadSequenceToken": "49564431587761396782395039936735939781482269179597839650", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f", "lastIngestionTime": 1472095954272, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f", "storedBytes": 0 }, { "firstEventTimestamp": 1472095819556, "lastEventTimestamp": 1472095876909, "creationTime": 1472095817710, "uploadSequenceToken": "49561406310035646461334886483372352431653111873568533778", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff", "lastIngestionTime": 1472095891991, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff", "storedBytes": 0 }, { "firstEventTimestamp": 1464895458307, "lastEventTimestamp": 1464895458308, "creationTime": 1464895458318, "uploadSequenceToken": "49547819337008687716864754247034213471967449977953728562", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "lastIngestionTime": 1464895473352, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "storedBytes": 246 }, { "firstEventTimestamp": 1464895458119, "lastEventTimestamp": 1464895458156, "creationTime": 1464895457790, "uploadSequenceToken": "49557759006499770114619173424197784266225544958614456930", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "lastIngestionTime": 1464895473222, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "storedBytes": 447 } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9e48f2af-6a74-11e6-b9c8-4beb0a79aaee", "HTTPHeaders": { "x-amzn-requestid": "9e48f2af-6a74-11e6-b9c8-4beb0a79aaee", "date": "Thu, 25 Aug 2016 03:32:57 GMT", "content-length": "1808", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.DescribeLogStreams_4.json ================================================ { "status_code": 200, "data": { "logStreams": [ { "firstEventTimestamp": 1472095939120, "lastEventTimestamp": 1472095939120, "creationTime": 1472095937253, "uploadSequenceToken": "49564431587761396782395039936735939781482269179597839650", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f", "lastIngestionTime": 1472095954272, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f", "storedBytes": 0 }, { "firstEventTimestamp": 1472095819556, "lastEventTimestamp": 1472095876909, "creationTime": 1472095817710, "uploadSequenceToken": "49561406310035646461334886483372352431653111873568533778", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff", "lastIngestionTime": 1472095891991, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff", "storedBytes": 0 }, { "firstEventTimestamp": 1464895458307, "lastEventTimestamp": 1464895458308, "creationTime": 1464895458318, "uploadSequenceToken": "49547819337008687716864754247034213471967449977953728562", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "lastIngestionTime": 1464895473352, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab", "storedBytes": 246 }, { "firstEventTimestamp": 1464895458119, "lastEventTimestamp": 1464895458156, "creationTime": 1464895457790, "uploadSequenceToken": "49557759006499770114619173424197784266225544958614456930", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "lastIngestionTime": 1464895473222, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/zappa-ttt888:log-stream:2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4", "storedBytes": 447 } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9f38a9c8-6a74-11e6-b4b1-bdca786ad91f", "HTTPHeaders": { "x-amzn-requestid": "9f38a9c8-6a74-11e6-b4b1-bdca786ad91f", "date": "Thu, 25 Aug 2016 03:33:00 GMT", "content-length": "1808", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_1.json ================================================ { "status_code": 200, "data": { "searchedLogStreams": [ { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" } ], "events": [ { "ingestionTime": 1464895458153, "timestamp": 1464895458119, "message": "START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\n", "eventId": "32668260353996606794341458938610688159080211542579544064", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826176", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "message": "END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\n", "eventId": "32668260354821734366687092013064740005169577899195826177", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826178", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458307, "message": "START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\n", "eventId": "32668260358189146891665216107594067979796140253731815424", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "message": "END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\n", "eventId": "32668260358211447636863746730735603698068788615237795841", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "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", "eventId": "32668260358211447636863746730735603698068788615237795842", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "ae3571d6-28f7-11e6-a82e-edf0fadbb1e7" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_2.json ================================================ { "status_code": 200, "data": { "searchedLogStreams": [ { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" } ], "events": [ { "ingestionTime": 1464895458153, "timestamp": 1464895458119, "message": "START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\n", "eventId": "32668260353996606794341458938610688159080211542579544064", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826176", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "message": "END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\n", "eventId": "32668260354821734366687092013064740005169577899195826177", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826178", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458307, "message": "START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\n", "eventId": "32668260358189146891665216107594067979796140253731815424", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "message": "END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\n", "eventId": "32668260358211447636863746730735603698068788615237795841", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "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", "eventId": "32668260358211447636863746730735603698068788615237795842", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aeb158e9-28f7-11e6-93eb-53411ab5fae6" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_3.json ================================================ { "status_code": 200, "data": { "searchedLogStreams": [ { "searchedCompletely": true, "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "searchedCompletely": true, "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" } ], "events": [ { "ingestionTime": 1464895458153, "timestamp": 1464895458119, "message": "START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\n", "eventId": "32668260353996606794341458938610688159080211542579544064", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826176", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "message": "END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\n", "eventId": "32668260354821734366687092013064740005169577899195826177", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826178", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458307, "message": "START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\n", "eventId": "32668260358189146891665216107594067979796140253731815424", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "message": "END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\n", "eventId": "32668260358211447636863746730735603698068788615237795841", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "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", "eventId": "32668260358211447636863746730735603698068788615237795842", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1472095819575, "timestamp": 1472095819556, "message": "START RequestId: 3e40e698-6a74-11e6-b010-0796037628bd Version: $LATEST\n", "eventId": "32828833779740469602282057220252583220417675906808610816", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "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", "eventId": "32828833779762770347480587861595779102676387676361785344", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "message": "END RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\n", "eventId": "32828833779762770347480587861595779102676387676361785345", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "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", "eventId": "32828833779762770347480587861595779102676387676361785346", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831701, "message": "START RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b Version: $LATEST\n", "eventId": "32828834050583020038436475292405541805718089804987957251", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831703, "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", "eventId": "32828834050627621528833536538688613242263386527999918084", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831704, "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", "eventId": "32828834050649922274032067161830148960536034889505898501", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "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", "eventId": "32828834050672223019230597784971684678808683251011878918", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "message": "END RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\n", "eventId": "32828834050672223019230597784971684678808683251011878919", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "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", "eventId": "32828834050672223019230597784971684678808683251011878920", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095837489, "timestamp": 1472095837474, "message": "START RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560 Version: $LATEST\n", "eventId": "32828834179325222069553762691946502590087704378856177664", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837478, "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", "eventId": "32828834179414425050347885202716289686015888095690031104", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837478, "message": "Zappa Event: {}\n", "eventId": "32828834179414425050347885202716289686015888095690031105", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "message": "[DEBUG]\t2016-08-25T03:30:37.478Z\t4a180eae-6a74-11e6-a770-3dfd80db1560\tZappa Event: {}\n", "eventId": "32828834179436725795546415825857825404288536457196011522", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "message": "END RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\n", "eventId": "32828834179436725795546415825857825404288536457196011523", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "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", "eventId": "32828834179436725795546415825857825404288536457196011524", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095876933, "timestamp": 1472095876906, "message": "START RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9 Version: $LATEST\n", "eventId": "32828835058688206738013294456667706850429642808481021952", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457088", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457089", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "message": "END RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\n", "eventId": "32828835058755108973608886344296130140153400867786457090", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457091", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095939205, "timestamp": 1472095939120, "message": "START RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517 Version: $LATEST\n", "eventId": "32828836446106768519397482659453111578474681979771748352", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939120, "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", "eventId": "32828836446106768519397482677667903964769906316644384768", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939121, "message": "END RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\n", "eventId": "32828836446129069264596013300809439683042554678150365185", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939121, "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", "eventId": "32828836446129069264596013300809439683042554678150365186", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9e5e4e9d-6a74-11e6-8722-a741ba7570d8", "HTTPHeaders": { "x-amzn-requestid": "9e5e4e9d-6a74-11e6-8722-a741ba7570d8", "date": "Thu, 25 Aug 2016 03:32:59 GMT", "content-length": "13280", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/logs.FilterLogEvents_4.json ================================================ { "status_code": 200, "data": { "searchedLogStreams": [ { "searchedCompletely": true, "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "searchedCompletely": true, "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "searchedCompletely": true, "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" } ], "events": [ { "ingestionTime": 1464895458153, "timestamp": 1464895458119, "message": "START RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb Version: $LATEST\n", "eventId": "32668260353996606794341458938610688159080211542579544064", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826176", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "message": "END RequestId: 9940e9d3-28f7-11e6-806c-8d2d134ad5bb\n", "eventId": "32668260354821734366687092013064740005169577899195826177", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473222, "timestamp": 1464895458156, "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", "eventId": "32668260354821734366687092013064740005169577899195826178", "logStreamName": "2016/06/02/[$LATEST]a51710ea77034373868eeb2ca461c8f4" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458307, "message": "START RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a Version: $LATEST\n", "eventId": "32668260358189146891665216107594067979796140253731815424", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "message": "END RequestId: 9995728f-28f7-11e6-8401-a1f02f9e795a\n", "eventId": "32668260358211447636863746730735603698068788615237795841", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1464895473352, "timestamp": 1464895458308, "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", "eventId": "32668260358211447636863746730735603698068788615237795842", "logStreamName": "2016/06/02/[$LATEST]f03059c510ca4976987d6a56b799e4ab" }, { "ingestionTime": 1472095819575, "timestamp": 1472095819556, "message": "START RequestId: 3e40e698-6a74-11e6-b010-0796037628bd Version: $LATEST\n", "eventId": "32828833779740469602282057220252583220417675906808610816", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "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", "eventId": "32828833779762770347480587861595779102676387676361785344", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "message": "END RequestId: 3e40e698-6a74-11e6-b010-0796037628bd\n", "eventId": "32828833779762770347480587861595779102676387676361785345", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095819557, "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", "eventId": "32828833779762770347480587861595779102676387676361785346", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831701, "message": "START RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b Version: $LATEST\n", "eventId": "32828834050583020038436475292405541805718089804987957251", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831703, "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", "eventId": "32828834050627621528833536538688613242263386527999918084", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831704, "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", "eventId": "32828834050649922274032067161830148960536034889505898501", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "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", "eventId": "32828834050672223019230597784971684678808683251011878918", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "message": "END RequestId: 463d939d-6a74-11e6-9e46-4372c0a7957b\n", "eventId": "32828834050672223019230597784971684678808683251011878919", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095834631, "timestamp": 1472095831705, "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", "eventId": "32828834050672223019230597784971684678808683251011878920", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095837489, "timestamp": 1472095837474, "message": "START RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560 Version: $LATEST\n", "eventId": "32828834179325222069553762691946502590087704378856177664", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837478, "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", "eventId": "32828834179414425050347885202716289686015888095690031104", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837478, "message": "Zappa Event: {}\n", "eventId": "32828834179414425050347885202716289686015888095690031105", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "message": "[DEBUG]\t2016-08-25T03:30:37.478Z\t4a180eae-6a74-11e6-a770-3dfd80db1560\tZappa Event: {}\n", "eventId": "32828834179436725795546415825857825404288536457196011522", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "message": "END RequestId: 4a180eae-6a74-11e6-a770-3dfd80db1560\n", "eventId": "32828834179436725795546415825857825404288536457196011523", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095852547, "timestamp": 1472095837479, "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", "eventId": "32828834179436725795546415825857825404288536457196011524", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095876933, "timestamp": 1472095876906, "message": "START RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9 Version: $LATEST\n", "eventId": "32828835058688206738013294456667706850429642808481021952", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457088", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457089", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "message": "END RequestId: 619f5090-6a74-11e6-bea3-9380ecc2bed9\n", "eventId": "32828835058755108973608886344296130140153400867786457090", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095891991, "timestamp": 1472095876909, "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", "eventId": "32828835058755108973608886344296130140153400867786457091", "logStreamName": "2016/08/25/[$LATEST]927fa33f345348748e693430dd9975ff" }, { "ingestionTime": 1472095939205, "timestamp": 1472095939120, "message": "START RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517 Version: $LATEST\n", "eventId": "32828836446106768519397482659453111578474681979771748352", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939120, "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", "eventId": "32828836446106768519397482677667903964769906316644384768", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939121, "message": "END RequestId: 858894b4-6a74-11e6-9c5d-dfc74bd9e517\n", "eventId": "32828836446129069264596013300809439683042554678150365185", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" }, { "ingestionTime": 1472095954272, "timestamp": 1472095939121, "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", "eventId": "32828836446129069264596013300809439683042554678150365186", "logStreamName": "2016/08/25/[$LATEST]5b770117f3054648a526f9ea34aa950f" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9f4bbca1-6a74-11e6-9da3-c567afd11da4", "HTTPHeaders": { "x-amzn-requestid": "9f4bbca1-6a74-11e6-9da3-c567afd11da4", "date": "Thu, 25 Aug 2016 03:33:00 GMT", "content-length": "13280", "content-type": "application/x-amz-json-1.1" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"7d8ea4b5ca695ef9def6f57e8ab947af-7\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt666-1464893986.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1U04LK7sMQjp+bQd91fM5zhG/ealJmd6+PIGvUE0Fx2gA88TS/2pO+/hqbOl0dSYpUrXl87wFXY=", "RequestId": "753D147604AD53D7" }, "Key": "zappa-ttt666-1464893986.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_2.json ================================================ { "status_code": 200, "data": { "ETag": "\"cb211db1a343550a77053192725b9b3f-7\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt666-1464894143.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "CDDWDTTgkMv6wIemmCaivt1xCqIQZVPRKPWaXXTBzku7ndJ4Pi8gnoWfyZ3czOMmH3uTkS5FFZo=", "RequestId": "88F34F6CF3AFFF08" }, "Key": "zappa-ttt666-1464894143.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_3.json ================================================ { "status_code": 200, "data": { "ETag": "\"a9e494dfe3c5246750e78bd42f90c4a5-7\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt777-1464894741.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "I1HS36v8H6pvz1LSPYQGmckWapvyYjcBW7/7oWMvbj7oCw04Rmvixg09EPhmS0D50TrIN5yCMHw=", "RequestId": "9B6AF42A93970E25" }, "Key": "zappa-ttt777-1464894741.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_4.json ================================================ { "status_code": 200, "data": { "ETag": "\"79446d3807f886f8f89ed5179c6f4c81-2\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt888-1464895457.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "cGdNVqQMWt2lKxO7WUwdjjb0UPz/X8hD8HyjMDJEwmVWz5nRkuHCQuvaKIow46iMIkWyPmq+RiA=", "RequestId": "9E9942B27023A8D4" }, "Key": "zappa-ttt888-1464895457.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_5.json ================================================ { "status_code": 200, "data": { "ETag": "\"4cff7333c284cf98d32e9c234078a260-5\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt888-1472095738.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1rYmoqWiCpm9xab8SHg7A0bHqRmOC2C0uTWEA0kMJlnRjYp5P8sJsABafj/56NcV6NKxkq/qKyA=", "RequestId": "C174B5610428C046", "HTTPHeaders": { "x-amz-id-2": "1rYmoqWiCpm9xab8SHg7A0bHqRmOC2C0uTWEA0kMJlnRjYp5P8sJsABafj/56NcV6NKxkq/qKyA=", "server": "AmazonS3", "transfer-encoding": "chunked", "x-amz-request-id": "C174B5610428C046", "date": "Thu, 25 Aug 2016 03:29:39 GMT", "content-type": "application/xml" } }, "Key": "zappa-ttt888-1472095738.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CompleteMultipartUpload_6.json ================================================ { "status_code": 200, "data": { "ETag": "\"d3baeac4e66f3403809c1deb5e76ae40-5\"", "Bucket": "lmbda", "Location": "https://lmbda.s3.amazonaws.com/zappa-ttt888-1472095835.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "DU1b7lEUxvZ8CZzg6z4YPUr/WI1yLurRUXoVZ2eELwWVsg6ojDzcRBq7a3RkFCW2t/skLr81CIg=", "RequestId": "3099CD772CC83FD5", "HTTPHeaders": { "x-amz-id-2": "DU1b7lEUxvZ8CZzg6z4YPUr/WI1yLurRUXoVZ2eELwWVsg6ojDzcRBq7a3RkFCW2t/skLr81CIg=", "server": "AmazonS3", "transfer-encoding": "chunked", "x-amz-request-id": "3099CD772CC83FD5", "date": "Thu, 25 Aug 2016 03:31:18 GMT", "content-type": "application/xml" } }, "Key": "zappa-ttt888-1472095835.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_1.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "WkKOL/umYvyelpQTci91kybzdBtME9Fre1at/Qq1VLpdLUptTvl+YokU2aPFUflogOIoXb01juU=", "RequestId": "F3587DF863DFE7FB" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_10.json ================================================ { "status_code": 200, "data": { "Location": "/lmbda", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "/YSJwqqetw2S1gPvBA/OdTp0m8jqv7ZrN5gPA3OOviJvRgaqknRtLSo5iX9PPNDdfvewQWArLKI=", "RequestId": "E294822D6B451239", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "/YSJwqqetw2S1gPvBA/OdTp0m8jqv7ZrN5gPA3OOviJvRgaqknRtLSo5iX9PPNDdfvewQWArLKI=", "server": "AmazonS3", "x-amz-request-id": "E294822D6B451239", "location": "/lmbda", "date": "Thu, 25 Aug 2016 03:30:45 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_2.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "ixHdQ3qvyt5fk5PT/74tfr1XaZW9OB1x8QC0ei9d3zxD8YA/64TQkiUo35wem3Y7andJXQ8UGkM=", "RequestId": "A0FF751028D7BE3E" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_3.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "3gwJL32J80cl2zqOqBO7i4ivR+bIKHk1Z6SqcoVmtWNMo8x5LKMeqLAcSYRn44E33OPn+erQsbY=", "RequestId": "51C8A341B18A3239" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_4.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "H09AiBf8SSHvsa/OmW8cP1UGxAT5Y7HWemIdva6+aU0FPBDs5G3kcuwXEX1uu5Am6KuHA20/yMQ=", "RequestId": "21000EA7A2256303" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_5.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "Wb7Zafku3Fm3Jo9rU4fdCONIC1uqzsB6wOenBvQ40sYlBaPODFG2w+wVCzIatOB8Dp1D4ZoHdGw=", "RequestId": "2CB218F2983FF033" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_6.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "ntsdbpuJwEmOZW+3e0//DvmxIl8qfINHCTNsxzdoYbwaqL86Q/muJ8FifIV/PSboAOypFY2v6zU=", "RequestId": "66505E25363BE660" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_7.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "hfJ5JJhKDWwmDRS/zZZpHrfGDbRjH0b2YZsUvV5Zw/QSsvYO3nkBzhT1NeCEO5zb5SpqCafh99w=", "RequestId": "11F1F27E46FE9D55" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_8.json ================================================ { "status_code": 400, "data": { "ResponseMetadata": { "HTTPStatusCode": 400, "HostId": "OawmswNfwnBjYReYvTv3YfhUA2X+2/064rQc4ucsQEPhxVj511hBQUi+r84hQoh9cNzl8Lr3WQU=", "RequestId": "8CC9BCD1FDC1B4C3" }, "Error": { "Message": "The specified location-constraint is not valid", "Code": "InvalidLocationConstraint", "LocationConstraint": "us-east-1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateBucket_9.json ================================================ { "status_code": 200, "data": { "Location": "/lmbda", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "ZgZJ98oqBfCvDXQ9uKmsTb+Jg7NKAqdR6bg7BtmmE941CWnUXSF0qdfwOkYoQqhaJSw1M9goVbg=", "RequestId": "FB82CE06E5269737", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "ZgZJ98oqBfCvDXQ9uKmsTb+Jg7NKAqdR6bg7BtmmE941CWnUXSF0qdfwOkYoQqhaJSw1M9goVbg=", "server": "AmazonS3", "x-amz-request-id": "FB82CE06E5269737", "location": "/lmbda", "date": "Thu, 25 Aug 2016 03:29:07 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "US_bFtpdBYtCllL2Cl9U3OlxrWnzPNgdILxxQ3FboEG3vlfDPTtracF7Db_q6XXBD7u3XpnTPE.8e2F9YTyxTQ--", "Key": "zappa-ttt666-1464893611.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "LLVwICNp0bM5O9UlagkyPe4F1xSGyzc2o+UzwnzPC8HOwM/MHGbiEYqWv30I3vXC/lqNjTX7TyE=", "RequestId": "F180A947964EED25" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_2.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "A15QCn_ymu0PDNdm4oCG0iw509EcREjrlaO6C4SshzTmy3usSJ174TlWmgL6iy7f5jiQHXYnrZ6QRQKEzczNog--", "Key": "zappa-ttt666-1464893986.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "IrbF7Nil6jqwHkO5AgWvkgOGdJZ1HHlfPQVZr1iZxm9MSzGCrFhdAOmfgxaXk9jGTaACwFT9Gog=", "RequestId": "729D63EA69A183CD" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_3.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "UZZLVPlRxiH7LauzkSoyXHVRL5QhU2hpH36uPhAkiILgTLY3a8Z3AkTc3XtxiIvm856urSUFdXEoqdiEl8ed_g--", "Key": "zappa-ttt666-1464894143.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "WVuuVNQaXZbEdTIsOAJWwqjl22xpngmFTbkcmmFSThX4y7ah6lMBDqHmrbO6tm7j21LT73lJ/7A=", "RequestId": "D0D2A50BA855F11F" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_4.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "zMVT1Ff2vwJljMaIZVvvzWMKNFNL6oGrPetJimjggNyIGzheMABl0vvcjQ0CPWFv7gzwhyk3lcsTFb_XlfUrBQ--", "Key": "zappa-ttt777-1464894741.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "9+9lOecGqOD/+rhp6Iz6oqTrOYwbJtzwyQAff5pSLpkU5A3i0rLIzMO665YbsVvQ1rHpMJmAkCk=", "RequestId": "AEE878A166629949" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_5.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "jdF42jIIibhpgl11YtCGyctvxfLLFa6JpJTcsjpPuJZoeQBiMPpP9xxoHLr2Q0Gc2xCnka1dM1Qy31klQpzptw--", "Key": "zappa-ttt777-1464895132.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "3aVY53C8sq1b2kgaCP1YNIMPrAYKCO09sbcb2PVM9Uby47BD1s7RPdWv0VfMOZfg+JQ8ievD1s8=", "RequestId": "57CC7AACBA21B328" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_6.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "3mze22UMMFSxvNPzj6G_VKiTuf3VHw.q2qFqHDBh1neIib_kIpvUV4UvZ3bWraZOleEvtXD2WzKRH8zbZbe0Ww--", "Key": "zappa-ttt888-1464895457.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "5AAEtb6SGiTHMiDiF9K2gFOSbO9yhUjK6Zm5f+ITUCppV5GYM+YTe3domen5YjMnwsTX5kNlSMY=", "RequestId": "165233E17319C4F3" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_7.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "A3T4vXHQEd9dw1uK8y1S2E6qArCsvZaXFXXtbMOVND8uqtMKqqnkqf9e_lrLlcyLIZi7lr_HY5ClRFopCO.4Ig--", "Key": "zappa-ttt888-1472095738.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1sYhVpDz0fFArHH3ypjaroVzsgy8BR9R5vPA7s/cc7sEqKrXBwsDidNoirib0x1eLX+myjUh4/8=", "RequestId": "16D622C42C6154BE", "HTTPHeaders": { "x-amz-id-2": "1sYhVpDz0fFArHH3ypjaroVzsgy8BR9R5vPA7s/cc7sEqKrXBwsDidNoirib0x1eLX+myjUh4/8=", "date": "Thu, 25 Aug 2016 03:29:08 GMT", "transfer-encoding": "chunked", "x-amz-request-id": "16D622C42C6154BE", "server": "AmazonS3" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.CreateMultipartUpload_8.json ================================================ { "status_code": 200, "data": { "Bucket": "lmbda", "UploadId": "Of02Ii9bKP99Q0IeesyEkV7a2bEF7Uv4AuBw_MDipQE7N_5iR0ptMrQXP7FYotBiU0emwfNMem_96euqrXxeIQ--", "Key": "zappa-ttt888-1472095835.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "4kRjYO9wNrV4HuGRMvaH+Mo6kgNFjQQ9ntg5dN9+9VHrtI53/dYzOIbPO++s6MjNpyEkY6V/mbI=", "RequestId": "B1AFC8BD862E8A41", "HTTPHeaders": { "x-amz-id-2": "4kRjYO9wNrV4HuGRMvaH+Mo6kgNFjQQ9ntg5dN9+9VHrtI53/dYzOIbPO++s6MjNpyEkY6V/mbI=", "date": "Thu, 25 Aug 2016 03:30:45 GMT", "transfer-encoding": "chunked", "x-amz-request-id": "B1AFC8BD862E8A41", "server": "AmazonS3" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_1.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_2.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_3.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_4.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_5.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.DeleteObject_6.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "uAXeXh1s8nYDQU/KD7qa2DPPSN+mMJ3d5hP9G5hegH0fNOhehPo/kdHmCMBB8pXGfM56/Tzi4N0=", "RequestId": "4AF5E5D5B7DD6424" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "X9TX+PJGkwPRxkC50qdl+b9lkFkeGbNKleAENOakCVi5JMZP8QYXKoVX6OYoOriDZ9DOJLpdZuE=", "RequestId": "447BAF343E73D371" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "SuKvXFoSJbM/2jkopS0MAyrO4UIzSJIAl0JSpCZLvO1fhB058u2IQXoy4+gM7kiE/vxFhXmk+qY=", "RequestId": "1781FF8E001574B5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "qEDhHzOeHhrFyBMpFd+RvM+Eo8kiptgwFvuV8a68RNjz+g6lJD9a6ysrN2/orszOFZr6B1Cw6as=", "RequestId": "484B95A4A0FB9451" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "eO/GhHTRpS+CUu157mnKhejp/Hu85BlJ3GbrR7TsxT5iU8F4TaaCJvwRtlTrS4S3KSQG5QyXkaA=", "RequestId": "694DA0BE4C6E334D", "HTTPHeaders": { "x-amz-bucket-region": "us-east-1", "x-amz-id-2": "eO/GhHTRpS+CUu157mnKhejp/Hu85BlJ3GbrR7TsxT5iU8F4TaaCJvwRtlTrS4S3KSQG5QyXkaA=", "server": "AmazonS3", "transfer-encoding": "chunked", "x-amz-request-id": "694DA0BE4C6E334D", "date": "Thu, 25 Aug 2016 03:30:33 GMT", "content-type": "application/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.HeadBucket_6.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "FifYdur0PVNCEXZe/jSHaLp/NpQzXcYKHCGXWO5Lsbi1Fu2zhbfM9/i61//u3PL5AA2zi3XSy1M=", "RequestId": "B51935E006CEB74A", "HTTPHeaders": { "x-amz-bucket-region": "us-east-1", "x-amz-id-2": "FifYdur0PVNCEXZe/jSHaLp/NpQzXcYKHCGXWO5Lsbi1Fu2zhbfM9/i61//u3PL5AA2zi3XSy1M=", "server": "AmazonS3", "transfer-encoding": "chunked", "x-amz-request-id": "B51935E006CEB74A", "date": "Thu, 25 Aug 2016 03:31:23 GMT", "content-type": "application/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.PutObject_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"deb78dc052685752be7e1370e0689391\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1gmZkXfdLqDqlqUdMjetbhJ/K5FZBHd+uczRh6TcAPqHL7timFbAMoEQO3PtTlAIVdoejCQ0x00=", "RequestId": "417985B0ADD8BCB0" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.PutObject_2.json ================================================ { "status_code": 200, "data": { "ETag": "\"041ea0d7bf25415d10604d7c5b66dbb2\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "2fALzAd9Y/kJCKcDOBMiJFGwfyNN+dXJjeoyZPAozpGE6dDNcg9cQt0B+ef9oSL1YrrEiJjFUiY=", "RequestId": "FBEB40B5C3E49393" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"1242470432e43dfd0426c87a81d478aa\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "zasl1XXzLL6GSsA8iiKdTKpfYg4MHclBJPo28N08zPb0vS9MQkQTgq/TaHJwGL2f12y31r4Cn30=", "RequestId": "734C4C70E100D4C6" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_10.json ================================================ { "status_code": 200, "data": { "ETag": "\"4398272c8aa68f99a63d1a14065a20ec\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "m7ftvLp5tpV3HA1LELk0rjwN5RCZV7wzXfph+5p1EWAxEaa5it1gi6fJ5VEz7oLHaUPuq200YHs=", "RequestId": "CF52E43AB50169C9" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_11.json ================================================ { "status_code": 200, "data": { "ETag": "\"a397427b45b59d474f9bfcb3c6944a7e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "sQ5uFLn3//gxsiZD3HUd+6fRF04kDcZJAzdihOYwFGsy/Gn/N1vZOtUHMlf73qBl1kvvfOu12cQ=", "RequestId": "641375B0D0F17519" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_12.json ================================================ { "status_code": 200, "data": { "ETag": "\"3b3bad108adc65ee2e29bdbf30bd3ba9\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "FEW8Q0LbM7itBDlB5RVXR8hFdVuquw3BHqF2NmpBxODgHTllocOHIrRXMr19fI++NLBZRJqBQWQ=", "RequestId": "4F83278171F2D0D1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_13.json ================================================ { "status_code": 200, "data": { "ETag": "\"229bb6f168da5aa543ad5918cc6c24f1\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "2ydbp+NdwzX5URL8GmTtnVYeBwixQi3h+4Et6WZwGLVC/3zcNpvBg/P+tvP/iNDYaSNUvTP1d8M=", "RequestId": "E1033839A2210EA6" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_14.json ================================================ { "status_code": 200, "data": { "ETag": "\"51d6450073ea95efcfbaf62fff7e1312\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "sbiaUw0uGUdmer6oiFq4veKXhIOAWlQP4Xv6Wqvu4Gr10I625TQR+8MJc4xQ8f7tIICaH+av7Mo=", "RequestId": "52C56A59B2CD9DB6" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_15.json ================================================ { "status_code": 200, "data": { "ETag": "\"b1a8651b6edd778fe291d35d5e18df77\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "L7O9ixK1BMEKv4KTIFZModaCRQWjGlsmnfg6LbPfkU7dtyE70NKLJ1FYY41tGmZF5biORpLsapc=", "RequestId": "04AA1E715E8C160A" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_16.json ================================================ { "status_code": 200, "data": { "ETag": "\"229bb6f168da5aa543ad5918cc6c24f1\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "LDblVk1NaREWA0/bd5oUSz5cBOoC9DOcA/3sStt3bEw9g6cr9+76gz16UWEBKP2aW6vLKqMnJuA=", "RequestId": "5282C18C7DB82F25" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_17.json ================================================ { "status_code": 200, "data": { "ETag": "\"4398272c8aa68f99a63d1a14065a20ec\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "tDwkWKDhNbtxfdFT/90P7Idmjqf6CPkuFgwbLBrQL6CyxYanqhi3azBpnb+QGI0ttXYfoN4Frvw=", "RequestId": "75D22D39A79EDFD2" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_18.json ================================================ { "status_code": 200, "data": { "ETag": "\"51d6450073ea95efcfbaf62fff7e1312\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "OWVUZ5hy1haKFYp1Vjd0q3gnEfzCrZcC96HhlP6QLoWxfevn4DbMSheYm693gOgq4Wx/fjwKAbg=", "RequestId": "D8B0D08C2444330C" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_19.json ================================================ { "status_code": 200, "data": { "ETag": "\"3d8594493e6e63cb3e4271a47db3ff04\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Jy3Z2iSSC87HQ6245l7bKjPPPTebmiY+LqN2z9mynCDMqCFaLinO1uDbbkROmv68nYLctkTF33w=", "RequestId": "ADF2101C71860122" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_2.json ================================================ { "status_code": 200, "data": { "ETag": "\"5af3d1c659ca1359c0b281ea96c5c90e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "V/kUEy1azTsD3qTQXx14ffnV6cgrq9/Gd4zkSAyUjaE9X3ng/hgBR/KEYiUTXw27/0hT/X1LU+8=", "RequestId": "68BBEA9F860B426F" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_20.json ================================================ { "status_code": 200, "data": { "ETag": "\"a397427b45b59d474f9bfcb3c6944a7e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "heRgdTXa8K2oh7Y7xedgAkvMt9PNwUiPMmLsk1o6sidhdmYUxHTbaxCxx4xPLtRJpj48/LI2XfQ=", "RequestId": "99BCAEADB87D8130" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_21.json ================================================ { "status_code": 200, "data": { "ETag": "\"be81001ac8c8c0d290f47e97f22abbc9\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "7phlZLQPWh5Rgk3FKuMHLvgV8VoKfmq7E4Ly9K7zuN3NtcJarPMMM5jVstUyE+OlBrWgrOvPoQg=", "RequestId": "270D6D409C05B385" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_22.json ================================================ { "status_code": 200, "data": { "ETag": "\"cabe8e9d9f8b3e59778168d132b01759\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "XMXgvLPuTNhrYSnAXXmDd4co98JmPuUqyPICTeWKZ6gcPHrFqd7lnBIwJNau6neu6RPmFj+iipw=", "RequestId": "D2BD17C8F86EAE73" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_23.json ================================================ { "status_code": 200, "data": { "ETag": "\"cbff88fe24f1c482b368ec7b975f6720\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "RISiMRRCNWa7Wqj7Y542P3IOGAueS1oFcg7gZTMcS/Xh/VC7oOwFOD70JMcFuVhnfLODK0VVx4g=", "RequestId": "B814B11452F79FD1" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_24.json ================================================ { "status_code": 200, "data": { "ETag": "\"46ec538eaab9f73a58ccbddfaf7e0a90\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "+nQXq03sUfV6OHPgOejJHV1EcFCQOHYeOX24M+kDAYdjNHbjcn+hs51xQy3IQKBiQycBcr5JBy0=", "RequestId": "B1AA2E6D00EC0E38" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_25.json ================================================ { "status_code": 200, "data": { "ETag": "\"e420f791dba5cabc26820fbde065c1fe\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "BJ6G/EDKpa1y//YXvDMl5QUCxxIMhaMQOJua1p1f3xKHEiLZlZKlFLo2IEXQPtNY+T82xxesCOI=", "RequestId": "4D9DE8D7ECC279E8" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_26.json ================================================ { "status_code": 200, "data": { "ETag": "\"0303cfb0d66cee3dd346390580ddea53\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Zm00+3pPEcm0zsG8p2iqPQvtrTxWARxSCVMQszl14x830pf/zld0fEHAl6v/J7YdeZifAgYK24M=", "RequestId": "2F1D8B14B8F46195" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_27.json ================================================ { "status_code": 200, "data": { "ETag": "\"bd9e04a2eed4d2957ba9e92436cb8ffb\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "JtfDy6sJsaCJwzNNSuj59b1DAJnvwRUsxIVXPcvudypIlUTk7CByv/Zu5cRQ6FK1TM+fBHD70BA=", "RequestId": "CC86CC3DF4DDC42C" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_28.json ================================================ { "status_code": 200, "data": { "ETag": "\"9998157cd1f74475327e3428d8f2144f\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "sj0O3u6Md5oiMVmDPEs1NQzNa7sdy7vAoeEpY81dSBxZ9Aex6cgA/p5NnhhppTvlnTndPNiDb10=", "RequestId": "BFC2014C8B57F200" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_29.json ================================================ { "status_code": 200, "data": { "ETag": "\"f6140e3e2473a04de3961fd78cdcfe40\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "RPp5i63tP8z+oQPZr69KY1eK1OwAPXPD9BXU1HdmvQLwIq/S6R8Nui5eDaTh4KmMidsnogONYfM=", "RequestId": "43403A445017CE93" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_3.json ================================================ { "status_code": 200, "data": { "ETag": "\"31c13ab8e2d1ba711e77d08c901d3be8\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Xp+f2l6fZqckLwPGbSBOOCePrib0OnrQwOfilgkihJPyco11c3Wtok4Lm7K/QOFfeDd/LU1V3kc=", "RequestId": "335FC6FE0BA8B8BC" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_30.json ================================================ { "status_code": 200, "data": { "ETag": "\"85e8afd19ff1bd97ddaa011ec33c1ebb\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Ahx9/55dPxJbwsmwekz2rPT+so4G99o2V+Qft+6dc41Wz+xDOlTxv6hZo/Aje8pH3u1KLDiisww=", "RequestId": "F2A4FC0F994C8BC5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_31.json ================================================ { "status_code": 200, "data": { "ETag": "\"380f42248ecfeef3e993bdb8648f7881\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "R+AxY0PpAjv6ia4QStds8SVoZNJYrTut9DPG2/eEh0mn2kEWCUn2gVJ/6BpOiPLtGliIGu8jLik=", "RequestId": "34DBF90CACF01699" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_32.json ================================================ { "status_code": 200, "data": { "ETag": "\"48077a74caf88237cc0f25de30fe4640\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "bKNsHrbCzDRdc3iSYOWHzrJgYwQyi7KFL/2+IWR5WbRPhts8AzEFkheiaEDU3iBXSe5fTzK9AyU=", "RequestId": "63236EF2E576FD0C" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_33.json ================================================ { "status_code": 200, "data": { "ETag": "\"1143aa0e146adacd0a9c58f4d43721b7\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "qp/roI60HDe7ENnLHIKmcZ+WW9IzbqnaS2OIdrY4EdPYvFBdAgFUSc+xFeeuHyTbHdJ3egfHAmM=", "RequestId": "94BA9014F8216639" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_34.json ================================================ { "status_code": 200, "data": { "ETag": "\"82902c50d3555bf8cdca1ee94027032c\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "gEoEUasdItPrYqDEBnKqrpp5L1ZtsgXCyPsww4E3xLwYZuTSdw7+oUqU24HAGHCet3EwSbwUdRI=", "RequestId": "C92A13FFBF7FB473" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_35.json ================================================ { "status_code": 200, "data": { "ETag": "\"957b0ae07059f1d95344ba38a7e2c5de\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "m7Rf3fVbRm0+IBbpHV/77EGpycbWkwot2xL7yplAowc8YtDQcCOl8YY0sr+1B2GINR3ew0pdU/0=", "RequestId": "1207CAC55752D828" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_36.json ================================================ { "status_code": 200, "data": { "ETag": "\"5af6121935b546fce744b2bc3229d5fd\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "m6/sPKdp/S1QOBngd8+8gO9Ek1R46yrZCFPgEfjZP7b5qK+C7JPjnUVpAx/nv6fPa0n2ktSp9AE=", "RequestId": "4D2C812CD712564C" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_37.json ================================================ { "status_code": 200, "data": { "ETag": "\"6c1d802704b810593239b59944cd3205\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "y8bprdPrSd0TS5e29M+nstHxL2dK9j5aVXLaSSoLCNRpS7OPSptT/LLfHwFKNX4qLzrwQkQaUB8=", "RequestId": "F36DA6AD7E7C2E31" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_38.json ================================================ { "status_code": 200, "data": { "ETag": "\"102e3b0b9ed9080f0b8cbeb8d7941d8e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Bj3c1RKnK+aF2VC8BymsFZDv982sFy19zRS1ggmf67NHtPXAHctsNVkO9HtST+MTF0eNOFShVqk=", "RequestId": "CB63DB4A78312EE4" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_39.json ================================================ { "status_code": 200, "data": { "ETag": "\"6f31fde6eac0db6d8cf9d36574edae76\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "JhFm5wKTQ05uYlEqMbPZbQOrijXV/Lw1cfIVYgnxtj/xBwLUtpKVStNPOFPX9J0P6G4OQYpAHxg=", "RequestId": "A1DE373066AA8630", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "JhFm5wKTQ05uYlEqMbPZbQOrijXV/Lw1cfIVYgnxtj/xBwLUtpKVStNPOFPX9J0P6G4OQYpAHxg=", "server": "AmazonS3", "x-amz-request-id": "A1DE373066AA8630", "etag": "\"6f31fde6eac0db6d8cf9d36574edae76\"", "date": "Thu, 25 Aug 2016 03:29:08 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_4.json ================================================ { "status_code": 200, "data": { "ETag": "\"c307018fb49fc0980fc8771eeb6742cc\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "NYQOzV1gEaUqdBQ8TqJH/Y4mzGW1JjSnOpyr6aquEJsJUmPrB+/pMqGBuuE2unXH8zvN0a0SZVU=", "RequestId": "CF34CDE701525DCB" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_40.json ================================================ { "status_code": 200, "data": { "ETag": "\"ffe251ee24979b203f03ffbde9870812\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "/1x8BkaDAVO9kyQYF2csb5izdE8vZ4CYtjWUvhgorSXhYWup7wz6wLAnvt91SinG3mabyt//xd0=", "RequestId": "9A093022B713DCF4", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "/1x8BkaDAVO9kyQYF2csb5izdE8vZ4CYtjWUvhgorSXhYWup7wz6wLAnvt91SinG3mabyt//xd0=", "server": "AmazonS3", "x-amz-request-id": "9A093022B713DCF4", "etag": "\"ffe251ee24979b203f03ffbde9870812\"", "date": "Thu, 25 Aug 2016 03:29:08 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_41.json ================================================ { "status_code": 200, "data": { "ETag": "\"51646df403d058f25946f72d2b5ec2fc\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "S5zQSd3mBgjIPZ/N8g9DctwPBcvnmZwSM/dR5RQX4Fp+wPvcaiiDSXg2kf1UP7lNPTCOZlgDZqs=", "RequestId": "E09E422C330CF95B", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "S5zQSd3mBgjIPZ/N8g9DctwPBcvnmZwSM/dR5RQX4Fp+wPvcaiiDSXg2kf1UP7lNPTCOZlgDZqs=", "server": "AmazonS3", "x-amz-request-id": "E09E422C330CF95B", "etag": "\"51646df403d058f25946f72d2b5ec2fc\"", "date": "Thu, 25 Aug 2016 03:29:08 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_42.json ================================================ { "status_code": 200, "data": { "ETag": "\"196f426a3d95fb259671abb5b64cb821\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "8+9xyM/9b9Ftlpy1P0vGFWPB7qBrduUP9p1OK/g4/UWJJhy8DTg/2be1rln2QJet7kXh30fsAMk=", "RequestId": "4BFD6B36A802B621", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "8+9xyM/9b9Ftlpy1P0vGFWPB7qBrduUP9p1OK/g4/UWJJhy8DTg/2be1rln2QJet7kXh30fsAMk=", "server": "AmazonS3", "x-amz-request-id": "4BFD6B36A802B621", "etag": "\"196f426a3d95fb259671abb5b64cb821\"", "date": "Thu, 25 Aug 2016 03:29:08 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_43.json ================================================ { "status_code": 200, "data": { "ETag": "\"3b1e1b10238bee30f78f99e0f3500afa\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "mochGukzAh7oWfp6GeZyM44RCpwnwg/T4IFKhygtjg1bJu+hExf5OpgBzDupO7nk7gfLbgvTAhM=", "RequestId": "5804B5614A7F329F", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "mochGukzAh7oWfp6GeZyM44RCpwnwg/T4IFKhygtjg1bJu+hExf5OpgBzDupO7nk7gfLbgvTAhM=", "server": "AmazonS3", "x-amz-request-id": "5804B5614A7F329F", "etag": "\"3b1e1b10238bee30f78f99e0f3500afa\"", "date": "Thu, 25 Aug 2016 03:29:08 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_44.json ================================================ { "status_code": 200, "data": { "ETag": "\"431d4b26b394c1be968be51a1434bb3a\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "ss6Ao8qiMh1h32aJKQcTdgMEkTaZOhd26OU+0QiTsa63rqTRW/dXcduu+x0t4zYYNHL0c1nfVP4=", "RequestId": "303545496641952D", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "ss6Ao8qiMh1h32aJKQcTdgMEkTaZOhd26OU+0QiTsa63rqTRW/dXcduu+x0t4zYYNHL0c1nfVP4=", "server": "AmazonS3", "x-amz-request-id": "303545496641952D", "etag": "\"431d4b26b394c1be968be51a1434bb3a\"", "date": "Thu, 25 Aug 2016 03:30:45 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_45.json ================================================ { "status_code": 200, "data": { "ETag": "\"3fba89af0a653de117462fa256ebb7fb\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "+d02fd3+fBnCAPioAzVQuaKhZP6X3zFcTPKIBWq8m9dHuFBo4GzCqsUm3ARb/Wb6rvzJaIMPJ2I=", "RequestId": "7E801289795EE342", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "+d02fd3+fBnCAPioAzVQuaKhZP6X3zFcTPKIBWq8m9dHuFBo4GzCqsUm3ARb/Wb6rvzJaIMPJ2I=", "server": "AmazonS3", "x-amz-request-id": "7E801289795EE342", "etag": "\"3fba89af0a653de117462fa256ebb7fb\"", "date": "Thu, 25 Aug 2016 03:30:46 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_46.json ================================================ { "status_code": 200, "data": { "ETag": "\"196f426a3d95fb259671abb5b64cb821\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "ZVv/P4S1Dtl9W/KvfxXQ6l4QetzFCvUT2UQV8sFyqnu1/wvXelZ4NnCOK+uy8jYpNRkM22Pz2OM=", "RequestId": "798BFF2B7F0394B1", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "ZVv/P4S1Dtl9W/KvfxXQ6l4QetzFCvUT2UQV8sFyqnu1/wvXelZ4NnCOK+uy8jYpNRkM22Pz2OM=", "server": "AmazonS3", "x-amz-request-id": "798BFF2B7F0394B1", "etag": "\"196f426a3d95fb259671abb5b64cb821\"", "date": "Thu, 25 Aug 2016 03:30:46 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_47.json ================================================ { "status_code": 200, "data": { "ETag": "\"ffe251ee24979b203f03ffbde9870812\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "lKHv5xxVg0fJ58luBBEMcKoqfMBGtrzMIPaS1ckFGk8/BLtPs0LNnyN3ebicsoMAxK776Ik0N4w=", "RequestId": "CEE49B7A2E8F437A", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "lKHv5xxVg0fJ58luBBEMcKoqfMBGtrzMIPaS1ckFGk8/BLtPs0LNnyN3ebicsoMAxK776Ik0N4w=", "server": "AmazonS3", "x-amz-request-id": "CEE49B7A2E8F437A", "etag": "\"ffe251ee24979b203f03ffbde9870812\"", "date": "Thu, 25 Aug 2016 03:30:46 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_48.json ================================================ { "status_code": 200, "data": { "ETag": "\"79a5d6bfe5444b4c326fc27db439dfa0\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "WQs9g8sXtaq+b5cwdH/MB0tsCjlAMJHKZeY2YVrzO2xeDuS8tXLfUhthMw6cPR3M1euVi3+vwpE=", "RequestId": "446260E896C426FF", "HTTPHeaders": { "content-length": "0", "x-amz-id-2": "WQs9g8sXtaq+b5cwdH/MB0tsCjlAMJHKZeY2YVrzO2xeDuS8tXLfUhthMw6cPR3M1euVi3+vwpE=", "server": "AmazonS3", "x-amz-request-id": "446260E896C426FF", "etag": "\"79a5d6bfe5444b4c326fc27db439dfa0\"", "date": "Thu, 25 Aug 2016 03:30:46 GMT" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_5.json ================================================ { "status_code": 200, "data": { "ETag": "\"8f44b2aa328e1aa036579db62fa8c017\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "hUyiXTTy4WsLGE9FwDzgulbD3aj/6ivyeAgsfZ3KP0fyXEB+LkQs2UdH/iNa8OCtJ0xa5lrF+K4=", "RequestId": "DFBCC402A76C7432" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_6.json ================================================ { "status_code": 200, "data": { "ETag": "\"b880bbf96e4692c2a23439a232c59845\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "DJpqruCU71BRv23pamMDj0ZATaduJTa06XO9okFC9Tfw+nAOxvP+db935KVF6o+pXB1pBOP8dDg=", "RequestId": "C72D8E1E8C1DA9F5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_7.json ================================================ { "status_code": 200, "data": { "ETag": "\"d55e894bb0080fb49e888b420e1b0520\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "Uu/hrcOi1M4iwB2ZRv4vFCiuMmx+nMRSlrjkaeLSk4hKksrQt9DsjoelEBmXhWAaGg7wkLxEVGo=", "RequestId": "E0EA066ACCB1980A" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_8.json ================================================ { "status_code": 200, "data": { "ETag": "\"598bacfbf596e97804d9363cfd9bd581\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "jczWSmPzEY13vWHRxNXwfMNnDMRm5JFCgdkkk+DPmTzZRT53RjxqRdon1IYmdz1hSQtgyG/NmAU=", "RequestId": "F5EA56E331AAB17D" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/s3.UploadPart_9.json ================================================ { "status_code": 200, "data": { "ETag": "\"3d8594493e6e63cb3e4271a47db3ff04\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "MDJ856TXiVlteCjlVCJKf4tSlf6hrVy37qd5Hq2l1ECf5mtPXOFIV2aHMbBM4wsYBw/gFXYwEoI=", "RequestId": "ED811ABDFD6014EB" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "5a9c3f2b-b163-5a8c-b4b7-6f701e2ec4ee", "HTTPHeaders": { "x-amzn-requestid": "5a9c3f2b-b163-5a8c-b4b7-6f701e2ec4ee", "date": "Tue, 20 Sep 2016 21:41:32 GMT", "content-length": "319", "content-type": "text/xml" } }, "Subscriptions": [] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "c31b8bb1-05e2-52c5-8c71-dbeaaa6a1b4e", "HTTPHeaders": { "x-amzn-requestid": "c31b8bb1-05e2-52c5-8c71-dbeaaa6a1b4e", "date": "Tue, 20 Sep 2016 21:42:32 GMT", "content-length": "720", "content-type": "text/xml" } }, "Subscriptions": [ { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::1", "SubscriptionArn": "arn:aws:sns:::1" }, { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::with-filters", "SubscriptionArn": "arn:aws:sns:::with-filters:subscription1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "4b297fb0-32e1-5466-8b32-2feb82122ee6", "HTTPHeaders": { "x-amzn-requestid": "4b297fb0-32e1-5466-8b32-2feb82122ee6", "date": "Tue, 20 Sep 2016 21:48:34 GMT", "content-length": "720", "content-type": "text/xml" } }, "Subscriptions": [ { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::1", "SubscriptionArn": "arn:aws:sns:::1:1833de9b-d325-4610-bc69-139311499f5d" }, { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::with-filters", "SubscriptionArn": "arn:aws:sns:::with-filters:subscription1" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "d1ee6794-b714-55ec-8434-37cf06b42cdc", "HTTPHeaders": { "x-amzn-requestid": "d1ee6794-b714-55ec-8434-37cf06b42cdc", "date": "Tue, 20 Sep 2016 21:51:28 GMT", "content-length": "319", "content-type": "text/xml" } }, "Subscriptions": [] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "4d8b41db-39d2-57af-b9e9-1180883901a2", "HTTPHeaders": { "x-amzn-requestid": "4d8b41db-39d2-57af-b9e9-1180883901a2", "date": "Tue, 20 Sep 2016 21:52:42 GMT", "content-length": "720", "content-type": "text/xml" } }, "Subscriptions": [ { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::1", "SubscriptionArn": "arn:aws:sns:::1:57ae90d2-0fe8-4204-85a3-bcd4848545f6" }, { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::with-filters", "SubscriptionArn": "arn:aws:sns:::with-filters:subscription2" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_6.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "e51e3ca3-a2ca-5748-98dd-6cf813310bcc", "HTTPHeaders": { "x-amzn-requestid": "e51e3ca3-a2ca-5748-98dd-6cf813310bcc", "date": "Tue, 20 Sep 2016 21:52:58 GMT", "content-length": "720", "content-type": "text/xml" } }, "Subscriptions": [ { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::1", "SubscriptionArn": "arn:aws:sns:::1:8e52fdf5-49ec-4fab-93d8-29502b2899d4" }, { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::with-filters", "SubscriptionArn": "arn:aws:sns:::with-filters:subscription2" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_7.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "1d25a7ba-9a6b-53cb-b029-f7e12b951045", "HTTPHeaders": { "x-amzn-requestid": "1d25a7ba-9a6b-53cb-b029-f7e12b951045", "date": "Tue, 20 Sep 2016 21:53:01 GMT", "content-length": "720", "content-type": "text/xml" } }, "Subscriptions": [ { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::1", "SubscriptionArn": "arn:aws:sns:::1:e62db82e-757c-4356-ab9b-a2441b0662c8" }, { "Owner": "123456789123", "Endpoint": "arn:aws:lambda:us-east-1:724336686645:function:zappa-ttt888:1", "Protocol": "lambda", "TopicArn": "arn:aws:sns:::with-filters", "SubscriptionArn": "arn:aws:sns:::with-filters:subscription2" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.ListSubscriptionsByTopic_8.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "99b53069-3e2a-50ef-a5a0-60328c34a964", "HTTPHeaders": { "x-amzn-requestid": "99b53069-3e2a-50ef-a5a0-60328c34a964", "date": "Tue, 20 Sep 2016 21:53:34 GMT", "content-length": "319", "content-type": "text/xml" } }, "Subscriptions": [] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.SetSubscriptionAttributes_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "0fd08270-517b-5524-b434-d0bf5c813e24", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "0fd08270-517b-5524-b434-d0bf5c813e24", "content-type": "text/xml", "content-length": "229", "date": "Tue, 09 Jan 2018 18:36:42 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "ba6b9df2-b2c7-5c29-86c9-cda91d89fa8b", "HTTPHeaders": { "x-amzn-requestid": "ba6b9df2-b2c7-5c29-86c9-cda91d89fa8b", "date": "Tue, 20 Sep 2016 21:41:33 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::with-filters" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "5fc669e7-9952-5cd5-8a41-39bc36d8d93c", "HTTPHeaders": { "x-amzn-requestid": "5fc669e7-9952-5cd5-8a41-39bc36d8d93c", "date": "Tue, 20 Sep 2016 21:42:34 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::1:1833de9b-d325-4610-bc69-139311499f5d" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "a735afa5-04c9-5ddc-b6fa-fffeb43afd23", "HTTPHeaders": { "x-amzn-requestid": "a735afa5-04c9-5ddc-b6fa-fffeb43afd23", "date": "Tue, 20 Sep 2016 21:48:35 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::with-filters:221eb6cc-2fcb-496c-87c2-3af0f81cf34e" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "4f2c7f44-73ba-5f13-bd94-2f1fc21b4ca1", "HTTPHeaders": { "x-amzn-requestid": "4f2c7f44-73ba-5f13-bd94-2f1fc21b4ca1", "date": "Tue, 20 Sep 2016 21:51:29 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::1:57ae90d2-0fe8-4204-85a3-bcd4848545f6" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "e682d70b-5a4f-51e7-9791-8750eba3af24", "HTTPHeaders": { "x-amzn-requestid": "e682d70b-5a4f-51e7-9791-8750eba3af24", "date": "Tue, 20 Sep 2016 21:52:44 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::with-filters:8e52fdf5-49ec-4fab-93d8-29502b2899d4" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Subscribe_6.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "dccdb21f-87c2-5b69-8e47-e244363ec978", "HTTPHeaders": { "x-amzn-requestid": "dccdb21f-87c2-5b69-8e47-e244363ec978", "date": "Tue, 20 Sep 2016 21:53:00 GMT", "content-length": "354", "content-type": "text/xml" } }, "SubscriptionArn": "arn:aws:sns:::1:e62db82e-757c-4356-ab9b-a2441b0662c8" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "8679c068-9d47-5867-917a-903332cf01ec", "HTTPHeaders": { "x-amzn-requestid": "8679c068-9d47-5867-917a-903332cf01ec", "date": "Tue, 20 Sep 2016 21:42:33 GMT", "content-length": "201", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "0eade3ea-75e0-53c3-a2ca-b3b1c5133943", "HTTPHeaders": { "x-amzn-requestid": "0eade3ea-75e0-53c3-a2ca-b3b1c5133943", "date": "Tue, 20 Sep 2016 21:48:34 GMT", "content-length": "201", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_3.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "e76604b6-a417-50eb-ac0d-54ed15fc96e6", "HTTPHeaders": { "x-amzn-requestid": "e76604b6-a417-50eb-ac0d-54ed15fc96e6", "date": "Tue, 20 Sep 2016 21:52:43 GMT", "content-length": "201", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_4.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "598228fc-f2d6-55f0-ac86-78a7432df974", "HTTPHeaders": { "x-amzn-requestid": "598228fc-f2d6-55f0-ac86-78a7432df974", "date": "Tue, 20 Sep 2016 21:52:58 GMT", "content-length": "201", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sns.Unsubscribe_5.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "4e12e243-7bb1-5689-8a5a-b218ca4fb507", "HTTPHeaders": { "x-amzn-requestid": "4e12e243-7bb1-5689-8a5a-b218ca4fb507", "date": "Tue, 20 Sep 2016 21:53:01 GMT", "content-length": "201", "content-type": "text/xml" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws/sts.GetCallerIdentity_1.json ================================================ { "status_code": 200, "data": { "UserId": "RANDOMSTRING12314", "Account": "12345", "Arn": "arn:aws:iam::12345:user/test", "ResponseMetadata": { "RequestId": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "content-type": "text/xml", "content-length": "401", "date": "Mon, 27 Nov 2017 11:25:32 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/apigateway.GetApiKeys_1.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "Api Key for rdrde6pecd", "enabled": true, "stageKeys": [ "rdrde6pecd/devor" ], "lastUpdatedDate": 1470384739, "createdDate": 1470384739, "id": "W9QTptojpE3bsg816Rrjh4was83amtaAx5s6NXaAl", "name": "devor_rdrde6pecd" }, { "description": "test", "enabled": true, "stageKeys": [], "lastUpdatedDate": 1472205619, "createdDate": 1472126924, "id": "BbMa34BFOj6fKevBXPhUc61L3R2eh4sz7QzC6NWK", "name": "test" }, { "description": "test2", "enabled": true, "stageKeys": [ "eoeoeo/test" ], "lastUpdatedDate": 1472205619, "createdDate": 1472126924, "id": "CbMa34BFOj6fKevBXPhUc61L3R2eh4sz7QzC6NWK", "name": "test2" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/apigateway.GetRestApis_1.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "hackathon-starter-devo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 7, "second": 42, "microsecond": 0, "year": 2016, "day": 25, "minute": 51 }, "id": "11j2q35yf8", "name": "hackathon-starter-devo" }, { "description": "poops2js-dev Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 8, "second": 32, "microsecond": 0, "year": 2016, "day": 6, "minute": 8 }, "id": "1yae9gfwab", "name": "poops2js-dev" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 1, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "hackathon-starter-dev Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 7, "second": 21, "microsecond": 0, "year": 2016, "day": 26, "minute": 46 }, "id": "7s8qhskdc2", "name": "hackathon-starter-dev" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "issue110-dev Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 2, "microsecond": 0, "year": 2016, "day": 24, "minute": 29 }, "id": "bo02obhd7c", "name": "issue110-dev" }, { "description": "serverless-imagehost-nob Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 5, "second": 25, "microsecond": 0, "year": 2016, "day": 11, "minute": 14 }, "id": "cc1o38ldtb", "name": "serverless-imagehost-nob" }, { "description": "oort-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 5, "second": 18, "microsecond": 0, "year": 2016, "day": 20, "minute": 28 }, "id": "cdvt3njuhk", "name": "oort-dev" }, { "description": "serverless-imagehost-devuh Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 3, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "ezjhledye7", "name": "serverless-imagehost-devuh" }, { "description": "website-production Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 5, "minute": 7 }, "id": "fhbea4d5o6", "name": "website-production" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "website-derp Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 4, "second": 40, "microsecond": 0, "year": 2016, "day": 7, "minute": 45 }, "id": "i75y1kwi47", "name": "website-derp" }, { "description": "zappa-testerinooo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 10, "microsecond": 0, "year": 2016, "day": 25, "minute": 11 }, "id": "ijs8po6ul8", "name": "zappa-testerinooo" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "serverless-imagehost-dever Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 55, "microsecond": 0, "year": 2016, "day": 24, "minute": 6 }, "id": "jr75b74ip8", "name": "serverless-imagehost-dever" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "flask-test-eventer Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 5, "second": 26, "microsecond": 0, "year": 2016, "day": 10, "minute": 0 }, "id": "lsw93ibofa", "name": "flask-test-eventer" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "demo-dev Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 3, "second": 8, "microsecond": 0, "year": 2016, "day": 26, "minute": 17 }, "id": "m8atxlc1j9", "name": "demo-dev" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "zappa-ttt666 Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 6, "second": 53, "microsecond": 0, "year": 2016, "day": 2, "minute": 0 }, "id": "mj9gnteqc9", "name": "zappa-ttt666" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "restful-demo-dev4 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 4, "second": 3, "microsecond": 0, "year": 2016, "day": 4, "minute": 19 }, "id": "oo8j6uj6i1", "name": "restful-demo-dev4" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 4, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "baby-flask-devor Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 8, "second": 55, "microsecond": 0, "year": 2016, "day": 10, "minute": 17 }, "id": "rdrde6pecd", "name": "baby-flask-devor" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 9, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "serverless-imagehost-nob2 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 5, "second": 53, "microsecond": 0, "year": 2016, "day": 11, "minute": 54 }, "id": "s6svfqprs6", "name": "serverless-imagehost-nob2" }, { "description": "zappa-tester Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 59, "microsecond": 0, "year": 2016, "day": 25, "minute": 31 }, "id": "sibzbaomqb", "name": "zappa-tester" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 5, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "django-helloworld-prodope Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 4, "second": 43, "microsecond": 0, "year": 2016, "day": 9, "minute": 46 }, "id": "sx5ifzldel", "name": "django-helloworld-prodope" }, { "description": "zappa-testerinoo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 28, "microsecond": 0, "year": 2016, "day": 25, "minute": 0 }, "id": "tkfhn7uh1j", "name": "zappa-testerinoo" }, { "description": "1453992953 Zappa", "createdDate": { "hour": 6, "__class__": "datetime", "month": 1, "second": 56, "microsecond": 0, "year": 2016, "day": 28, "minute": 55 }, "id": "tpwx2chyc9", "name": "1453992953" }, { "description": "flask-blog-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 20, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "u5k6g8qxu4", "name": "flask-blog-dev" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "flask-test-test Zappa", "createdDate": { "hour": 10, "__class__": "datetime", "month": 3, "second": 35, "microsecond": 0, "year": 2016, "day": 31, "minute": 46 }, "id": "vna1tr18s7", "name": "flask-test-test" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 3, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "zappa-ttt222 Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 3, "second": 13, "microsecond": 0, "year": 2016, "day": 25, "minute": 45 }, "id": "vzxj8vvejc", "name": "zappa-ttt222" }, { "description": "django-helloworld-prodo Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 4, "second": 18, "microsecond": 0, "year": 2016, "day": 8, "minute": 48 }, "id": "wx029jbtva", "name": "django-helloworld-prodo" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 55, "microsecond": 0, "year": 2016, "day": 31, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "zappa-testerino Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 3, "second": 12, "microsecond": 0, "year": 2016, "day": 25, "minute": 44 }, "id": "yxm125wqua", "name": "zappa-testerino" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 8, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" }, { "description": "serverless-imagehost-demodemo Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 3, "second": 7, "microsecond": 0, "year": 2016, "day": 28, "minute": 10 }, "id": "zhrsy6zhl7", "name": "serverless-imagehost-demodemo" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "91c49bff-5ffb-11e6-afc2-854f31b98fbf", "HTTPHeaders": { "x-amzn-requestid": "91c49bff-5ffb-11e6-afc2-854f31b98fbf", "date": "Thu, 11 Aug 2016 19:41:16 GMT", "content-length": "6585", "content-type": "application/json" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/events.DescribeRule_1.json ================================================ { "status_code": 200, "data": { "ScheduleExpression": "rate(1 minute)", "Name": "app.event_me", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "926cea0c-5ffb-11e6-9780-4b9d2dcb5a98", "HTTPHeaders": { "x-amzn-requestid": "926cea0c-5ffb-11e6-9780-4b9d2dcb5a98", "date": "Thu, 11 Aug 2016 19:41:17 GMT", "content-length": "236", "content-type": "application/x-amz-json-1.1" } }, "RoleArn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "State": "ENABLED", "Arn": "arn:aws:events:us-east-1:724336686645:rule/app.event_me", "Description": "app.event_me" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/events.ListRuleNamesByTarget_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "925b84b7-5ffb-11e6-9780-4b9d2dcb5a98", "HTTPHeaders": { "x-amzn-requestid": "925b84b7-5ffb-11e6-9780-4b9d2dcb5a98", "date": "Thu, 11 Aug 2016 19:41:17 GMT", "content-length": "30", "content-type": "application/x-amz-json-1.1" } }, "RuleNames": [ "app.event_me" ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/events.ListRules_1.json ================================================ { "status_code": 200, "data": { "Rules": [ { "ScheduleExpression": "rate(5 minutes)", "Name": "zappa-keep-warm-zappa-ttt666", "RoleArn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "State": "ENABLED", "Arn": "arn:aws:events:us-east-1:724336686645:rule/zappa-keep-warm-zappa-ttt666", "Description": "Zappa Keep Warm - zappa-ttt666" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "afe859ba-28f4-11e6-aa28-4d9f2eb25de5" } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/lambda.GetFunction_1.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "$LATEST", "CodeSha256": "U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=", "FunctionName": "baby-flask-devor", "MemorySize": 512, "CodeSize": 2882611, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-11T19:05:11.100+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "909b374b-5ffb-11e6-a630-0daa311dcaa5", "HTTPHeaders": { "date": "Thu, 11 Aug 2016 19:41:14 GMT", "x-amzn-requestid": "909b374b-5ffb-11e6-a630-0daa311dcaa5", "content-length": "1472", "content-type": "application/json", "connection": "keep-alive" } } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/lambda.ListVersionsByFunction_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9089f947-5ffb-11e6-8e26-cfa6e63f64ef", "HTTPHeaders": { "date": "Thu, 11 Aug 2016 19:41:13 GMT", "x-amzn-requestid": "9089f947-5ffb-11e6-8e26-cfa6e63f64ef", "content-length": "1582", "content-type": "application/json", "connection": "keep-alive" } }, "Versions": [ { "Version": "$LATEST", "CodeSha256": "U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=", "FunctionName": "baby-flask-devor", "MemorySize": 512, "CodeSize": 2882611, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:$LATEST", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-11T19:05:11.100+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "9", "CodeSha256": "co4evUvVhHBjrUhoV6ZiDI5L20TDGStV1FUZrr7CK6M=", "FunctionName": "baby-flask-devor", "MemorySize": 512, "CodeSize": 2881914, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:9", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-11T01:17:51.058+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "10", "CodeSha256": "U8ckfxet4WSu22aYpYd2GrVG2E3HX4ifSoWCe8nr4ig=", "FunctionName": "baby-flask-devor", "MemorySize": 512, "CodeSize": 2882611, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:baby-flask-devor:10", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-08-11T19:05:12.968+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/monitoring.GetMetricStatistics_1.json ================================================ { "status_code": 200, "data": { "Datapoints": [ { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 7, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 29 }, "Sum": 14.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 17, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 24.0, "Unit": "Count" }, { "Timestamp": { "hour": 5, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 11, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 19, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 1, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 24.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 11, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 23, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 13, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 7, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 23, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 41 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 9, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 44.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 15, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 25.0, "Unit": "Count" }, { "Timestamp": { "hour": 1, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 24.0, "Unit": "Count" }, { "Timestamp": { "hour": 3, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 3, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 47.0, "Unit": "Count" }, { "Timestamp": { "hour": 17, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 9, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 5 }, "Sum": 6.0, "Unit": "Count" }, { "Timestamp": { "hour": 15, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 48.0, "Unit": "Count" }, { "Timestamp": { "hour": 13, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 49.0, "Unit": "Count" }, { "Timestamp": { "hour": 5, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 49.0, "Unit": "Count" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9113e934-5ffb-11e6-ac84-f3a13624f777", "HTTPHeaders": { "x-amzn-requestid": "9113e934-5ffb-11e6-ac84-f3a13624f777", "date": "Thu, 11 Aug 2016 19:41:15 GMT", "content-length": "7586", "content-type": "text/xml" } }, "Label": "Invocations" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_aws_status/monitoring.GetMetricStatistics_2.json ================================================ { "status_code": 200, "data": { "Datapoints": [ { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 7, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 17, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 5, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 11, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 19, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 1, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 10, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 14, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 11, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 23, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 16, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 8, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 13, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 7, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 23, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 4, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 9, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 12, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 53 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 15, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 2, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 1, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 3, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 6, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 3, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 17, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 9, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 18, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 0, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 29 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 22, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 10, "minute": 5 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 15, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 17 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 13, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" }, { "Timestamp": { "hour": 5, "__class__": "datetime", "month": 8, "second": 0, "microsecond": 0, "year": 2016, "day": 11, "minute": 41 }, "Sum": 0.0, "Unit": "Count" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9129e2da-5ffb-11e6-81a6-1b774a17dc99", "HTTPHeaders": { "x-amzn-requestid": "9129e2da-5ffb-11e6-81a6-1b774a17dc99", "date": "Thu, 11 Aug 2016 19:41:15 GMT", "content-length": "7528", "content-type": "text/xml" } }, "Label": "Errors" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_cognito_triggers/cognito-idp.DescribeUserPool_1.json ================================================ { "status_code": 200, "data": { "UserPool": { "Id": "us-east-1_9jUv74DH8", "Name": "Zappa-Test", "Policies": { "PasswordPolicy": { "MinimumLength": 8, "RequireUppercase": true, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true } }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" }, "LastModifiedDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 23, "second": 34, "microsecond": 969000 }, "CreationDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 15, "second": 36, "microsecond": 195000 }, "SchemaAttributes": [ { "Name": "sub", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": false, "Required": true, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" } }, { "Name": "name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "given_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "family_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "middle_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "nickname", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "preferred_username", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "profile", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "picture", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "website", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "gender", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "birthdate", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" } }, { "Name": "zoneinfo", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "locale", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "address", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "updated_at", "AttributeDataType": "Number", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "NumberAttributeConstraints": { "MinValue": "0" } } ], "AutoVerifiedAttributes": [ "email" ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE" }, "MfaConfiguration": "OFF", "EstimatedNumberOfUsers": 0, "EmailConfiguration": {}, "UserPoolTags": {}, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false, "UnusedAccountValidityDays": 7 } }, "ResponseMetadata": { "RequestId": "ada5049e-d365-11e7-9a5a-2b0966933efa", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:31 GMT", "x-amzn-requestid": "ada5049e-d365-11e7-9a5a-2b0966933efa", "content-length": "4132", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_cognito_triggers/cognito-idp.UpdateUserPool_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:32 GMT", "x-amzn-requestid": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "content-length": "2", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cli_cognito_triggers/lambda.AddPermission_1.json ================================================ { "status_code": 201, "data": { "ResponseMetadata": { "RequestId": "ae983eab-d365-11e7-ba13-8135763ed363", "HTTPStatusCode": 201, "HTTPHeaders": { "date": "Mon, 27 Nov 2017 11:25:33 GMT", "content-type": "application/json", "content-length": "361", "connection": "keep-alive", "x-amzn-requestid": "ae983eab-d365-11e7-ba13-8135763ed363" }, "RetryAttempts": 0 }, "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\"}}}" } } ================================================ FILE: tests/placebo/TestZappa.test_cli_cognito_triggers/sts.GetCallerIdentity_1.json ================================================ { "status_code": 200, "data": { "UserId": "RANDOMSTRING12314", "Account": "12345", "Arn": "arn:aws:iam::12345:user/test", "ResponseMetadata": { "RequestId": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "content-type": "text/xml", "content-length": "401", "date": "Mon, 27 Nov 2017 11:25:32 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger/cognito-idp.DescribeUserPool_1.json ================================================ { "status_code": 200, "data": { "UserPool": { "Id": "us-east-1_9jUv74DH8", "Name": "Zappa-Test", "Policies": { "PasswordPolicy": { "MinimumLength": 8, "RequireUppercase": true, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true } }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" }, "LastModifiedDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 23, "second": 34, "microsecond": 969000 }, "CreationDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 15, "second": 36, "microsecond": 195000 }, "SchemaAttributes": [ { "Name": "sub", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": false, "Required": true, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" } }, { "Name": "name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "given_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "family_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "middle_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "nickname", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "preferred_username", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "profile", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "picture", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "website", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "gender", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "birthdate", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" } }, { "Name": "zoneinfo", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "locale", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "address", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "updated_at", "AttributeDataType": "Number", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "NumberAttributeConstraints": { "MinValue": "0" } } ], "AutoVerifiedAttributes": [ "email" ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE" }, "MfaConfiguration": "OFF", "EstimatedNumberOfUsers": 0, "EmailConfiguration": {}, "UserPoolTags": {}, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false, "UnusedAccountValidityDays": 7 } }, "ResponseMetadata": { "RequestId": "ada5049e-d365-11e7-9a5a-2b0966933efa", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:31 GMT", "x-amzn-requestid": "ada5049e-d365-11e7-9a5a-2b0966933efa", "content-length": "4132", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger/cognito-idp.UpdateUserPool_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:32 GMT", "x-amzn-requestid": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "content-length": "2", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger/lambda.AddPermission_1.json ================================================ { "status_code": 201, "data": { "ResponseMetadata": { "RequestId": "ae983eab-d365-11e7-ba13-8135763ed363", "HTTPStatusCode": 201, "HTTPHeaders": { "date": "Mon, 27 Nov 2017 11:25:33 GMT", "content-type": "application/json", "content-length": "361", "connection": "keep-alive", "x-amzn-requestid": "ae983eab-d365-11e7-ba13-8135763ed363" }, "RetryAttempts": 0 }, "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\"}}}" } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger/sts.GetCallerIdentity_1.json ================================================ { "status_code": 200, "data": { "UserId": "RANDOMSTRING12314", "Account": "12345", "Arn": "arn:aws:iam::12345:user/test", "ResponseMetadata": { "RequestId": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "content-type": "text/xml", "content-length": "401", "date": "Mon, 27 Nov 2017 11:25:32 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing/cognito-idp.DescribeUserPool_1.json ================================================ { "status_code": 200, "data": { "UserPool": { "Id": "us-east-1_9jUv74DH8", "Name": "Zappa-Test", "Policies": { "PasswordPolicy": { "MinimumLength": 8, "RequireUppercase": true, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true } }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" }, "LastModifiedDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 23, "second": 34, "microsecond": 969000 }, "CreationDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 15, "second": 36, "microsecond": 195000 }, "SchemaAttributes": [ { "Name": "sub", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": false, "Required": true, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" } }, { "Name": "name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "given_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "family_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "middle_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "nickname", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "preferred_username", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "profile", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "picture", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "website", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "gender", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "birthdate", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" } }, { "Name": "zoneinfo", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "locale", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "address", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "updated_at", "AttributeDataType": "Number", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "NumberAttributeConstraints": { "MinValue": "0" } } ], "AutoVerifiedAttributes": [ "email" ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE" }, "MfaConfiguration": "OFF", "EstimatedNumberOfUsers": 0, "EmailConfiguration": {}, "UserPoolTags": {}, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false, "UnusedAccountValidityDays": 7 }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" } }, "ResponseMetadata": { "RequestId": "ada5049e-d365-11e7-9a5a-2b0966933efa", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:31 GMT", "x-amzn-requestid": "ada5049e-d365-11e7-9a5a-2b0966933efa", "content-length": "4132", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing/cognito-idp.UpdateUserPool_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:32 GMT", "x-amzn-requestid": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "content-length": "2", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing/lambda.AddPermission_1.json ================================================ { "status_code": 201, "data": { "ResponseMetadata": { "RequestId": "ae983eab-d365-11e7-ba13-8135763ed363", "HTTPStatusCode": 201, "HTTPHeaders": { "date": "Mon, 27 Nov 2017 11:25:33 GMT", "content-type": "application/json", "content-length": "361", "connection": "keep-alive", "x-amzn-requestid": "ae983eab-d365-11e7-ba13-8135763ed363" }, "RetryAttempts": 0 }, "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\"}}}" } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing/sts.GetCallerIdentity_1.json ================================================ { "status_code": 200, "data": { "UserId": "RANDOMSTRING12314", "Account": "12345", "Arn": "arn:aws:iam::12345:user/test", "ResponseMetadata": { "RequestId": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "content-type": "text/xml", "content-length": "401", "date": "Mon, 27 Nov 2017 11:25:32 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/cognito-idp.DescribeUserPool_1.json ================================================ { "status_code": 200, "data": { "UserPool": { "Id": "us-east-1_9jUv74DH8", "Name": "Zappa-Test", "Policies": { "PasswordPolicy": { "MinimumLength": 8, "RequireUppercase": true, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true, "TemporaryPasswordValidityDays": 7 } }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" }, "LastModifiedDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 23, "second": 34, "microsecond": 969000 }, "CreationDate": { "__class__": "datetime", "year": 2017, "month": 11, "day": 27, "hour": 11, "minute": 15, "second": 36, "microsecond": 195000 }, "SchemaAttributes": [ { "Name": "sub", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": false, "Required": true, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" } }, { "Name": "name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "given_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "family_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "middle_name", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "nickname", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "preferred_username", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "profile", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "picture", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "website", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "email_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "gender", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "birthdate", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" } }, { "Name": "zoneinfo", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "locale", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "phone_number_verified", "AttributeDataType": "Boolean", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false }, { "Name": "address", "AttributeDataType": "String", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" } }, { "Name": "updated_at", "AttributeDataType": "Number", "DeveloperOnlyAttribute": false, "Mutable": true, "Required": false, "NumberAttributeConstraints": { "MinValue": "0" } } ], "AutoVerifiedAttributes": [ "email" ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE" }, "MfaConfiguration": "OFF", "EstimatedNumberOfUsers": 0, "EmailConfiguration": {}, "UserPoolTags": {}, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false }, "LambdaConfig": { "PreSignUp": "arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test" } }, "ResponseMetadata": { "RequestId": "ada5049e-d365-11e7-9a5a-2b0966933efa", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:31 GMT", "x-amzn-requestid": "ada5049e-d365-11e7-9a5a-2b0966933efa", "content-length": "4132", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/cognito-idp.UpdateUserPool_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "RequestId": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "HTTPStatusCode": 200, "HTTPHeaders": { "content-type": "application/x-amz-json-1.1", "date": "Mon, 27 Nov 2017 11:25:32 GMT", "x-amzn-requestid": "adc3afdf-d365-11e7-b51f-abb88dfb5619", "content-length": "2", "connection": "keep-alive" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/lambda.AddPermission_1.json ================================================ { "status_code": 201, "data": { "ResponseMetadata": { "RequestId": "ae983eab-d365-11e7-ba13-8135763ed363", "HTTPStatusCode": 201, "HTTPHeaders": { "date": "Mon, 27 Nov 2017 11:25:33 GMT", "content-type": "application/json", "content-length": "361", "connection": "keep-alive", "x-amzn-requestid": "ae983eab-d365-11e7-ba13-8135763ed363" }, "RetryAttempts": 0 }, "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\"}}}" } } ================================================ FILE: tests/placebo/TestZappa.test_cognito_trigger_existing_UnusedAccountValidityDays/sts.GetCallerIdentity_1.json ================================================ { "status_code": 200, "data": { "UserId": "RANDOMSTRING12314", "Account": "12345", "Arn": "arn:aws:iam::12345:user/test", "ResponseMetadata": { "RequestId": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "HTTPStatusCode": 200, "HTTPHeaders": { "x-amzn-requestid": "ae5ff039-d365-11e7-ba9b-9d9eb3cc14f8", "content-type": "text/xml", "content-length": "401", "date": "Mon, 27 Nov 2017 11:25:32 GMT" }, "RetryAttempts": 0 } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.AbortMultipartUpload_1.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "RetryAttempts": 0, "HostId": "J61KH771JIvmpimO/UbQq7mpaBTi8isqV6ZB09PZT/acUplPw86JfzN2d3ajuAAqxL1pDq8X41U=", "RequestId": "1D3CFD82C46C3516", "HTTPHeaders": { "x-amz-id-2": "J61KH771JIvmpimO/UbQq7mpaBTi8isqV6ZB09PZT/acUplPw86JfzN2d3ajuAAqxL1pDq8X41U=", "date": "Tue, 08 Nov 2016 23:19:25 GMT", "x-amz-request-id": "1D3CFD82C46C3516", "server": "AmazonS3" } } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.CompleteMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"86865b71093464f5a301e1027439491b-1\"", "Bucket": "test_zappa_upload_s3", "Location": "https://test_zappa_upload_s3.s3.amazonaws.com/lambda_package-1456273359.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "MRuE82ncxtI6IA04QwvcPHGZX/81kUhSZ+LwV7jAGsv674NknH9btnGPsUuLXBspNuqGtFbdWKY=", "RequestId": "4BD122934F722C61" }, "Key": "lambda_package-1456273359.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.CopyObject_1.json ================================================ { "status_code": 200, "data": { "CopyObjectResult": { "LastModified": { "hour": 23, "__class__": "datetime", "month": 12, "second": 29, "microsecond": 0, "year": 2016, "day": 20, "minute": 43 }, "ETag": "\"b2e189abf85e809a51522cdb0e53083a\"" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RetryAttempts": 0, "HostId": "xDC1DVrFVSxJNrdVsZrQ38WucHFdgeJiY2+W7kUZtORrfYb2RRA4aqWOQD5j2No4NOoXN9u8vxk=", "RequestId": "9622D9960549D775", "HTTPHeaders": { "content-length": "234", "x-amz-id-2": "xDC1DVrFVSxJNrdVsZrQ38WucHFdgeJiY2+W7kUZtORrfYb2RRA4aqWOQD5j2No4NOoXN9u8vxk=", "server": "AmazonS3", "x-amz-request-id": "9622D9960549D775", "date": "Tue, 20 Dec 2016 23:43:29 GMT", "x-amz-server-side-encryption": "AES256", "content-type": "application/xml" } }, "ServerSideEncryption": "AES256" } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.CreateBucket_1.json ================================================ { "status_code": 200, "data": { "Location": "/test_zappa_upload_s3", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "8sXq+Uc6Ao7tM6js+GCOK99fJGbL2cNEZsug+9karxoklp9ml5MxqSJiTOw6yHlCWEGDGv7BZFw=", "RequestId": "B99377D822A42891" } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.CreateMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "Bucket": "test_zappa_upload_s3", "UploadId": "qPM3MaoOZRezVJwiULIVGtsj0K99hO9YbuPdzMJQVUzZ.XX3YdscjOUnnzBHbFi2XGBgZjeOBb2NryiJzKxlHRiVKyYVezXsc_o9PCRar.icz3ks66jij8A0tkuwp1o0", "Key": "lambda_package-1456272533.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1awKoHujZxpAAG1hGnOKHetwi4vY1Dszt4QvFiAcUMkENvnGHt7yDuJ4n6eR5sRK", "RequestId": "7CE018CCC678149E" } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.HeadBucket_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "bIWJow7rK8U4lxn9VTIz3/lH+agH9OA8BGD80vbICTWwHNqfEdGt4D3s2EmVWm/U01XtUZdq5OY=", "RequestId": "501E18A0BFB1B76C" } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.HeadObject_1.json ================================================ { "status_code": 200, "data": { "AcceptRanges": "bytes", "ContentType": "binary/octet-stream", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "PnlRCp+1zp2qblsjbRFvph/eBOb8dN/k9fTPmW45pfDP/6GoUs/Z7hfZIpFo5CjVgLtsuZk/IYw=", "RequestId": "AD1ABEA37433B785" }, "LastModified": { "hour": 23, "__class__": "datetime", "month": 2, "second": 10, "microsecond": 0, "year": 2016, "day": 23, "minute": 32 }, "ContentLength": 4507898, "ETag": "\"58098b238b9a6ed2b3a954601e9b8e5f\"", "Metadata": {} } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.PutObject_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"58098b238b9a6ed2b3a954601e9b8e5f\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "tedGhtpKSnTti2bVK33LeOe6Iy0D4uLMfZt8TqJJWFRK3XI35EahQd2F+ShUX9l6O0vw7yyEmMA=", "RequestId": "D90365BC22767711" } } } ================================================ FILE: tests/placebo/TestZappa.test_copy_on_s3/s3.UploadPart_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"781936e8a21849d38e955224ef70d71e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "/Dt2sy50X8WRf6CeE4OhoXMQftr4n5PUtT22ZblpVdfLkqo8pv7oeq6XaEoNCdjiPmN9+AtaXy0=", "RequestId": "C3816300C7FA5E5F" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.CreateRole_1.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAIJTKAN7OBBD7BF25O", "CreateDate": { "hour": 1, "__class__": "datetime", "month": 2, "second": 20, "microsecond": 221000, "year": 2016, "day": 25, "minute": 28 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::123:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "0da2623f-db5f-11e5-9d89-67e11bce6785" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.GetRolePolicy_1.json ================================================ { "status_code": 404, "data": { "ResponseMetadata": { "HTTPStatusCode": 404, "RequestId": "0e11c69f-db5f-11e5-aa20-65c7ceb91dfa" }, "Error": { "Message": "The role policy with name zappa-permissions cannot be found.", "Code": "NoSuchEntity", "Type": "Sender" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.GetRolePolicy_2.json ================================================ { "status_code": 200, "data": { "RoleName": "ZappaLambdaExecution", "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", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "75ea0f95-123c-11e6-a7da-b932a8a18034" }, "PolicyName": "zappa-permissions" } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.GetRole_1.json ================================================ { "status_code": 404, "data": { "ResponseMetadata": { "HTTPStatusCode": 404, "RequestId": "0d24322f-db5f-11e5-9d89-67e11bce6785" }, "Error": { "Message": "The role with name ZappaLambdaExecution cannot be found.", "Code": "NoSuchEntity", "Type": "Sender" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.GetRole_2.json ================================================ { "status_code": 200, "data": { "Role": { "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", "RoleId": "AROAJP6JO7RI37FHZGQ6A", "CreateDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 29, "microsecond": 0, "year": 2016, "day": 25, "minute": 33 }, "RoleName": "ZappaLambdaExecution", "Path": "/", "Arn": "arn:aws:iam::724336686645:role/ZappaLambdaExecution" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "75e22050-123c-11e6-a7da-b932a8a18034" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_iam_roles/iam.PutRolePolicy_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "0e619422-db5f-11e5-9d89-67e11bce6785" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.CreateAlias_1.json ================================================ { "status_code": 201, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.CreateFunction_1.json ================================================ { "status_code": 201, "data": { "CodeSha256": "q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=", "FunctionName": "test_lmbda_function55", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "12b75ef1-e226-11e5-84a2-ad7ddc64ad40" }, "CodeSize": 26585626, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55", "Version": "1", "Role": "arn:aws:iam::12345:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-04T16:28:06.633+0000", "Handler": "runme.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.DeleteFunctionConcurrency_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.GetAlias_1.json ================================================ { "status_code": 200, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.UpdateAlias_1.json ================================================ { "status_code": 201, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_local/lambda.UpdateFunctionCode_1.json ================================================ { "status_code": 200, "data": { "CodeSha256": "q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=", "FunctionName": "test_lmbda_function55", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "153e09be-e226-11e5-a3b8-7b263f053e5a" }, "CodeSize": 26585626, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:1", "Version": "1", "Role": "arn:aws:iam::12345:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-04T16:28:06.633+0000", "Handler": "runme.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.CreateAlias_1.json ================================================ { "status_code": 201, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.CreateFunction_1.json ================================================ { "status_code": 201, "data": { "CodeSha256": "q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=", "FunctionName": "test_lmbda_function55", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "12b75ef1-e226-11e5-84a2-ad7ddc64ad40" }, "CodeSize": 26585626, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55", "Version": "1", "Role": "arn:aws:iam::12345:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-04T16:28:06.633+0000", "Handler": "runme.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.DeleteFunctionConcurrency_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "aff3a3f9-28f4-11e6-9dbb-5dd116b9ddf1" } } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.GetAlias_1.json ================================================ { "status_code": 200, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.UpdateAlias_1.json ================================================ { "status_code": 201, "data": { "AliasArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:current-alb-version", "Description": "Zappa Deployment", "FunctionVersion": "1", "Name": "current-alb-version" } } ================================================ FILE: tests/placebo/TestZappa.test_create_lambda_function_s3/lambda.UpdateFunctionCode_1.json ================================================ { "status_code": 200, "data": { "CodeSha256": "q4duEOI611sqtkU+YbdNkjH5qGRlgmvc9+FhpdykYuk=", "FunctionName": "test_lmbda_function55", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "153e09be-e226-11e5-a3b8-7b263f053e5a" }, "CodeSize": 26585626, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:12345:function:test_lmbda_function55:1", "Version": "1", "Role": "arn:aws:iam::12345:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-04T16:28:06.633+0000", "Handler": "runme.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.CreateDeployment_1.json ================================================ { "status_code": 201, "data": { "id": "cxn7hw", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "30cb0d0e-e22c-11e5-a1ee-672085005625" }, "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 53, "microsecond": 0, "year": 2016, "day": 4, "minute": 11 } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.CreateRestApi_1.json ================================================ { "status_code": 201, "data": { "id": "lavad5es4e", "name": "1457111505", "description": "1457111505 Zappa", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "2fabbac6-e22c-11e5-ba0a-f9eb2a31cd5c" }, "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 51, "microsecond": 0, "year": 2016, "day": 4, "minute": 11 } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetResources_1.json ================================================ { "status_code": 200, "data": { "items": [ { "path": "/", "id": "zfvs53c2pl" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "2fd191fa-e22c-11e5-9e01-73fb17f4973b" } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetRestApi_1.json ================================================ { "status_code": 404, "data": { "ResponseMetadata": { "HTTPStatusCode": 404, "RequestId": "2f960f7a-e22c-11e5-a1ee-672085005625" }, "Error": { "Message": "Invalid REST API identifier specified", "Code": "NotFoundException" } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.GetRestApis_1.json ================================================ { "status_code": 200, "data": { "items": [ ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9ac03233-e231-11e5-8630-d13cf2bbed5d" } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutIntegrationResponse_1.json ================================================ { "status_code": 201, "data": { "statusCode": "200", "responseTemplates": { "text/html": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content" }, "selectionPattern": "", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "307d625c-e22c-11e5-9e01-73fb17f4973b" }, "responseParameters": { "method.response.header.Content-Type": "integration.response.body.Content-Type", "method.response.header.Location": "integration.response.body.Location", "method.response.header.X-Frame-Options": "integration.response.body.X-Frame-Options", "method.response.header.Status": "integration.response.body.Status", "method.response.header.Set-Cookie": "integration.response.body.Set-Cookie" } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutIntegration_1.json ================================================ { "status_code": 201, "data": { "cacheKeyParameters": [], "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "304ae08c-e22c-11e5-a1ee-672085005625" }, "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", "httpMethod": "POST", "requestTemplates": { "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}", "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}" }, "cacheNamespace": "none", "credentials": "arn:aws:iam::12345:role/ZappaLambdaExecution", "type": "AWS", "requestParameters": {} } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutMethodResponse_1.json ================================================ { "status_code": 201, "data": { "responseModels": { "text/html": "Empty" }, "statusCode": "200", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "306287a9-e22c-11e5-ba0a-f9eb2a31cd5c" }, "responseParameters": { "method.response.header.Content-Type": false, "method.response.header.Location": false, "method.response.header.X-Frame-Options": false, "method.response.header.Status": false, "method.response.header.Set-Cookie": false } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.PutMethod_1.json ================================================ { "status_code": 201, "data": { "apiKeyRequired": false, "httpMethod": "GET", "authorizationType": "NONE", "ResponseMetadata": { "HTTPStatusCode": 201, "RequestId": "303053cb-e22c-11e5-9e01-73fb17f4973b" } } } ================================================ FILE: tests/placebo/TestZappa.test_deploy_api_gateway/apigateway.UpdateStage_1.json ================================================ { "status_code": 201, "data": { "deploymentId" : "aioOASIHD1h", "stageName" : "ttt888", "description" : "Deployed by Zappa.", "cacheClusterEnabled" : false, "cacheClusterSize" : "1", "cacheClusterStatus" : "AVAILABLE", "methodSettings" : { "String" : { "metricsEnabled" : false, "loggingLevel" : "OFF", "dataTraceEnabled" : false, "throttlingBurstLimit" : 100, "throttlingRateLimit" : 100, "cachingEnabled" : false, "cacheTtlInSeconds" : 100, "cacheDataEncrypted" : false, "requireAuthorizationForCacheControl" : false } }, "variables" : { }, "createdDate" : "2011-01-01T01:01:01Z+0000", "lastUpdatedDate" : "2011-01-01T01:01:01Z+0000" } } ================================================ FILE: tests/placebo/TestZappa.test_fetch_logs/logs.DescribeLogStreams_1.json ================================================ { "status_code": 200, "data": { "logStreams": [ { "firstEventTimestamp": 1455666679725, "lastEventTimestamp": 1455666679958, "creationTime": 1455666678634, "uploadSequenceToken": "49540113880921962757517231072874083168075499101109640610", "logStreamName": "2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7", "lastIngestionTime": 1455666694754, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7", "storedBytes": 247 }, { "firstEventTimestamp": 1455649410417, "lastEventTimestamp": 1455650497148, "creationTime": 1455649409642, "uploadSequenceToken": "49540113985133345070250697845503862755841532631883736754", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855", "lastIngestionTime": 1455650512171, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855", "storedBytes": 554 }, { "firstEventTimestamp": 1455649480031, "lastEventTimestamp": 1455649480289, "creationTime": 1455649479007, "uploadSequenceToken": "49540751433982745183295759382532773807925310381002604002", "logStreamName": "2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10", "lastIngestionTime": 1455649495052, "arn": "arn:aws:logs:us-east-1:724336686645:log-group:/aws/lambda/Spheres-demonstration:log-stream:2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10", "storedBytes": 246 } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a1385218-e228-11e5-bc06-23d39c48cbaa" } } } ================================================ FILE: tests/placebo/TestZappa.test_fetch_logs/logs.FilterLogEvents_1.json ================================================ { "status_code": 200, "data": { "searchedLogStreams": [ { "searchedCompletely": true, "logStreamName": "2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7" }, { "searchedCompletely": true, "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "searchedCompletely": true, "logStreamName": "2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10" } ], "events": [ { "ingestionTime": 1455649425452, "timestamp": 1455649410417, "message": "START RequestId: f6d72ba2-d4df-11e5-bf75-3db99fd8bd4d Version: $LATEST\n", "eventId": "32462066600100845192455856822263785416533790667340972032", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455649425452, "timestamp": 1455649410687, "message": "END RequestId: f6d72ba2-d4df-11e5-bf75-3db99fd8bd4d\n", "eventId": "32462066606122046396059125070478429350148848273955684353", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455649425452, "timestamp": 1455649410687, "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", "eventId": "32462066606122046396059125070478429350148848273955684354", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455649495052, "timestamp": 1455649480031, "message": "START RequestId: 20844441-d4e0-11e5-93d5-517f441c2397 Version: $LATEST\n", "eventId": "32462068152544921442966656281272578021728142002476744704", "logStreamName": "2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10" }, { "ingestionTime": 1455649495052, "timestamp": 1455649480289, "message": "END RequestId: 20844441-d4e0-11e5-93d5-517f441c2397\n", "eventId": "32462068158298513704187557051788793336071419271019692033", "logStreamName": "2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10" }, { "ingestionTime": 1455649495052, "timestamp": 1455649480289, "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", "eventId": "32462068158298513704187557051788793336071419271019692034", "logStreamName": "2016/02/16/[$LATEST]3ed41c6bf25b45d8ace1459f5574ad10" }, { "ingestionTime": 1455650512171, "timestamp": 1455650497125, "message": "START RequestId: 7f75c4e9-d4e2-11e5-a695-ad825bd23d32 Version: $LATEST\n", "eventId": "32462090834499058397272271028023736332668015516235137024", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455650512171, "timestamp": 1455650497148, "message": "System check identified no issues (0 silenced).\n", "eventId": "32462090835011975536838475360279057852938927830872686593", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455650512171, "timestamp": 1455650497148, "message": "END RequestId: 7f75c4e9-d4e2-11e5-a695-ad825bd23d32\n", "eventId": "32462090835011975536838475360279057852938927830872686594", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455650512171, "timestamp": 1455650497148, "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", "eventId": "32462090835011975536838475360279057852938927830872686595", "logStreamName": "2016/02/16/[$LATEST]c208fa908b574538a193cd3e9bc73855" }, { "ingestionTime": 1455666694754, "timestamp": 1455666679725, "message": "START RequestId: 2c419ba2-d508-11e5-9f1e-2be596b4591e Version: $LATEST\n", "eventId": "32462451718538308138934340807480632102522048575880101888", "logStreamName": "2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7" }, { "ingestionTime": 1455666694754, "timestamp": 1455666679958, "message": "END RequestId: 2c419ba2-d508-11e5-9f1e-2be596b4591e\n", "eventId": "32462451723734381770191975999458454460049116806773538817", "logStreamName": "2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7" }, { "ingestionTime": 1455666694754, "timestamp": 1455666679958, "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", "eventId": "32462451723734381770191975999458454460049116806773538818", "logStreamName": "2016/02/16/[$LATEST]e26d3657ce394b688b21bffcaac513d7" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "a36395e1-e228-11e5-b098-a7148bebd5d9" } } } ================================================ FILE: tests/placebo/TestZappa.test_get_api_url/apigateway.GetRestApis_1.json ================================================ { "status_code": 200, "data": { "items": [ { "description": "helloworld-gamma Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 12, "microsecond": 0, "year": 2016, "day": 3, "minute": 54 }, "id": "11uy9wa8he", "name": "helloworld-gamma" }, { "description": "helloworld-dello Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 30, "minute": 24 }, "id": "19qz2k9mhj", "name": "helloworld-dello" }, { "description": "spheres-beta Zappa", "createdDate": { "hour": 2, "__class__": "datetime", "month": 2, "second": 45, "microsecond": 0, "year": 2016, "day": 2, "minute": 20 }, "id": "2djdovx6f3", "name": "spheres-beta" }, { "description": "helloworld-zeta Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 2, "second": 9, "microsecond": 0, "year": 2016, "day": 5, "minute": 53 }, "id": "2uj5ini1yb", "name": "helloworld-zeta" }, { "description": "helloworld-dellooo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 35, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "2yucw4zeee", "name": "helloworld-dellooo" }, { "description": "helloworld-q Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 43, "microsecond": 0, "year": 2016, "day": 30, "minute": 1 }, "id": "393yunyphh", "name": "helloworld-q" }, { "description": "helloworld-admin Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 21, "microsecond": 0, "year": 2016, "day": 1, "minute": 21 }, "id": "3cwdkxrlr7", "name": "helloworld-admin" }, { "description": "helloworld-qqqq Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 1, "second": 39, "microsecond": 0, "year": 2016, "day": 30, "minute": 27 }, "id": "40msxbdjda", "name": "helloworld-qqqq" }, { "description": "helloworld-zzz Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 1, "second": 7, "microsecond": 0, "year": 2016, "day": 30, "minute": 6 }, "id": "434d9nax27", "name": "helloworld-zzz" }, { "description": "helloworld-dvlper Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 10, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "5c33uqnbei", "name": "helloworld-dvlper" }, { "description": "helloworld-delta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 3, "minute": 33 }, "id": "5dicqc3gnc", "name": "helloworld-delta" }, { "description": "helloworld-pp Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "5k8g1isoxc", "name": "helloworld-pp" }, { "description": "helloworld-develoo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 7, "microsecond": 0, "year": 2016, "day": 29, "minute": 46 }, "id": "5mt7r6iuul", "name": "helloworld-develoo" }, { "description": "helloworld-develoooo Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 29, "minute": 7 }, "id": "5u1yirbfj1", "name": "helloworld-develoooo" }, { "description": "settings-dev Zappa", "createdDate": { "hour": 23, "__class__": "datetime", "month": 2, "second": 7, "microsecond": 0, "year": 2016, "day": 24, "minute": 9 }, "id": "60fhpa4pz2", "name": "settings-dev" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 21, "__class__": "datetime", "month": 2, "second": 57, "microsecond": 0, "year": 2016, "day": 6, "minute": 29 }, "id": "60sck4xxob", "name": "Spheres-dev" }, { "description": "helloworld-beta Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 54, "microsecond": 0, "year": 2016, "day": 3, "minute": 1 }, "id": "67urt9dyf3", "name": "helloworld-beta" }, { "description": "wsgi", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 20, "minute": 29 }, "id": "7k6anj0k99", "name": "wsgi" }, { "description": "django-helloworld-unicode Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 35, "microsecond": 0, "year": 2016, "day": 29, "minute": 39 }, "id": "arb9clq9k9", "name": "django-helloworld-unicode" }, { "description": "helloworld-develooo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 56, "microsecond": 0, "year": 2016, "day": 29, "minute": 56 }, "id": "b5ufkxk4m9", "name": "helloworld-develooo" }, { "description": "1453842588 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 1, "second": 50, "microsecond": 0, "year": 2016, "day": 26, "minute": 9 }, "id": "bx9xk46vg1", "name": "1453842588" }, { "description": "1457111415 Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 16, "microsecond": 0, "year": 2016, "day": 4, "minute": 10 }, "id": "dndpw65n63", "name": "1457111415" }, { "description": "helloworld-post Zappa", "createdDate": { "hour": 16, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 31, "minute": 30 }, "id": "dx6ixedawa", "name": "helloworld-post" }, { "description": "helloworld-dvlpe Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 1, "second": 54, "microsecond": 0, "year": 2016, "day": 29, "minute": 28 }, "id": "ede32wm7p6", "name": "helloworld-dvlpe" }, { "description": "Created by AWS Lambda", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 20, "minute": 32 }, "id": "erya05p8t3", "name": "LambdaMicroservice" }, { "description": "helloworld-r Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 1, "second": 42, "microsecond": 0, "year": 2016, "day": 30, "minute": 2 }, "id": "fohrtychu1", "name": "helloworld-r" }, { "description": "django-helloworld-omega Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 2, "second": 17, "microsecond": 0, "year": 2016, "day": 29, "minute": 30 }, "id": "g6qdo0yttg", "name": "django-helloworld-omega" }, { "description": "helloworld-radmin Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 51, "microsecond": 0, "year": 2016, "day": 1, "minute": 38 }, "id": "h0ttqz46qc", "name": "helloworld-radmin" }, { "description": "helloworld-dvlp Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 1, "second": 0, "microsecond": 0, "year": 2016, "day": 29, "minute": 49 }, "id": "h7twhyqkie", "name": "helloworld-dvlp" }, { "description": "helloworld-devel Zappa", "createdDate": { "hour": 23, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 30 }, "id": "hbj992tfwl", "name": "helloworld-devel" }, { "description": "Spheres-demonstration Zappa", "createdDate": { "hour": 19, "__class__": "datetime", "month": 2, "second": 25, "microsecond": 0, "year": 2016, "day": 16, "minute": 53 }, "id": "ho43d1vcyb", "name": "Spheres-demonstration" }, { "description": "helloworld-qq Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 38, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "hro3nhl7t4", "name": "helloworld-qq" }, { "description": "helloworld-dvlperr Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 36, "microsecond": 0, "year": 2016, "day": 30, "minute": 12 }, "id": "i2zrw3wku1", "name": "helloworld-dvlperr" }, { "description": "helloworld-delloo Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 1, "second": 47, "microsecond": 0, "year": 2016, "day": 30, "minute": 38 }, "id": "j3rs1jti9g", "name": "helloworld-delloo" }, { "description": "1453976638 Zappa", "createdDate": { "hour": 11, "__class__": "datetime", "month": 1, "second": 59, "microsecond": 0, "year": 2016, "day": 28, "minute": 23 }, "id": "kwzshzpitk", "name": "1453976638" }, { "description": "1457111505 Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 3, "second": 51, "microsecond": 0, "year": 2016, "day": 4, "minute": 11 }, "id": "lavad5es4e", "name": "1457111505" }, { "description": "1453989570 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 32, "microsecond": 0, "year": 2016, "day": 28, "minute": 59 }, "id": "lkiug68ek9", "name": "1453989570" }, { "description": "1453845110 Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 1, "second": 52, "microsecond": 0, "year": 2016, "day": 26, "minute": 51 }, "id": "lo9vjezry6", "name": "1453845110" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 2, "second": 37, "microsecond": 0, "year": 2016, "day": 6, "minute": 0 }, "id": "lphfaxj84g", "name": "Spheres-dev" }, { "description": "1454007920 Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 5 }, "id": "lryqityf9c", "name": "1454007920" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 22, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 6, "minute": 35 }, "id": "lvc59j5puf", "name": "Spheres-dev" }, { "description": "helloworld-qqqqq Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 34, "microsecond": 0, "year": 2016, "day": 30, "minute": 16 }, "id": "lwbaruqt91", "name": "helloworld-qqqqq" }, { "description": "helloworld-dvlperrrr Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 16, "microsecond": 0, "year": 2016, "day": 30, "minute": 31 }, "id": "mco06c7adh", "name": "helloworld-dvlperrrr" }, { "description": "helloworld-rr Zappa", "createdDate": { "hour": 20, "__class__": "datetime", "month": 1, "second": 6, "microsecond": 0, "year": 2016, "day": 30, "minute": 28 }, "id": "mgo7ssfnr8", "name": "helloworld-rr" }, { "description": "helloworld-dvlperrr Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 44, "microsecond": 0, "year": 2016, "day": 30, "minute": 21 }, "id": "nsrpfnr93g", "name": "helloworld-dvlperrr" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 21, "__class__": "datetime", "month": 2, "second": 58, "microsecond": 0, "year": 2016, "day": 6, "minute": 37 }, "id": "o48rplzmre", "name": "Spheres-dev" }, { "description": "helloworld-badmin Zappa", "createdDate": { "hour": 13, "__class__": "datetime", "month": 2, "second": 49, "microsecond": 0, "year": 2016, "day": 1, "minute": 59 }, "id": "owo37s7o0l", "name": "helloworld-badmin" }, { "description": "1453987169 Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 28, "minute": 19 }, "id": "p22u4b4hn9", "name": "1453987169" }, { "description": "1453847710 Zappa", "createdDate": { "hour": 23, "__class__": "datetime", "month": 1, "second": 12, "microsecond": 0, "year": 2016, "day": 26, "minute": 35 }, "id": "pzdx6f20o9", "name": "1453847710" }, { "description": "helloworld-develo Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 1, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 33 }, "id": "qhikml2l0a", "name": "helloworld-develo" }, { "description": "1453992020 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 22, "microsecond": 0, "year": 2016, "day": 28, "minute": 40 }, "id": "rmlote5cec", "name": "1453992020" }, { "description": "Spheres-dev Zappa", "createdDate": { "hour": 18, "__class__": "datetime", "month": 2, "second": 28, "microsecond": 0, "year": 2016, "day": 5, "minute": 38 }, "id": "ry7mtnfmo3", "name": "Spheres-dev" }, { "description": "helloworld-fadmin Zappa", "createdDate": { "hour": 14, "__class__": "datetime", "month": 2, "second": 38, "microsecond": 0, "year": 2016, "day": 1, "minute": 47 }, "id": "swe19z3zr7", "name": "helloworld-fadmin" }, { "description": "1453992953 Zappa", "createdDate": { "hour": 15, "__class__": "datetime", "month": 1, "second": 56, "microsecond": 0, "year": 2016, "day": 28, "minute": 55 }, "id": "tpwx2chyc9", "name": "1453992953" }, { "description": "helloworld-poste Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 1, "microsecond": 0, "year": 2016, "day": 31, "minute": 6 }, "id": "v3f3yz9ij6", "name": "helloworld-poste" }, { "description": "helloworld-dvlperrrrr Zappa", "createdDate": { "hour": 12, "__class__": "datetime", "month": 1, "second": 30, "microsecond": 0, "year": 2016, "day": 30, "minute": 41 }, "id": "voekyyz7v7", "name": "helloworld-dvlperrrrr" }, { "description": "helloworld-postal Zappa", "createdDate": { "hour": 0, "__class__": "datetime", "month": 2, "second": 55, "microsecond": 0, "year": 2016, "day": 1, "minute": 22 }, "id": "xnozvcrt9f", "name": "helloworld-postal" }, { "description": "helloworld-zz Zappa", "createdDate": { "hour": 17, "__class__": "datetime", "month": 1, "second": 11, "microsecond": 0, "year": 2016, "day": 30, "minute": 56 }, "id": "yxu3hk4ss8", "name": "helloworld-zz" }, { "description": "hello_django-dev Zappa", "createdDate": { "hour": 21, "__class__": "datetime", "month": 2, "second": 53, "microsecond": 0, "year": 2016, "day": 29, "minute": 2 }, "id": "z64se9m9x4", "name": "hello_django-dev" }, { "description": "helloworld-p Zappa", "createdDate": { "hour": 21, "__class__": "datetime", "month": 1, "second": 17, "microsecond": 0, "year": 2016, "day": 30, "minute": 58 }, "id": "zdmxiapwh9", "name": "helloworld-p" } ], "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "9ac03233-e231-11e5-8630-d13cf2bbed5d" } } } ================================================ FILE: tests/placebo/TestZappa.test_handler/s3.GetObject_1.json ================================================ { "status_code": 200, "data": { "Body": { "body": "{\n\t\"hello\": \"world\"\n}\n", "__module__": "botocore.response", "__class__": "StreamingBody" }, "AcceptRanges": "bytes", "ContentType": "application/json", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "lVaFp3nkEtsVe+4Dm5eMCifL68dHBxqkCRU8pYt+H1A2no2oYcgeyTKOIDYnujWZK1CvUaRd2VY=", "RequestId": "70200E61AF5D2966", "HTTPHeaders": { "content-length": "22", "x-amz-id-2": "lVaFp3nkEtsVe+4Dm5eMCifL68dHBxqkCRU8pYt+H1A2no2oYcgeyTKOIDYnujWZK1CvUaRd2VY=", "accept-ranges": "bytes", "server": "AmazonS3", "last-modified": "Thu, 30 Jun 2016 22:53:14 GMT", "x-amz-request-id": "70200E61AF5D2966", "etag": "\"4623dd8d925106bedd88a1b82f69f5b5\"", "date": "Thu, 30 Jun 2016 22:53:27 GMT", "content-type": "application/json" } }, "LastModified": { "hour": 22, "__class__": "datetime", "month": 6, "second": 14, "microsecond": 0, "year": 2016, "day": 30, "minute": 53 }, "ContentLength": 22, "ETag": "\"4623dd8d925106bedd88a1b82f69f5b5\"", "Metadata": {} } } ================================================ FILE: tests/placebo/TestZappa.test_invoke_lambda_function/lambda.Invoke_1.json ================================================ { "status_code": 202, "data": { "Payload": { "body": "", "__module__": "botocore.response", "__class__": "StreamingBody" }, "ResponseMetadata": { "HTTPStatusCode": 202, "RequestId": "2b8fb03f-e231-11e5-977b-d973ae051f04" }, "StatusCode": 202 } } ================================================ FILE: tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.GetFunction_1.json ================================================ { "status_code": 200, "data": { "Code": { "RepositoryType": "S3", "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" }, "Configuration": { "Version": "7", "CodeSha256": "t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154784, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:24:01.446+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "78da1863-e22e-11e5-a5ae-01cbfdebdc8f" } } } ================================================ FILE: tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.ListVersionsByFunction_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "786c144e-e22e-11e5-86f4-4528d3e5269b" }, "Versions": [ { "Version": "$LATEST", "CodeSha256": "qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154778, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:$LATEST", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:55:35.845+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "1", "CodeSha256": "eEW6OoZIm1g+3sLnoGqkfG9PcvYcXYoTd8uZYCMhA2U=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12102921, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:1", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:39:31.557+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "2", "CodeSha256": "QXwkHDWCmczXTdDi9AYf6Ws74jkAI6zUJ+tf7s5zLzk=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12152312, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:2", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:47:04.499+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "3", "CodeSha256": "Hpt/J6gyhnYXm7NVWwzomJoExr0i9II//4zaLm0DYgc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12152182, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:3", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:58:08.443+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "4", "CodeSha256": "1ofpfK2Jonu13iPUBMeNYR962iWcD5vL1YrJazF9tF0=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154467, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:4", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T16:25:49.425+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "5", "CodeSha256": "bwLhQSjeZOmNC10s2eMO0ljWJBNX5tT4S9MgkvBWjOM=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154507, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:5", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T16:34:47.988+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "6", "CodeSha256": "uxHYC6Uf/sUl884TWUqlwi0WWE+ixfxhO964yPec5zM=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154780, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:6", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:12:28.708+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "7", "CodeSha256": "t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154784, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:24:01.446+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "8", "CodeSha256": "qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154778, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:8", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:55:35.845+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.ListVersionsByFunction_2.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "78c11231-e22e-11e5-bb00-6935e1456f05" }, "Versions": [ { "Version": "$LATEST", "CodeSha256": "qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154778, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:$LATEST", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:55:35.845+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "1", "CodeSha256": "eEW6OoZIm1g+3sLnoGqkfG9PcvYcXYoTd8uZYCMhA2U=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12102921, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:1", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:39:31.557+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "2", "CodeSha256": "QXwkHDWCmczXTdDi9AYf6Ws74jkAI6zUJ+tf7s5zLzk=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12152312, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:2", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:47:04.499+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "3", "CodeSha256": "Hpt/J6gyhnYXm7NVWwzomJoExr0i9II//4zaLm0DYgc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12152182, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:3", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T14:58:08.443+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "4", "CodeSha256": "1ofpfK2Jonu13iPUBMeNYR962iWcD5vL1YrJazF9tF0=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154467, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:4", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T16:25:49.425+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "5", "CodeSha256": "bwLhQSjeZOmNC10s2eMO0ljWJBNX5tT4S9MgkvBWjOM=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154507, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:5", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-02-29T16:34:47.988+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "6", "CodeSha256": "uxHYC6Uf/sUl884TWUqlwi0WWE+ixfxhO964yPec5zM=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154780, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:6", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:12:28.708+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "7", "CodeSha256": "t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154784, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:7", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:24:01.446+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" }, { "Version": "8", "CodeSha256": "qPyTWxngvz505vUX4v0IbW4H6CdQCSiYSGPsNQHPNTc=", "FunctionName": "django-helloworld-unicode", "MemorySize": 512, "CodeSize": 12154778, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:8", "Handler": "handler.lambda_handler", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-01T00:55:35.845+0000", "Runtime": "python2.7", "Description": "Zappa Deployment" } ] } } ================================================ FILE: tests/placebo/TestZappa.test_rollback_lambda_function_version/lambda.UpdateFunctionCode_1.json ================================================ { "status_code": 200, "data": { "CodeSha256": "t3pcqjdrLOqd2p0bRsCEOhgvLJ9sLJrVazpGqhDybsc=", "FunctionName": "django-helloworld-unicode", "ResponseMetadata": { "HTTPStatusCode": 200, "RequestId": "8ef0d90e-e22e-11e5-ae73-91491a1737c0" }, "CodeSize": 12154784, "MemorySize": 512, "FunctionArn": "arn:aws:lambda:us-east-1:724336686645:function:django-helloworld-unicode:9", "Version": "9", "Role": "arn:aws:iam::724336686645:role/ZappaLambdaExecution", "Timeout": 30, "LastModified": "2016-03-04T17:31:54.534+0000", "Handler": "handler.lambda_handler", "Runtime": "python2.7", "Description": "Zappa Deployment" } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.CompleteMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"86865b71093464f5a301e1027439491b-1\"", "Bucket": "test_zappa_upload_s3", "Location": "https://test_zappa_upload_s3.s3.amazonaws.com/lambda_package-1456273359.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "MRuE82ncxtI6IA04QwvcPHGZX/81kUhSZ+LwV7jAGsv674NknH9btnGPsUuLXBspNuqGtFbdWKY=", "RequestId": "4BD122934F722C61" }, "Key": "lambda_package-1456273359.zip" } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.CreateBucket_1.json ================================================ { "status_code": 200, "data": { "Location": "/test_zappa_upload_s3", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "8sXq+Uc6Ao7tM6js+GCOK99fJGbL2cNEZsug+9karxoklp9ml5MxqSJiTOw6yHlCWEGDGv7BZFw=", "RequestId": "B99377D822A42891" } } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.CreateMultipartUpload_1.json ================================================ { "status_code": 200, "data": { "Bucket": "test_zappa_upload_s3", "UploadId": "qPM3MaoOZRezVJwiULIVGtsj0K99hO9YbuPdzMJQVUzZ.XX3YdscjOUnnzBHbFi2XGBgZjeOBb2NryiJzKxlHRiVKyYVezXsc_o9PCRar.icz3ks66jij8A0tkuwp1o0", "Key": "lambda_package-1456272533.zip", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "1awKoHujZxpAAG1hGnOKHetwi4vY1Dszt4QvFiAcUMkENvnGHt7yDuJ4n6eR5sRK", "RequestId": "7CE018CCC678149E" } } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.DeleteObject_1.json ================================================ { "status_code": 204, "data": { "ResponseMetadata": { "HTTPStatusCode": 204, "HostId": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "RequestId": "A112859017E5977B", "RetryAttempts": 0, "HTTPHeaders": { "date": "Tue, 20 Sep 2016 19:58:20 GMT", "server": "AmazonS3", "x-amz-id-2": "ldu8D2RVRw0NbQAkx/6NrC87k8c8NR8fI1JxN1PLjFw/+GkMir3UIRjU25z/p4it0ppVHY8epWs=", "x-amz-request-id": "A112859017E5977B" } } } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.HeadBucket_1.json ================================================ { "status_code": 200, "data": { "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "bIWJow7rK8U4lxn9VTIz3/lH+agH9OA8BGD80vbICTWwHNqfEdGt4D3s2EmVWm/U01XtUZdq5OY=", "RequestId": "501E18A0BFB1B76C" } } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.HeadObject_1.json ================================================ { "status_code": 200, "data": { "AcceptRanges": "bytes", "ContentType": "binary/octet-stream", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "PnlRCp+1zp2qblsjbRFvph/eBOb8dN/k9fTPmW45pfDP/6GoUs/Z7hfZIpFo5CjVgLtsuZk/IYw=", "RequestId": "AD1ABEA37433B785" }, "LastModified": { "hour": 23, "__class__": "datetime", "month": 2, "second": 10, "microsecond": 0, "year": 2016, "day": 23, "minute": 32 }, "ContentLength": 4507898, "ETag": "\"58098b238b9a6ed2b3a954601e9b8e5f\"", "Metadata": {} } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.PutObject_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"58098b238b9a6ed2b3a954601e9b8e5f\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "tedGhtpKSnTti2bVK33LeOe6Iy0D4uLMfZt8TqJJWFRK3XI35EahQd2F+ShUX9l6O0vw7yyEmMA=", "RequestId": "D90365BC22767711" } } } ================================================ FILE: tests/placebo/TestZappa.test_upload_remove_s3/s3.UploadPart_1.json ================================================ { "status_code": 200, "data": { "ETag": "\"781936e8a21849d38e955224ef70d71e\"", "ResponseMetadata": { "HTTPStatusCode": 200, "HostId": "/Dt2sy50X8WRf6CeE4OhoXMQftr4n5PUtT22ZblpVdfLkqo8pv7oeq6XaEoNCdjiPmN9+AtaXy0=", "RequestId": "C3816300C7FA5E5F" } } } ================================================ FILE: tests/test_app.py ================================================ from zappa.asynchronous import task try: from urllib.parse import parse_qs except ImportError: from cgi import parse_qs try: from html import escape except ImportError: from cgi import escape def hello_world(environ, start_response): parameters = parse_qs(environ.get('QUERY_STRING', '')) if 'subject' in parameters: subject = escape(parameters['subject'][0]) else: subject = 'World' start_response('200 OK', [('Content-Type', 'text/html')]) return ['''Hello {subject!s} Hello {subject!s}! '''.format(**{'subject': subject})] def schedule_me(): return "Hello!" @task def async_me(arg1, **kwargs): return "run async when on lambda %s%s" % (arg1, kwargs.get('foo', '')) @task(remote_aws_lambda_function_name='test-app-dev', remote_aws_region='us-east-1') def remote_async_me(arg1, **kwargs): return "run async always on lambda %s%s" % (arg1, kwargs.get('foo', '')) def callback(self): print("this is a callback") def prebuild_me(): print("this is a prebuild script") ================================================ FILE: tests/test_bad_circular_extends_settings.json ================================================ { "ttt888": { "touch": false, "extends": "extendo", "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [ { "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }, { "function": "test.test_app.method", "event_source": { "arn": "arn:aws:sns:::1", "events": [ "sns:Publish" ] } } ] }, "devor": { "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [{ "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }] }, "extendo": { "extends": "ttt888", "touch": true, "prebuild_script": "test_settings.prebuild_me", "environment_variables": { "EXTENDO": "You bet" } }, "extendofail": { "extends": "failfail", "prebuild_script": "test_settings.prebuild_me", "environment_variables": { "EXTENDO": "You bet" } } } ================================================ FILE: tests/test_bad_environment_vars.json ================================================ { "ttt888": { "touch": false, "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "environment_variables": { "REMOTE_HOST": "example.net", "REMOTE_PORT": 9004, }, } } ================================================ FILE: tests/test_bad_settings.json ================================================ { "ttt888": { "s3_bucket": "lmbda" // note: missing comma is not enough to make hjson raise // ValueError, however missing quote is enough; "app_function": "tests.test_app.hello_world "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [ { "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }, { "function": "test.test_app.method", "event_source": { "arn": "arn:aws:sns:::1", "events": [ "sns:Publish" ] } } ] }, "devor": { "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [{ "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }] } } ================================================ FILE: tests/test_bad_stage_name_settings.json ================================================ { "ttt-888": { "touch": false, "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [ { "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }, { "function": "test.test_app.method", "event_source": { "arn": "arn:aws:sns:::1", "events": [ "sns:Publish" ] } } ] }, "devor": { "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "prebuild_script": "test_settings.prebuild_me", "events": [{ "function": "tests.test_app.schedule_me", "expression": "rate(1 minute)" }] } } ================================================ FILE: tests/test_bot_exception_handler_settings.py ================================================ API_STAGE = 'dev' APP_FUNCTION = 'app' APP_MODULE = 'tests.test_wsgi_script_name_app' BINARY_SUPPORT = False CONTEXT_HEADER_MAPPINGS = {} DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'wsgi_script_name_settings' COGNITO_TRIGGER_MAPPING = {} AWS_BOT_EVENT_MAPPING = {'intent-name:DialogCodeHook': 'tests.test_handler.raises_exception'} EXCEPTION_HANDLER = 'tests.test_handler.mocked_exception_handler' ================================================ FILE: tests/test_bot_handler_being_triggered.py ================================================ API_STAGE = 'dev' APP_FUNCTION = 'app' APP_MODULE = 'tests.test_wsgi_script_name_app' BINARY_SUPPORT = False CONTEXT_HEADER_MAPPINGS = {} DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'wsgi_script_name_settings' COGNITO_TRIGGER_MAPPING = {} AWS_BOT_EVENT_MAPPING = {'intent-name:DialogCodeHook': 'tests.test_handler.handle_bot_intent'} ================================================ FILE: tests/test_event_script_app.py ================================================ from __future__ import print_function def handler_for_events(event, context): print('Event:', event) return True ================================================ FILE: tests/test_event_script_settings.py ================================================ API_STAGE = 'dev' APP_FUNCTION = 'handler_for_events' APP_MODULE = 'tests.test_event_script_app' DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'test_event_script_app' COGNITO_TRIGGER_MAPPING = {} ================================================ FILE: tests/test_exception_handler_settings.py ================================================ API_STAGE = 'dev' APP_FUNCTION = 'raises_exception' APP_MODULE = 'tests.test_handler' BINARY_SUPPORT = False CONTEXT_HEADER_MAPPINGS = {} DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'raises_exception' COGNITO_TRIGGER_MAPPING = {} EXCEPTION_HANDLER = 'tests.test_handler.mocked_exception_handler' ================================================ FILE: tests/test_handler.py ================================================ from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *args): return first, args[0] def unsupported(first, second, third): return first, second, third def raises_exception(*args, **kwargs): raise Exception('app exception') def handle_bot_intent(event, context): return "Success" mocked_exception_handler = Mock() class TestZappa(unittest.TestCase): def setUp(self): mocked_exception_handler.reset_mock() def tearDown(self): LambdaHandler._LambdaHandler__instance = None LambdaHandler.settings = None LambdaHandler.settings_name = None def test_run_function(self): self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c')) self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e') self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c')) self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c')) self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c')) try: LambdaHandler.run_function(unsupported, 'e', 'c') self.fail('Exception expected') except RuntimeError as e: pass def test_run_fuction_with_type_hint(self): scope = {} exec('def f_with_type_hint() -> None: return', scope) f_with_type_hint = scope['f_with_type_hint'] self.assertIsNone(LambdaHandler.run_function(f_with_type_hint, 'e', 'c')) def test_wsgi_script_name_on_aws_url(self): """ Ensure that requests to the amazonaws.com host for an API with a domain have the correct request.url """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'queryStringParameters': {}, 'headers': { 'Host': '1234567890.execute-api.us-east-1.amazonaws.com', }, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertEqual( response['body'], 'https://1234567890.execute-api.us-east-1.amazonaws.com/dev/return/request/url' ) def test_wsgi_script_name_on_domain_url(self): """ Ensure that requests to the amazonaws.com host for an API with a domain have the correct request.url """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'queryStringParameters': {}, 'headers': { 'Host': 'example.com', }, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertEqual( response['body'], 'https://example.com/return/request/url' ) def test_wsgi_script_name_with_multi_value_header(self): """ Ensure that requests generated with multivalued headers (such as from an ALB with Multi Valued Headers enabled) succeed. """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'queryStringParameters': {}, 'multiValueHeaders': { 'Host': ['example.com'], }, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertIn('multiValueHeaders', response) def test_wsgi_script_name_with_multi_value_querystring(self): """ Ensure that requests generated with multivalue querystrings succeed. """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'multiValueQueryStringParameters': { 'multi': ['value', 'qs'] }, 'multiValueHeaders': { 'Host': ['example.com'], }, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertEqual( response['body'], 'https://example.com/return/request/url?multi=value&multi=qs' ) def test_wsgi_script_name_on_test_request(self): """ Ensure that requests sent by the "Send test request" button behaves sensibly """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'queryStringParameters': {}, 'headers': {}, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertEqual( response['body'], 'https://zappa:80/return/request/url' ) def test_exception_handler_on_web_request(self): """ Ensure that app exceptions triggered by web requests use the exception_handler. """ lh = LambdaHandler('tests.test_exception_handler_settings') event = { 'body': '', 'resource': '/{proxy+}', 'requestContext': {}, 'queryStringParameters': {}, 'headers': { 'Host': '1234567890.execute-api.us-east-1.amazonaws.com', }, 'pathParameters': { 'proxy': 'return/request/url' }, 'httpMethod': 'GET', 'stageVariables': {}, 'path': '/return/request/url' } mocked_exception_handler.assert_not_called() response = lh.handler(event, None) self.assertEqual(response['statusCode'], 500) mocked_exception_handler.assert_called() def test_wsgi_script_on_cognito_event_request(self): """ Ensure that requests sent by cognito behave sensibly """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = {'version': '1', 'region': 'eu-west-1', 'userPoolId': 'region_poolID', 'userName': 'uuu-id-here', 'callerContext': {'awsSdkVersion': 'aws-sdk-js-2.149.0', 'clientId': 'client-id-here'}, 'triggerSource': 'PreSignUp_SignUp', 'request': {'userAttributes': {'email': 'email@example.com'}, 'validationData': None}, 'response': {'autoConfirmUser': False, 'autoVerifyEmail': False, 'autoVerifyPhone': False}} response = lh.handler(event, None) self.assertEqual(response['response']['autoConfirmUser'], False) def test_bot_triggered_event(self): """ Ensure that bot triggered events are handled as in the settings """ lh = LambdaHandler('tests.test_bot_handler_being_triggered') # from : https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-lex event = { "messageVersion": "1.0", "invocationSource": "DialogCodeHook", "userId": "user-id specified in the POST request to Amazon Lex.", "sessionAttributes": { "key1": "value1", "key2": "value2", }, "bot": { "name": "bot-name", "alias": "bot-alias", "version": "bot-version" }, "outputDialogMode": "Text or Voice, based on ContentType request header in runtime API request", "currentIntent": { "name": "intent-name", "slots": { "slot-name": "value", "slot-name": "value", "slot-name": "value" }, "confirmationStatus": "None, Confirmed, or Denied (intent confirmation, if configured)" } } response = lh.handler(event, None) self.assertEqual(response, 'Success') def test_exception_in_bot_triggered_event(self): """ Ensure that bot triggered exceptions are handled as defined in the settings. """ lh = LambdaHandler('tests.test_bot_exception_handler_settings') # from : https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-lex event = { "messageVersion": "1.0", "invocationSource": "DialogCodeHook", "userId": "user-id specified in the POST request to Amazon Lex.", "sessionAttributes": { "key1": "value1", "key2": "value2", }, "bot": { "name": "bot-name", "alias": "bot-alias", "version": "bot-version" }, "outputDialogMode": "Text or Voice, based on ContentType request header in runtime API request", "currentIntent": { "name": "intent-name", "slots": { "slot-name": "value", "slot-name": "value", "slot-name": "value" }, "confirmationStatus": "None, Confirmed, or Denied (intent confirmation, if configured)" } } response = lh.lambda_handler(event, None) mocked_exception_handler.assert_called def test_wsgi_script_name_on_alb_event(self): """ Ensure ALB-triggered events are properly handled by LambdaHandler ALB-forwarded events have a slightly different request structure than API-Gateway https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html """ lh = LambdaHandler('tests.test_wsgi_script_name_settings') event = { 'requestContext': { 'elb': { 'targetGroupArn': 'arn:aws:elasticloadbalancing:region:123456789012:targetgroup/my-target-group/6d0ecf831eec9f09' } }, 'httpMethod': 'GET', 'path': '/return/request/url', 'queryStringParameters': {}, 'headers': { 'accept': 'text/html,application/xhtml+xml', 'accept-language': 'en-US,en;q=0.8', 'content-type': 'text/plain', 'cookie': 'cookies', 'host': '1234567890.execute-api.us-east-1.amazonaws.com', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)', 'x-amzn-trace-id': 'Root=1-5bdb40ca-556d8b0c50dc66f0511bf520', 'x-forwarded-for': '72.21.198.66', 'x-forwarded-port': '443', 'x-forwarded-proto': 'https' }, 'isBase64Encoded': False, 'body': '' } response = lh.handler(event, None) self.assertEqual(response['statusCode'], 200) self.assertEqual(response['statusDescription'], '200 OK') self.assertEqual(response['isBase64Encoded'], False) self.assertEqual( response['body'], 'https://1234567890.execute-api.us-east-1.amazonaws.com/return/request/url' ) def test_merge_headers_no_multi_value(self): event = { 'headers': { 'a': 'b' } } merged = merge_headers(event) self.assertEqual(merged['a'], 'b') def test_merge_headers_combine_values(self): event = { 'headers': { 'a': 'b', 'z': 'q' }, 'multiValueHeaders': { 'a': ['c'], 'x': ['y'] } } merged = merge_headers(event) self.assertEqual(merged['a'], 'c') self.assertEqual(merged['x'], 'y') self.assertEqual(merged['z'], 'q') def test_merge_headers_no_single_value(self): event = { 'multiValueHeaders': { 'a': ['c', 'd'], 'x': ['y', 'z', 'f'] } } merged = merge_headers(event) self.assertEqual(merged['a'], 'c, d') self.assertEqual(merged['x'], 'y, z, f') def test_cloudwatch_subscription_event(self): """ Test that events sent in the format used by CloudWatch logs via subscription filters are handled properly. The actual payload that Lambda receives is in the following format { "awslogs": {"data": "BASE64ENCODED_GZIP_COMPRESSED_DATA"} } https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html """ lh = LambdaHandler('tests.test_event_script_settings') event = { 'awslogs': { 'data': "some-data-not-important-for-test" } } response = lh.handler(event, None) self.assertEqual(response, True) ================================================ FILE: tests/test_non_ascii_environment_var_key.json ================================================ { "ttt888": { "touch": false, "s3_bucket": "lmbda", "app_function": "tests.test_app.hello_world", "callbacks": { "settings": "test_settings.callback", "post": "test_settings.callback", "zip": "test_settings.callback" }, "delete_local_zip": true, "debug": true, "parameter_depth": 2, "environment_variables": { "REMOTE_HOST☣": "example.net" }, } } ================================================ FILE: tests/test_one_env.json ================================================ { "lonely": { "s3_bucket": "lmbda", "app_function": "app.app", "delete_zip": true } } ================================================ FILE: tests/test_settings.toml ================================================ [ttt888] app_function = "tests.test_app.hello_world" debug = true delete_local_zip = true parameter_depth = 2 prebuild_script = "test_settings.prebuild_me" s3_bucket = "lmbda" touch = false use_precompiled_packages = false [ttt888.events] function = "tests.test_app.schedule_me" expression = "rate(1 minute)" ================================================ FILE: tests/test_settings.yaml ================================================ --- ttt888: touch: false s3_bucket: lmbda app_function: tests.test_app.hello_world callbacks: settings: test_settings.callback post: test_settings.callback zip: test_settings.callback delete_local_zip: true debug: true parameter_depth: 2 prebuild_script: test_settings.prebuild_me events: - function: tests.test_app.schedule_me expression: rate(1 minute) - function: test.test_app.method event_source: arn: arn:aws:sns:::1 events: - sns:Publish devor: s3_bucket: lmbda app_function: tests.test_app.hello_world callbacks: settings: tests.test_app.callback post: tests.test_app.callback zip: test_settings.callback delete_local_zip: true debug: true parameter_depth: 2 prebuild_script: test_settings.prebuild_me events: - function: tests.test_app.schedule_me expression: rate(1 minute) extendo: extends: ttt888 touch: true prebuild_script: test_settings.prebuild_me environment_variables: EXTENDO: You bet extendo2: extends: extendo s3_bucket: lmbda2 deprecated_remote_env: s3_bucket: lmbda remote_env_bucket: lmbda-env remote_env_file: dev/env.json remote_env: s3_bucket: lmbda remote_env: s3://lmbda-env/prod/env.json extendofail: extends: failfail prebuild_script: test_settings.prebuild_me environment_variables: EXTENDO: You bet ================================================ FILE: tests/test_settings.yml ================================================ --- ttt888: touch: false s3_bucket: lmbda app_function: tests.test_app.hello_world callbacks: settings: test_settings.callback post: test_settings.callback zip: test_settings.callback delete_local_zip: true debug: true parameter_depth: 2 prebuild_script: test_settings.prebuild_me events: - function: tests.test_app.schedule_me expression: rate(1 minute) - function: test.test_app.method event_source: arn: arn:aws:sns:::1 events: - sns:Publish devor: s3_bucket: lmbda app_function: tests.test_app.hello_world callbacks: settings: tests.test_app.callback post: tests.test_app.callback zip: test_settings.callback delete_local_zip: true debug: true parameter_depth: 2 prebuild_script: test_settings.prebuild_me events: - function: tests.test_app.schedule_me expression: rate(1 minute) extendo: extends: ttt888 touch: true prebuild_script: test_settings.prebuild_me environment_variables: EXTENDO: You bet extendo2: extends: extendo s3_bucket: lmbda2 deprecated_remote_env: s3_bucket: lmbda remote_env_bucket: lmbda-env remote_env_file: dev/env.json remote_env: s3_bucket: lmbda remote_env: s3://lmbda-env/prod/env.json extendofail: extends: failfail prebuild_script: test_settings.prebuild_me environment_variables: EXTENDO: You bet ================================================ FILE: tests/test_wsgi_script_name_app.py ================================================ from flask import Flask, request app = Flask(__name__) @app.route('/return/request/url', methods=['GET', 'POST']) def return_request_url(): return request.url ================================================ FILE: tests/test_wsgi_script_name_settings.py ================================================ API_STAGE = 'dev' APP_FUNCTION = 'app' APP_MODULE = 'tests.test_wsgi_script_name_app' BINARY_SUPPORT = False CONTEXT_HEADER_MAPPINGS = {} DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'wsgi_script_name_settings' COGNITO_TRIGGER_MAPPING = {} ================================================ FILE: tests/tests.py ================================================ # -*- coding: utf8 -*- import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import ClickException from zappa.cli import ZappaCLI, shamelessly_promote, disable_click_colors from zappa.core import ALB_LAMBDA_ALIAS from zappa.ext.django_zappa import get_django_wsgi from zappa.letsencrypt import get_cert_and_update_domain, create_domain_key, create_domain_csr, \ create_chained_certificate, cleanup, parse_account_key, parse_csr, sign_certificate, encode_certificate,\ register_account, verify_challenge, gettempdir from zappa.utilities import ( conflicts_with_a_neighbouring_module, contains_python_files_or_subdirs, detect_django_settings, detect_flask_apps, get_venv_from_python_version, human_size, InvalidAwsLambdaName, parse_s3_url, string_to_timestamp, titlecase_keys, is_valid_bucket_name, validate_name ) from zappa.wsgi import create_wsgi_request, common_log from zappa.core import Zappa, ASSUME_POLICY, ATTACH_POLICY def random_string(length): return ''.join(random.choice(string.printable) for _ in range(length)) class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch('time.sleep', return_value=None) # Tests expect us-east-1. # If the user has set a different region in env variables, we set it aside for now and use us-east-1 self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None) os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.start() def tearDown(self): if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.stop() del os.environ['AWS_DEFAULT_REGION'] if self.users_current_region_name is not None: # Give the user their AWS region back, we're done testing with us-east-1. os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name ## # Sanity Tests ## def test_test(self): self.assertTrue(True) ## # Basic Tests ## def test_zappa(self): self.assertTrue(True) Zappa() def test_disable_click_colors(self): disable_click_colors() assert resolve_color_default() is False @mock.patch('zappa.core.find_packages') @mock.patch('os.remove') def test_copy_editable_packages(self, mock_remove, mock_find_packages): virtual_env = os.environ.get("VIRTUAL_ENV") if not virtual_env: return self.skipTest( "test_copy_editable_packages must be run in a virtualenv") temp_package_dir = tempfile.mkdtemp() try: egg_links = [os.path.join( virtual_env, "lib", get_venv_from_python_version(), "site-packages", "test-copy-editable-packages.egg-link")] egg_path = "/some/other/directory/package" mock_find_packages.return_value = [ "package", "package.subpackage", "package.another"] temp_egg_link = os.path.join( temp_package_dir, 'package-python.egg-link') z = Zappa() mock_open = mock.mock_open(read_data=egg_path.encode("utf-8")) with mock.patch("zappa.core.open", mock_open), \ mock.patch("glob.glob") as mock_glob, \ mock.patch("zappa.core.copytree") as mock_copytree: # we use glob.glob to get the egg-links in the temp packages # directory mock_glob.return_value = [temp_egg_link] z.copy_editable_packages(egg_links, temp_package_dir) # make sure we copied the right directories mock_copytree.assert_called_with( os.path.join(egg_path, 'package'), os.path.join(temp_package_dir, 'package'), metadata=False, symlinks=False ) self.assertEqual(mock_copytree.call_count, 1) # make sure it removes the egg-link from the temp packages # directory mock_remove.assert_called_with(temp_egg_link) self.assertEqual(mock_remove.call_count, 1) finally: shutil.rmtree(temp_package_dir) return def test_create_lambda_package(self): # mock the pkg_resources.WorkingSet() to include a known package in lambda_packages so that the code # for zipping pre-compiled packages gets called mock_installed_packages = {'psycopg2': '2.6.1'} with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): z = Zappa(runtime='python3.6') path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) self.assertTrue(os.path.isfile(path)) os.remove(path) def test_get_manylinux_python36(self): z = Zappa(runtime='python3.6') self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2', '2.7.1')) self.assertIsNone(z.get_cached_manylinux_wheel('derpderpderpderp', '0.0')) # mock with a known manylinux wheel package so that code for downloading them gets invoked mock_installed_packages = {'psycopg2': '2.7.1'} with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): z = Zappa(runtime='python3.6') path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) self.assertTrue(os.path.isfile(path)) os.remove(path) def test_get_manylinux_python37(self): z = Zappa(runtime='python3.7') self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2', '2.7.6')) self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0')) # mock with a known manylinux wheel package so that code for downloading them gets invoked mock_installed_packages = {'psycopg2': '2.7.6'} with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): z = Zappa(runtime='python3.7') path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) self.assertTrue(os.path.isfile(path)) os.remove(path) def test_get_manylinux_python38(self): z = Zappa(runtime='python3.8') self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2-binary', '2.8.4')) self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0')) # mock with a known manylinux wheel package so that code for downloading them gets invoked mock_installed_packages = {'psycopg2-binary': '2.8.4'} with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): z = Zappa(runtime='python3.8') path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) self.assertTrue(os.path.isfile(path)) os.remove(path) # same, but with an ABI3 package mock_installed_packages = {'cryptography': '2.8'} with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): z = Zappa(runtime='python3.8') path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) self.assertTrue(os.path.isfile(path)) os.remove(path) def test_getting_installed_packages(self, *args): z = Zappa(runtime='python3.6') # mock pkg_resources call to be same as what our mocked site packages dir has mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location']) mock_pip_installed_packages = [mock_package('super_package', '0.1', '/venv/site-packages')] with mock.patch('os.path.isdir', return_value=True): with mock.patch('os.listdir', return_value=['super_package']): import pkg_resources # this gets called in non-test Zappa mode with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages): self.assertDictEqual(z.get_installed_packages('',''), {'super_package' : '0.1'}) def test_getting_installed_packages_mixed_case_location(self, *args): z = Zappa(runtime='python3.6') # mock pip packages call to be same as what our mocked site packages dir has mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location']) mock_pip_installed_packages = [ mock_package('SuperPackage', '0.1', '/Venv/site-packages'), mock_package('SuperPackage64', '0.1', '/Venv/site-packages64'), ] with mock.patch('os.path.isdir', return_value=True): with mock.patch('os.listdir', return_value=[]): import pkg_resources # this gets called in non-test Zappa mode with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages): self.assertDictEqual(z.get_installed_packages('/venv/Site-packages','/venv/site-packages64'), { 'superpackage': '0.1', 'superpackage64': '0.1', }) def test_getting_installed_packages_mixed_case(self, *args): z = Zappa(runtime='python3.6') # mock pkg_resources call to be same as what our mocked site packages dir has mock_package = collections.namedtuple('mock_package', ['project_name', 'version', 'location']) mock_pip_installed_packages = [mock_package('SuperPackage', '0.1', '/venv/site-packages')] with mock.patch('os.path.isdir', return_value=True): with mock.patch('os.listdir', return_value=['superpackage']): import pkg_resources # this gets called in non-test Zappa mode with mock.patch('pkg_resources.WorkingSet', return_value=mock_pip_installed_packages): self.assertDictEqual(z.get_installed_packages('',''), {'superpackage' : '0.1'}) def test_load_credentials(self): z = Zappa() z.aws_region = 'us-east-1' z.load_credentials() self.assertEqual(z.boto_session.region_name, 'us-east-1') self.assertEqual(z.aws_region, 'us-east-1') z.aws_region = 'eu-west-1' z.profile_name = 'default' z.load_credentials() self.assertEqual(z.boto_session.region_name, 'eu-west-1') self.assertEqual(z.aws_region, 'eu-west-1') creds = { 'AWS_ACCESS_KEY_ID': 'AK123', 'AWS_SECRET_ACCESS_KEY': 'JKL456', 'AWS_DEFAULT_REGION': 'us-west-1' } with mock.patch.dict('os.environ', creds): z.aws_region = None z.load_credentials() loaded_creds = z.boto_session._session.get_credentials() self.assertEqual(loaded_creds.access_key, 'AK123') self.assertEqual(loaded_creds.secret_key, 'JKL456') self.assertEqual(z.boto_session.region_name, 'us-west-1') def test_create_api_gateway_routes_with_different_auth_methods(self): z = Zappa() z.parameter_depth = 1 z.integration_response_codes = [200] z.method_response_codes = [200] z.http_methods = ['GET'] z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' lambda_arn = 'arn:aws:lambda:us-east-1:12345:function:helloworld' # No auth at all z.create_stack_template(lambda_arn, 'helloworld', False, False, None) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("NONE", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("NONE", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual(False, parsable_template["Resources"]["GET0"]["Properties"]["ApiKeyRequired"]) self.assertEqual(False, parsable_template["Resources"]["GET1"]["Properties"]["ApiKeyRequired"]) # IAM auth z.create_stack_template(lambda_arn, 'helloworld', False, True, None) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual(False, parsable_template["Resources"]["GET0"]["Properties"]["ApiKeyRequired"]) self.assertEqual(False, parsable_template["Resources"]["GET1"]["Properties"]["ApiKeyRequired"]) # CORS with auth z.create_stack_template(lambda_arn, 'helloworld', False, True, None, True) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual("NONE", parsable_template["Resources"]["OPTIONS0"]["Properties"]["AuthorizationType"]) self.assertEqual("NONE", parsable_template["Resources"]["OPTIONS1"]["Properties"]["AuthorizationType"]) self.assertEqual("MOCK", parsable_template["Resources"]["OPTIONS0"]["Properties"]["Integration"]["Type"]) self.assertEqual("MOCK", parsable_template["Resources"]["OPTIONS1"]["Properties"]["Integration"]["Type"]) self.assertEqual("'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", parsable_template["Resources"]["OPTIONS0"]["Properties"]["Integration"]["IntegrationResponses"][0]["ResponseParameters"]["method.response.header.Access-Control-Allow-Headers"]) self.assertEqual("'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", parsable_template["Resources"]["OPTIONS1"]["Properties"]["Integration"]["IntegrationResponses"][0]["ResponseParameters"]["method.response.header.Access-Control-Allow-Headers"]) self.assertTrue(parsable_template["Resources"]["OPTIONS0"]["Properties"]["MethodResponses"][0]["ResponseParameters"]["method.response.header.Access-Control-Allow-Headers"]) self.assertTrue(parsable_template["Resources"]["OPTIONS1"]["Properties"]["MethodResponses"][0]["ResponseParameters"]["method.response.header.Access-Control-Allow-Headers"]) self.assertEqual(False, parsable_template["Resources"]["GET0"]["Properties"]["ApiKeyRequired"]) self.assertEqual(False, parsable_template["Resources"]["GET1"]["Properties"]["ApiKeyRequired"]) # API Key auth z.create_stack_template(lambda_arn, 'helloworld', True, True, None) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual(True, parsable_template["Resources"]["GET0"]["Properties"]["ApiKeyRequired"]) self.assertEqual(True, parsable_template["Resources"]["GET1"]["Properties"]["ApiKeyRequired"]) # Authorizer and IAM authorizer = { "function": "runapi.authorization.gateway_authorizer.evaluate_token", "result_ttl": 300, "token_header": "Authorization", "validation_expression": "xxx" } z.create_stack_template(lambda_arn, 'helloworld', False, True, authorizer) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("AWS_IAM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) with self.assertRaises(KeyError): parsable_template["Resources"]["Authorizer"] # Authorizer with validation expression invocations_uri = 'arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/' + lambda_arn + '/invocations' z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("CUSTOM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("CUSTOM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual("TOKEN", parsable_template["Resources"]["Authorizer"]["Properties"]["Type"]) self.assertEqual("ZappaAuthorizer", parsable_template["Resources"]["Authorizer"]["Properties"]["Name"]) self.assertEqual(300, parsable_template["Resources"]["Authorizer"]["Properties"]["AuthorizerResultTtlInSeconds"]) self.assertEqual(invocations_uri, parsable_template["Resources"]["Authorizer"]["Properties"]["AuthorizerUri"]) self.assertEqual(z.credentials_arn, parsable_template["Resources"]["Authorizer"]["Properties"]["AuthorizerCredentials"]) self.assertEqual("xxx", parsable_template["Resources"]["Authorizer"]["Properties"]["IdentityValidationExpression"]) # Authorizer without validation expression authorizer.pop('validation_expression', None) z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer) parsable_template = json.loads(z.cf_template.to_json()) self.assertEqual("CUSTOM", parsable_template["Resources"]["GET0"]["Properties"]["AuthorizationType"]) self.assertEqual("CUSTOM", parsable_template["Resources"]["GET1"]["Properties"]["AuthorizationType"]) self.assertEqual("TOKEN", parsable_template["Resources"]["Authorizer"]["Properties"]["Type"]) with self.assertRaises(KeyError): parsable_template["Resources"]["Authorizer"]["Properties"]["IdentityValidationExpression"] # Authorizer with arn authorizer = { "arn": "arn:aws:lambda:us-east-1:123456789012:function:my-function", } z.create_stack_template(lambda_arn, 'helloworld', False, False, authorizer) parsable_template = json.loads(z.cf_template.to_json()) 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"]) def test_policy_json(self): # ensure the policy docs are valid JSON json.loads(ASSUME_POLICY) json.loads(ATTACH_POLICY) def test_schedule_events(self): z = Zappa() path = os.getcwd() # z.schedule_events # TODO def test_update_aws_env_vars(self): z = Zappa() z.credentials_arn = object() with mock.patch.object(z, "lambda_client") as mock_client: # Simulate already having some AWS env vars remotely mock_client.get_function_configuration.return_value = {"Environment": {"Variables": {"REMOTE_ONLY": "AAA", "CHANGED_REMOTE" : "BBB"}}} z.update_lambda_configuration("test", "test", "test", aws_environment_variables={"CHANGED_REMOTE" : "ZZ", "LOCAL_ONLY" : "YY"}) end_result_should_be = {"REMOTE_ONLY": "AAA", "CHANGED_REMOTE" : "ZZ", "LOCAL_ONLY" : "YY"} self.assertEqual(mock_client.update_function_configuration.call_args[1]["Environment"], { "Variables": end_result_should_be}) with mock.patch.object(z, "lambda_client") as mock_client: # Simulate already having some AWS env vars remotely but none set in aws_environment_variables mock_client.get_function_configuration.return_value = { "Environment": {"Variables": {"REMOTE_ONLY_1": "AAA", "REMOTE_ONLY_2": "BBB"}}} z.update_lambda_configuration("test", "test", "test") end_result_should_be = {"REMOTE_ONLY_1": "AAA", "REMOTE_ONLY_2": "BBB"} self.assertEqual(mock_client.update_function_configuration.call_args[1]["Environment"], {"Variables": end_result_should_be}) def test_update_layers(self): z = Zappa() z.credentials_arn = object() with mock.patch.object(z, "lambda_client") as mock_client: mock_client.get_function_configuration.return_value = {} z.update_lambda_configuration("test", "test", "test", layers=["Layer1", "Layer2"]) self.assertEqual(mock_client.update_function_configuration.call_args[1]["Layers"], ["Layer1", "Layer2"]) with mock.patch.object(z, "lambda_client") as mock_client: mock_client.get_function_configuration.return_value = {} z.update_lambda_configuration("test", "test", "test") self.assertEqual(mock_client.update_function_configuration.call_args[1]["Layers"], []) def test_update_empty_aws_env_hash(self): z = Zappa() z.credentials_arn = object() with mock.patch.object(z, "lambda_client") as mock_client: # Simulate having no AWS env vars remotely mock_client.get_function_configuration.return_value = {} z.update_lambda_configuration("test", "test", "test", aws_environment_variables={"LOCAL_ONLY" : "LZ", "SHOW_AND_TELL" : "SHA"}) end_result_should_be = {"LOCAL_ONLY" : "LZ", "SHOW_AND_TELL" : "SHA"} self.assertEqual(mock_client.update_function_configuration.call_args[1]["Environment"], { "Variables": end_result_should_be}) ## # Logging ## def test_logging(self): """ TODO """ Zappa() ## # Mapping and pattern tests # Deprecated ## # def test_redirect_pattern(self): # test_urls = [ # # a regular endpoint url # 'https://asdf1234.execute-api.us-east-1.amazonaws.com/env/path/to/thing', # # an external url (outside AWS) # 'https://github.com/Miserlou/zappa/issues?q=is%3Aissue+is%3Aclosed', # # a local url # '/env/path/to/thing' # ] # for code in ['301', '302']: # pattern = Zappa.selection_pattern(code) # for url in test_urls: # self.assertRegexpMatches(url, pattern) # def test_b64_pattern(self): # head = '\{"http_status": ' # for code in ['400', '401', '402', '403', '404', '500']: # pattern = Zappa.selection_pattern(code) # document = head + code + random_string(50) # self.assertRegexpMatches(document, pattern) # for bad_code in ['200', '301', '302']: # document = base64.b64encode(head + bad_code + random_string(50)) # self.assertNotRegexpMatches(document, pattern) # def test_200_pattern(self): # pattern = Zappa.selection_pattern('200') # self.assertEqual(pattern, '') ## # WSGI ## def test_wsgi_event(self): ## This is a pre-proxy+ event # event = { # "body": "", # "headers": { # "Via": "1.1 e604e934e9195aaf3e36195adbcb3e18.cloudfront.net (CloudFront)", # "Accept-Language": "en-US,en;q=0.5", # "Accept-Encoding": "gzip", # "CloudFront-Is-SmartTV-Viewer": "false", # "CloudFront-Forwarded-Proto": "https", # "X-Forwarded-For": "109.81.209.118, 216.137.58.43", # "CloudFront-Viewer-Country": "CZ", # "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", # "X-Forwarded-Proto": "https", # "X-Amz-Cf-Id": "LZeP_TZxBgkDt56slNUr_H9CHu1Us5cqhmRSswOh1_3dEGpks5uW-g==", # "CloudFront-Is-Tablet-Viewer": "false", # "X-Forwarded-Port": "443", # "CloudFront-Is-Mobile-Viewer": "false", # "CloudFront-Is-Desktop-Viewer": "true", # "Content-Type": "application/json" # }, # "params": { # "parameter_1": "asdf1", # "parameter_2": "asdf2", # }, # "method": "POST", # "query": { # "dead": "beef" # } # } event = { 'body': None, 'resource': '/', 'requestContext': { 'resourceId': '6cqjw9qu0b', 'apiId': '9itr2lba55', 'resourcePath': '/', 'httpMethod': 'GET', 'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5', 'accountId': '724336686645', 'identity': { 'apiKey': None, 'userArn': None, 'cognitoAuthenticationType': None, 'caller': None, 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0', 'user': None, 'cognitoIdentityPoolId': None, 'cognitoIdentityId': None, 'cognitoAuthenticationProvider': None, 'sourceIp': '50.191.225.98', 'accountId': None, }, 'stage': 'devorr', }, 'queryStringParameters': None, 'httpMethod': 'GET', 'pathParameters': None, 'headers': { 'Via': '1.1 6801928d54163af944bf854db8d5520e.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': '50.191.225.98, 204.246.168.101', 'CloudFront-Viewer-Country': 'US', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Upgrade-Insecure-Requests': '1', 'Host': '9itr2lba55.execute-api.us-east-1.amazonaws.com', 'X-Forwarded-Proto': 'https', 'X-Amz-Cf-Id': 'qgNdqKT0_3RMttu5KjUdnvHI3OKm1BWF8mGD2lX8_rVrJQhhp-MLDw==', 'CloudFront-Is-Tablet-Viewer': 'false', 'X-Forwarded-Port': '443', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0', 'CloudFront-Is-Mobile-Viewer': 'false', 'CloudFront-Is-Desktop-Viewer': 'true', }, 'stageVariables': None, 'path': '/', } request = create_wsgi_request(event) def test_wsgi_path_info_unquoted(self): event = { "body": {}, "headers": {}, "pathParameters": {}, "path": '/path%3A1', # encoded /path:1 "httpMethod": "GET", "queryStringParameters": {}, "requestContext": {} } request = create_wsgi_request(event, trailing_slash=True) self.assertEqual("/path:1", request['PATH_INFO']) def test_wsgi_latin1(self): event = { "body": {}, "headers": {}, "pathParameters": {}, "path": '/path/%E4%BB%8A%E6%97%A5%E3%81%AF', "httpMethod": "GET", "queryStringParameters": {"a": "%E4%BB%8A%E6%97%A5%E3%81%AF"}, "requestContext": {} } request = create_wsgi_request(event, script_name="%E4%BB%8A%E6%97%A5%E3%81%AF") # verify that the path, query params and script name can be encoded in iso-8859-1 request['PATH_INFO'].encode('iso-8859-1') request['QUERY_STRING'].encode('iso-8859-1') request['SCRIPT_NAME'].encode('iso-8859-1') def test_wsgi_logging(self): # event = { # "body": {}, # "headers": {}, # "params": { # "parameter_1": "asdf1", # "parameter_2": "asdf2", # }, # "httpMethod": "GET", # "query": {} # } 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'} environ = create_wsgi_request(event, trailing_slash=False) response_tuple = collections.namedtuple('Response', ['status_code', 'content']) response = response_tuple(200, 'hello') le = common_log(environ, response, response_time=True) le = common_log(environ, response, response_time=False) def test_wsgi_multipart(self): #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': {}} event = { 'body': 'LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03Njk1MjI4NDg0Njc4MTc2NTgwNjMwOTYxDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9Im15c3RyaW5nIg0KDQpkZGQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tNzY5NTIyODQ4NDY3ODE3NjU4MDYzMDk2MS0tDQo=', 'resource': '/', 'requestContext': { 'resourceId': '6cqjw9qu0b', 'apiId': '9itr2lba55', 'resourcePath': '/', 'httpMethod': 'POST', 'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5', 'accountId': '724336686645', 'identity': { 'apiKey': None, 'userArn': None, 'cognitoAuthenticationType': None, 'caller': None, 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0', 'user': None, 'cognitoIdentityPoolId': None, 'cognitoIdentityId': None, 'cognitoAuthenticationProvider': None, 'sourceIp': '50.191.225.98', 'accountId': None, }, 'stage': 'devorr', }, 'queryStringParameters': None, 'httpMethod': 'POST', 'pathParameters': None, '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'}, 'stageVariables': None, 'path': '/', } environ = create_wsgi_request(event, trailing_slash=False) response_tuple = collections.namedtuple('Response', ['status_code', 'content']) response = response_tuple(200, 'hello') def test_wsgi_without_body(self): event = { 'body': None, 'resource': '/', 'requestContext': { 'resourceId': '6cqjw9qu0b', 'apiId': '9itr2lba55', 'resourcePath': '/', 'httpMethod': 'POST', 'requestId': 'c17cb1bf-867c-11e6-b938-ed697406e3b5', 'accountId': '724336686645', 'identity': { 'apiKey': None, 'userArn': None, 'cognitoAuthenticationType': None, 'caller': None, 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0', 'user': None, 'cognitoIdentityPoolId': None, 'cognitoIdentityId': None, 'cognitoAuthenticationProvider': None, 'sourceIp': '50.191.225.98', 'accountId': None, }, 'stage': 'devorr', }, 'queryStringParameters': None, 'httpMethod': 'POST', 'pathParameters': None, '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'}, 'stageVariables': None, 'path': '/', 'isBase64Encoded': True } environ = create_wsgi_request(event, trailing_slash=False) response_tuple = collections.namedtuple('Response', ['status_code', 'content']) response = response_tuple(200, 'hello') def test_wsgi_from_apigateway_testbutton(self): """ API Gateway resources have a "test bolt" button on methods. This button sends some empty dicts as 'null' instead of '{}'. """ event = { "resource": "/", "path": "/", "httpMethod": "GET", "headers": None, "queryStringParameters": None, "pathParameters": None, "stageVariables": None, "requestContext":{ "accountId": "0123456", "resourceId": "qwertyasdf", "stage": "test-invoke-stage", "requestId": "test-invoke-request", "identity":{ "cognitoIdentityPoolId": None, "accountId": "0123456", "cognitoIdentityId": None, "caller": "MYCALLERID", "apiKey": "test-invoke-api-key", "sourceIp": "test-invoke-source-ip", "accessKey": "MYACCESSKEY", "cognitoAuthenticationType": None, "cognitoAuthenticationProvider": None, "userArn": "arn:aws:iam::fooo:user/my.username", "userAgent": "Apache-HttpClient/4.5.x (Java/1.8.0_112)", "user": "MYCALLERID" }, "resourcePath": "/", "httpMethod": "GET", "apiId": "myappid" }, "body": None, "isBase64Encoded": False } environ = create_wsgi_request(event, trailing_slash=False) response_tuple = collections.namedtuple('Response', ['status_code', 'content']) response = response_tuple(200, 'hello') ## # Handler ## ## # CLI ## def test_cli_sanity(self): zappa_cli = ZappaCLI() return def test_load_settings(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('test_settings.json') self.assertEqual(False, zappa_cli.stage_config['touch']) def test_load_extended_settings(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'extendo' zappa_cli.load_settings('test_settings.json') self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket']) self.assertEqual(True, zappa_cli.stage_config['touch']) zappa_cli = ZappaCLI() zappa_cli.api_stage = 'extendofail' with self.assertRaises(ClickException): zappa_cli.load_settings('test_settings.json') zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' with self.assertRaises(RuntimeError): zappa_cli.load_settings('tests/test_bad_circular_extends_settings.json') zappa_cli = ZappaCLI() zappa_cli.api_stage = 'extendo2' zappa_cli.load_settings('test_settings.json') self.assertEqual('lmbda2', zappa_cli.stage_config['s3_bucket']) # Second Extension self.assertTrue(zappa_cli.stage_config['touch']) # First Extension self.assertTrue(zappa_cli.stage_config['delete_local_zip']) # The base def test_load_settings__lambda_concurrency_enabled(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'lambda_concurrency_enabled' zappa_cli.load_settings('test_settings.json') self.assertEqual(6, zappa_cli.stage_config['lambda_concurrency']) def test_load_settings_yml(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('tests/test_settings.yml') self.assertEqual(False, zappa_cli.stage_config['touch']) zappa_cli = ZappaCLI() zappa_cli.api_stage = 'extendo' zappa_cli.load_settings('tests/test_settings.yml') self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket']) self.assertEqual(True, zappa_cli.stage_config['touch']) def test_load_settings_yaml(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('tests/test_settings.yaml') self.assertEqual(False, zappa_cli.stage_config['touch']) zappa_cli = ZappaCLI() zappa_cli.api_stage = 'extendo' zappa_cli.load_settings('tests/test_settings.yaml') self.assertEqual('lmbda', zappa_cli.stage_config['s3_bucket']) self.assertEqual(True, zappa_cli.stage_config['touch']) def test_load_settings_toml(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('tests/test_settings.toml') self.assertEqual(False, zappa_cli.stage_config['touch']) def test_settings_extension(self): """ Make sure Zappa uses settings in the proper order: JSON, TOML, YAML. """ tempdir = tempfile.mkdtemp(prefix="zappa-test-settings") shutil.copy("tests/test_one_env.json", tempdir + "/zappa_settings.json") shutil.copy("tests/test_settings.yml", tempdir + "/zappa_settings.yml") shutil.copy("tests/test_settings.yml", tempdir + "/zappa_settings.yaml") shutil.copy("tests/test_settings.toml", tempdir + "/zappa_settings.toml") orig_cwd = os.getcwd() os.chdir(tempdir) try: zappa_cli = ZappaCLI() # With all three, we should get the JSON file first. self.assertEqual(zappa_cli.get_json_or_yaml_settings(), "zappa_settings.json") zappa_cli.load_settings_file() self.assertIn("lonely", zappa_cli.zappa_settings) os.unlink("zappa_settings.json") # Without the JSON file, we should get the TOML file. self.assertEqual(zappa_cli.get_json_or_yaml_settings(), "zappa_settings.toml") zappa_cli.load_settings_file() self.assertIn("ttt888", zappa_cli.zappa_settings) self.assertNotIn("devor", zappa_cli.zappa_settings) os.unlink("zappa_settings.toml") # With just the YAML file, we should get it. self.assertEqual(zappa_cli.get_json_or_yaml_settings(), "zappa_settings.yml") zappa_cli.load_settings_file() self.assertIn("ttt888", zappa_cli.zappa_settings) self.assertIn("devor", zappa_cli.zappa_settings) os.unlink("zappa_settings.yml") self.assertEqual(zappa_cli.get_json_or_yaml_settings(), "zappa_settings.yaml") zappa_cli.load_settings_file() self.assertIn("ttt888", zappa_cli.zappa_settings) self.assertIn("devor", zappa_cli.zappa_settings) os.unlink("zappa_settings.yaml") # Without anything, we should get an exception. self.assertRaises( ClickException, zappa_cli.get_json_or_yaml_settings) finally: os.chdir(orig_cwd) shutil.rmtree(tempdir) def test_cli_utility(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('test_settings.json') zappa_cli.create_package() zappa_cli.remove_local_zip() logs = [ { 'timestamp': '12345', 'message': '[START RequestId] test' }, { 'timestamp': '12345', 'message': '[REPORT RequestId] test' }, { 'timestamp': '12345', 'message': '[END RequestId] test' }, { 'timestamp': '12345', 'message': 'test' }, { 'timestamp': '1480001341214', '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' }, { 'timestamp': '1480001341214', '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' }, { 'timestamp': '1480001341215', 'message': '[1480001341258] [DEBUG] 2016-11-24T15:29:01.258Z b890d8f6-b25a-11e6-b6bc-718f7ec807df Zappa Event: {}' } ] zappa_cli.print_logs(logs) zappa_cli.print_logs(logs, colorize=False) zappa_cli.print_logs(logs, colorize=False, http=True) zappa_cli.print_logs(logs, colorize=True, http=True) zappa_cli.print_logs(logs, colorize=True, http=False) zappa_cli.print_logs(logs, colorize=True, non_http=True) zappa_cli.print_logs(logs, colorize=True, non_http=False) zappa_cli.print_logs(logs, colorize=True, non_http=True, http=True) zappa_cli.print_logs(logs, colorize=True, non_http=False, http=False) zappa_cli.print_logs(logs, colorize=False, force_colorize=False) zappa_cli.print_logs(logs, colorize=False, force_colorize=True) zappa_cli.print_logs(logs, colorize=True, force_colorize=False) zappa_cli.print_logs(logs, colorize=True, non_http=False, http=False, force_colorize=True) zappa_cli.check_for_update() def test_cli_format_invoke_command(self): zappa_cli = ZappaCLI() 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" 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" formated_string = zappa_cli.format_invoke_command(plain_string) self.assertEqual(final_string, formated_string) def test_cli_colorize_invoke_command(self): zappa_cli = ZappaCLI() 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" 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" colorized_string = zappa_cli.colorize_invoke_command(plain_string) self.assertEqual(final_string, colorized_string) def test_cli_colorize_whole_words_only(self): zappa_cli = ZappaCLI() plain_string = "START RESTART END RENDER report [DEBUG] TEXT[DEBUG]TEXT" 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" colorized_string = zappa_cli.colorize_invoke_command(plain_string) self.assertEqual(final_string, colorized_string) def test_cli_colorize_invoke_command_bad_string(self): zappa_cli = ZappaCLI() plain_string = "Hey, I'm a plain string, won't be colorized" final_string = "Hey, I'm a plain string, won't be colorized" colorized_string = zappa_cli.colorize_invoke_command(plain_string) self.assertEqual(final_string, colorized_string) # def test_cli_args(self): # zappa_cli = ZappaCLI() # # Sanity # argv = '-s test_settings.json derp ttt888'.split() # with self.assertRaises(SystemExit) as system_exit: # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 2) # def test_cli_error_exit_code(self): # # Discussion: https://github.com/Miserlou/Zappa/issues/407 # zappa_cli = ZappaCLI() # # Sanity # argv = '-s test_settings.json status devor'.split() # with self.assertRaises(SystemExit) as system_exit: # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 1) # def test_cli_default(self): # # Discussion: https://github.com/Miserlou/Zappa/issues/422 # zappa_cli = ZappaCLI() # argv = '-s tests/test_one_env.json status'.split() # # It'll fail, but at least it'll cover it. # with self.assertRaises(SystemExit) as system_exit: # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 1) # zappa_cli = ZappaCLI() # argv = '-s tests/test_one_env.json status --all'.split() # # It'll fail, but at least it'll cover it. # with self.assertRaises(SystemExit) as system_exit: # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 1) # zappa_cli = ZappaCLI() # argv = '-s test_settings.json status'.split() # with self.assertRaises(SystemExit) as system_exit: # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 2) # def test_cli_negative_rollback(self): # zappa_cli = ZappaCLI() # argv = '-s test_settings.json rollback -n -1 dev'.split() # output = StringIO() # old_stderr, sys.stderr = sys.stderr, output # with self.assertRaises(SystemExit) as system_exit: # print argv # zappa_cli.handle(argv) # self.assertEqual(system_exit.exception.code, 2) # error_msg = output.getvalue().strip() # expected = r".*This argument must be positive \(got -1\)$" # self.assertRegexpMatches(error_msg, expected) # sys.stderr = old_stderr # @mock.patch('zappa.cli.ZappaCLI.dispatch_command') # def test_cli_invoke(self, _): # zappa_cli = ZappaCLI() # argv = '-s test_settings.json invoke '.split() # raw_tests = ( # ['--raw', 'devor', '"print 1+2"'], # ['devor', '"print 1+2"', '--raw'] # ) # for cmd in raw_tests: # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertFalse(args['all']) # self.assertTrue(args['raw']) # self.assertEquals(args['command_rest'], '"print 1+2"') # self.assertEquals(args['command_env'], 'devor') # all_raw_tests = ( # ['--all', '--raw', '"print 1+2"'], # ['"print 1+2"', '--all', '--raw'], # ['--raw', '"print 1+2"', '--all'], # ['--all', '"print 1+2"', '--raw'] # ) # for cmd in all_raw_tests: # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertTrue(args['all']) # self.assertTrue(args['raw']) # self.assertEquals(args['command_rest'], '"print 1+2"') # self.assertEquals(args['command_env'], None) # zappa_cli.handle(argv + ['devor', 'myapp.my_func']) # args = zappa_cli.vargs # self.assertEquals(args['command_rest'], 'myapp.my_func') # all_func_tests = ( # ['--all', 'myapp.my_func'], # ['myapp.my_func', '--all'] # ) # for cmd in all_func_tests: # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertTrue(args['all']) # self.assertEquals(args['command_rest'], 'myapp.my_func') # @mock.patch('zappa.cli.ZappaCLI.dispatch_command') # def test_cli_manage(self, _): # zappa_cli = ZappaCLI() # argv = '--settings test_settings.json manage'.split() # all_tests = ( # ['--all', 'showmigrations', 'admin'], # ['showmigrations', 'admin', '--all'] # ) # for cmd in all_tests: # print argv # print cmd # print(argv + cmd) # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertTrue(args['all']) # self.assertTrue( # args['command_rest'] == ['showmigrations', 'admin'] # ) # cmd = ['devor', 'showmigrations', 'admin'] # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertFalse(args['all']) # self.assertTrue( # args['command_rest'] == ['showmigrations', 'admin'] # ) # cmd = ['devor', '"shell --version"'] # zappa_cli.handle(argv + cmd) # args = zappa_cli.vargs # self.assertFalse(args['all']) # self.assertTrue(args['command_rest'] == ['"shell --version"']) def test_bad_json_catch(self): zappa_cli = ZappaCLI() self.assertRaises(ValueError, zappa_cli.load_settings_file, 'tests/test_bad_settings.json') def test_bad_stage_name_catch(self): zappa_cli = ZappaCLI() self.assertRaises(ValueError, zappa_cli.load_settings, 'tests/test_bad_stage_name_settings.json') def test_bad_environment_vars_catch(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' self.assertRaises(ValueError, zappa_cli.load_settings, 'tests/test_bad_environment_vars.json') # @mock.patch('botocore.session.Session.full_config', new_callable=mock.PropertyMock) # def test_cli_init(self, mock_config): # # Coverage for all profile detection paths # mock_config.side_effect = [ # { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } }, # { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } }, # { 'profiles' : { # 'default' : { # 'region' : 'us-east-1' # }, # 'another' : { # 'region' : 'us-east-1' # } # } }, # { 'profiles' : { # 'radical' : { # 'region' : 'us-east-1' # }, # 'another' : { # 'region' : 'us-east-1' # } # } }, # { 'profiles': {} }, # { 'profiles': {} }, # { 'profiles' : { 'default' : { 'region' : 'us-east-1'} } }, # ] # if os.path.isfile('zappa_settings.json'): # os.remove('zappa_settings.json') # # Test directly # zappa_cli = ZappaCLI() # # Via http://stackoverflow.com/questions/2617057/how-to-supply-stdin-files-and-environment-variable-inputs-to-python-unit-tests # inputs = ['dev', 'lmbda', 'test_settings', 'y', ''] # def test_for(inputs): # input_generator = (i for i in inputs) # bi = 'builtins.input' # with mock.patch(bi, lambda prompt: next(input_generator)): # zappa_cli.init() # if os.path.isfile('zappa_settings.json'): # os.remove('zappa_settings.json') # test_for(inputs) # test_for(['dev', 'lmbda', 'test_settings', 'n', '']) # test_for(['dev', 'default', 'lmbda', 'test_settings', '', '']) # test_for(['dev', 'radical', 'lmbda', 'test_settings', 'p', '']) # test_for(['dev', 'lmbda', 'test_settings', 'y', '']) # test_for(['dev', 'lmbda', 'test_settings', 'p', 'n']) # # Test via handle() # input_generator = (i for i in inputs) # bi = 'builtins.input' # with mock.patch(bi, lambda prompt: next(input_generator)): # zappa_cli = ZappaCLI() # argv = ['init'] # zappa_cli.handle(argv) # if os.path.isfile('zappa_settings.json'): # os.remove('zappa_settings.json') def test_domain_name_match(self): # Simple sanity check zone = Zappa.get_best_match_zone(all_zones={ 'HostedZones': [ { 'Name': 'example.com.au.', 'Id': 'zone-correct', 'Config': { 'PrivateZone': False } } ]}, domain='www.example.com.au') assert zone == 'zone-correct' # No match test zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [ { 'Name': 'example.com.au.', 'Id': 'zone-incorrect', 'Config': { 'PrivateZone': False } } ]}, domain='something-else.com.au') assert zone is None # More involved, better match should win. zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [ { 'Name': 'example.com.au.', 'Id': 'zone-incorrect', 'Config': { 'PrivateZone': False } }, { 'Name': 'subdomain.example.com.au.', 'Id': 'zone-correct', 'Config': { 'PrivateZone': False } } ]}, domain='www.subdomain.example.com.au') assert zone == 'zone-correct' # Check private zone is not matched zone = Zappa.get_best_match_zone(all_zones={ 'HostedZones': [ { 'Name': 'example.com.au.', 'Id': 'zone-private', 'Config': { 'PrivateZone': True } } ]}, domain='www.example.com.au') assert zone is None # More involved, should ignore the private zone and match the public. zone = Zappa.get_best_match_zone(all_zones={'HostedZones': [ { 'Name': 'subdomain.example.com.au.', 'Id': 'zone-private', 'Config': { 'PrivateZone': True } }, { 'Name': 'subdomain.example.com.au.', 'Id': 'zone-public', 'Config': { 'PrivateZone': False } } ]}, domain='www.subdomain.example.com.au') assert zone == 'zone-public' ## # Let's Encrypt / ACME ## def test_lets_encrypt_sanity(self): # We need a fake account key and crt import subprocess devnull = open(os.devnull, 'wb') out = subprocess.check_output(['openssl', 'genrsa', '2048'], stderr=devnull) with open(os.path.join(gettempdir(), 'account.key'), 'wb') as f: f.write(out) cmd = [ 'openssl', 'req', '-x509', '-newkey', 'rsa:2048', '-subj', '/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com', '-passout', 'pass:foo', '-keyout', os.path.join(gettempdir(), 'key.key'), '-out', os.path.join(gettempdir(), 'signed.crt'), '-days', '1' ] devnull = open(os.devnull, 'wb') subprocess.check_call(cmd, stdout=devnull, stderr=devnull) DEFAULT_CA = "https://acme-staging.api.letsencrypt.org" CA = "https://acme-staging.api.letsencrypt.org" try: result = register_account() except ValueError as e: pass # that's fine. create_domain_key() create_domain_csr('herp.derp.wtf') parse_account_key() parse_csr() create_chained_certificate() try: result = sign_certificate() except ValueError as e: pass # that's fine. # This service fails due to remote "over-quota" errors, # so let's retire it until we can find a better provider. # result = verify_challenge('http://echo.jsontest.com/status/valid') # try: # result = verify_challenge('http://echo.jsontest.com/status/fail') # except ValueError as e: # pass # that's fine. # try: # result = verify_challenge('http://bing.com') # except ValueError as e: # pass # that's fine. encode_certificate(b'123') # without domain testing.. zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('test_settings.json') get_cert_and_update_domain(zappa_cli, 'kerplah', 'zzzz', domain=None) def test_certify_sanity_checks(self): """ Make sure 'zappa certify': * Errors out when a deployment hasn't taken place. * Writes errors when certificate settings haven't been specified. * Calls Zappa correctly for creates vs. updates. """ old_stdout = sys.stderr try: zappa_cli = ZappaCLI() zappa_cli.domain = "test.example.com" try: zappa_cli.certify() except AttributeError: # Since zappa_cli.zappa isn't initialized, the certify() call # fails when it tries to inspect what Zappa has deployed. pass # Set up a core.Zappa mock and let us save some state about # domains and lambdas zappa_mock = mock.create_autospec(Zappa) zappa_mock.function_versions = [] zappa_mock.domain_names = {} def get_lambda_function_versions(_function_name, *_args, **_kwargs): return zappa_mock.function_versions def get_domain_name(domain, *_args, **_kwargs): return zappa_mock.domain_names.get(domain) zappa_mock.get_domain_name.side_effect = get_domain_name zappa_mock.get_lambda_function_versions.side_effect = get_lambda_function_versions zappa_cli.zappa = zappa_mock self.assertRaises(ClickException, zappa_cli.certify) # Make sure we get an error if we don't configure the domain. zappa_cli.zappa.function_versions = ["$LATEST"] zappa_cli.api_stage = "stage" zappa_cli.zappa_settings = {"stage": {}} zappa_cli.api_stage = "stage" zappa_cli.domain = "test.example.com" try: zappa_cli.certify() except ClickException as e: log_output = str(e) self.assertIn("Can't certify a domain without", log_output) self.assertIn("domain", log_output) # Without any LetsEncrypt settings, we should get a message about # not having a lets_encrypt_key setting. zappa_cli.zappa_settings["stage"]["domain"] = "test.example.com" try: zappa_cli.certify() self.fail("Expected a ClickException") except ClickException as e: log_output = str(e) self.assertIn("Can't certify a domain without", log_output) self.assertIn("lets_encrypt_key", log_output) # With partial settings, we should get a message about not having # certificate, certificate_key, and certificate_chain zappa_cli.zappa_settings["stage"]["certificate"] = "foo" try: zappa_cli.certify() self.fail("Expected a ClickException") except ClickException as e: log_output = str(e) self.assertIn("Can't certify a domain without", log_output) self.assertIn("certificate_key", log_output) self.assertIn("certificate_chain", log_output) zappa_cli.zappa_settings["stage"]["certificate_key"] = "key" try: zappa_cli.certify() self.fail("Expected a ClickException") except ClickException as e: log_output = str(e) self.assertIn("Can't certify a domain without", log_output) self.assertIn("certificate_key", log_output) self.assertIn("certificate_chain", log_output) zappa_cli.zappa_settings["stage"]["certificate_chain"] = "chain" del zappa_cli.zappa_settings["stage"]["certificate_key"] try: zappa_cli.certify() self.fail("Expected a ClickException") except ClickException as e: log_output = str(e) self.assertIn("Can't certify a domain without", log_output) self.assertIn("certificate_key", log_output) self.assertIn("certificate_chain", log_output) # With all certificate settings, make sure Zappa's domain calls # are executed. cert_file = tempfile.NamedTemporaryFile() cert_file.write(b"Hello world") cert_file.flush() zappa_cli.zappa_settings["stage"].update({ "certificate": cert_file.name, "certificate_key": cert_file.name, "certificate_chain": cert_file.name }) sys.stdout.truncate(0) zappa_cli.certify() zappa_cli.zappa.create_domain_name.assert_called_once() zappa_cli.zappa.update_route53_records.assert_called_once() zappa_cli.zappa.update_domain_name.assert_not_called() log_output = sys.stdout.getvalue() self.assertIn("Created a new domain name", log_output) zappa_cli.zappa.reset_mock() zappa_cli.zappa.domain_names["test.example.com"] = "*.example.com" sys.stdout.truncate(0) zappa_cli.certify() zappa_cli.zappa.update_domain_name.assert_called_once() zappa_cli.zappa.update_route53_records.assert_not_called() zappa_cli.zappa.create_domain_name.assert_not_called() log_output = sys.stdout.getvalue() self.assertNotIn("Created a new domain name", log_output) # Test creating domain without Route53 zappa_cli.zappa_settings["stage"].update({ "route53_enabled": False, }) zappa_cli.zappa.reset_mock() zappa_cli.zappa.domain_names["test.example.com"] = "" sys.stdout.truncate(0) zappa_cli.certify() zappa_cli.zappa.create_domain_name.assert_called_once() zappa_cli.zappa.update_route53_records.assert_not_called() zappa_cli.zappa.update_domain_name.assert_not_called() log_output = sys.stdout.getvalue() self.assertIn("Created a new domain name", log_output) finally: sys.stdout = old_stdout @mock.patch('troposphere.Template') @mock.patch('botocore.client') def test_get_domain_respects_route53_setting(self, client, template): zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) zappa_core.apigateway_client = mock.Mock() zappa_core.route53 = mock.Mock() # Check it returns valid and exits early record = zappa_core.get_domain_name('test_domain', route53=False) self.assertIsNotNone(record) zappa_core.apigateway_client.get_domain_name.assert_called_once() zappa_core.route53.list_hosted_zones.assert_not_called() zappa_core.apigateway_client.reset_mock() zappa_core.route53.reset_mock() # And that the route53 path still works zappa_core.route53.list_hosted_zones.return_value = { 'IsTruncated': False, 'HostedZones': [ { 'Id': 'somezone' } ] } zappa_core.route53.list_resource_record_sets.return_value = { 'ResourceRecordSets': [{ 'Type': 'CNAME', 'Name': 'test_domain1' }] } record = zappa_core.get_domain_name('test_domain') self.assertIsNotNone(record) zappa_core.apigateway_client.get_domain_name.assert_called_once() zappa_core.route53.list_hosted_zones.assert_called_once() zappa_core.route53.list_resource_record_sets.assert_called_once_with( HostedZoneId='somezone') @mock.patch('botocore.client') def test_get_all_zones_normal_case(self, client): zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) zappa_core.route53 = mock.Mock() # Check that it handle the normal case zappa_core.route53.list_hosted_zones.return_value = { 'IsTruncated': False, 'HostedZones': [ { 'Id': 'somezone' } ] } zones = zappa_core.get_all_zones() zappa_core.route53.list_hosted_zones.assert_called_with(MaxItems='100') self.assertListEqual(zones['HostedZones'], [{'Id': 'somezone'}]) @mock.patch('botocore.client') def test_get_all_zones_two_pages(self, client): zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) zappa_core.route53 = mock.Mock() # Check that it handle the normal case zappa_core.route53.list_hosted_zones.side_effect = [ { 'IsTruncated': True, 'HostedZones': [ { 'Id': 'zone1' } ], 'NextMarker': "101" }, { 'IsTruncated': False, 'HostedZones': [ { 'Id': 'zone2' } ] } ] zones = zappa_core.get_all_zones() zappa_core.route53.list_hosted_zones.assert_has_calls( [ mock.call(MaxItems='100'), mock.call(MaxItems='100', Marker='101'), ] ) self.assertListEqual(zones['HostedZones'], [{'Id': 'zone1'}, {'Id': 'zone2'}]) ## # Django ## def test_detect_dj(self): # Sanity settings_modules = detect_django_settings() def test_dj_wsgi(self): # Sanity settings_modules = detect_django_settings() settings = """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'alskdfjalsdkf=0*%do-ayvy*m2k=vss*$7)j8q!@u0+d^na7mi2(^!l!d' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'blah.urls' WSGI_APPLICATION = 'hackathon_starter.wsgi.application' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/1.7/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True """ djts = open("dj_test_settings.py", "w") djts.write(settings) djts.close() app = get_django_wsgi('dj_test_settings') try: os.remove('dj_test_settings.py') os.remove('dj_test_settings.pyc') except Exception as e: pass ## # Util / Misc ## def test_human_units(self): human_size(1) human_size(9999999999999) def test_string_to_timestamp(self): boo = string_to_timestamp("asdf") self.assertTrue(boo == 0) yay = string_to_timestamp("1h") self.assertTrue(type(yay) == int) self.assertTrue(yay > 0) yay = string_to_timestamp("4m") self.assertTrue(type(yay) == int) self.assertTrue(yay > 0) yay = string_to_timestamp("1mm") self.assertTrue(type(yay) == int) self.assertTrue(yay > 0) yay = string_to_timestamp("1mm1w1d1h1m1s1ms1us") self.assertTrue(type(yay) == int) self.assertTrue(yay > 0) def test_event_name(self): zappa = Zappa() truncated = zappa.get_event_name("basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf", "this.is.my.dang.function.wassup.yeah.its.long") self.assertTrue(len(truncated) <= 64) self.assertTrue(truncated.endswith("this.is.my.dang.function.wassup.yeah.its.long")) truncated = zappa.get_event_name("basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf", "thisidoasdfaljksdfalskdjfalsdkfjasldkfjalsdkfjalsdkfjalsdfkjalasdfasdfasdfasdklfjasldkfjalsdkjfaslkdfjasldkfjasdflkjdasfskdj") self.assertTrue(len(truncated) <= 64) truncated = zappa.get_event_name("a", "b") self.assertTrue(len(truncated) <= 64) self.assertEqual(truncated, "a-b") def test_hashed_rule_name(self): zappa = Zappa() truncated = zappa.get_event_name( "basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf", "this.is.my.dang.function.wassup.yeah.its.long") self.assertTrue(len(truncated) == 64) rule_name = zappa.get_hashed_rule_name( event=dict(name='some-event-name'), function="this.is.my.dang.function.wassup.yeah.its.long", lambda_name="basldfkjalsdkfjalsdkfjaslkdfjalsdkfjadlsfkjasdlfkjasdlfkjasdflkjasdf-asdfasdfasdfasdfasdf") self.assertTrue(len(rule_name) <= 64) self.assertTrue(rule_name.endswith("-this.is.my.dang.function.wassup.yeah.its.long")) def test_detect_dj(self): # Sanity settings_modules = detect_django_settings() def test_detect_flask(self): # Sanity settings_modules = detect_flask_apps() def test_shameless(self): shamelessly_promote() def test_s3_url_parser(self): remote_bucket, remote_file = parse_s3_url('s3://my-project-config-files/filename.json') self.assertEqual(remote_bucket, 'my-project-config-files') self.assertEqual(remote_file, 'filename.json') remote_bucket, remote_file = parse_s3_url('s3://your-bucket/account.key') self.assertEqual(remote_bucket, 'your-bucket') self.assertEqual(remote_file, 'account.key') remote_bucket, remote_file = parse_s3_url('s3://my-config-bucket/super-secret-config.json') self.assertEqual(remote_bucket, 'my-config-bucket') self.assertEqual(remote_file, 'super-secret-config.json') remote_bucket, remote_file = parse_s3_url('s3://your-secure-bucket/account.key') self.assertEqual(remote_bucket, 'your-secure-bucket') self.assertEqual(remote_file, 'account.key') remote_bucket, remote_file = parse_s3_url('s3://your-bucket/subfolder/account.key') self.assertEqual(remote_bucket, 'your-bucket') self.assertEqual(remote_file, 'subfolder/account.key') # Sad path remote_bucket, remote_file = parse_s3_url('/dev/null') self.assertEqual(remote_bucket, '') def test_remote_env_package(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'deprecated_remote_env' zappa_cli.load_settings('test_settings.json') self.assertEqual('lmbda-env', zappa_cli.stage_config['remote_env_bucket']) self.assertEqual('dev/env.json', zappa_cli.stage_config['remote_env_file']) zappa_cli.create_package() with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip: content = lambda_zip.read('zappa_settings.py') zappa_cli.remove_local_zip() # m = re.search("REMOTE_ENV='(.*)'", content) # self.assertEqual(m.group(1), 's3://lmbda-env/dev/env.json') zappa_cli = ZappaCLI() zappa_cli.api_stage = 'remote_env' zappa_cli.load_settings('test_settings.json') self.assertEqual('s3://lmbda-env/prod/env.json', zappa_cli.stage_config['remote_env']) zappa_cli.create_package() with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip: content = lambda_zip.read('zappa_settings.py') zappa_cli.remove_local_zip() # m = re.search("REMOTE_ENV='(.*)'", content) # self.assertEqual(m.group(1), 's3://lmbda-env/prod/env.json') def test_package_only(self): for delete_local_zip in [True, False]: zappa_cli = ZappaCLI() if delete_local_zip: zappa_cli.api_stage = 'build_package_only_delete_local_zip_true' else: zappa_cli.api_stage = 'build_package_only_delete_local_zip_false' zappa_cli.load_settings('test_settings.json') zappa_cli.package() zappa_cli.on_exit() # simulate the command exits # the zip should never be removed self.assertEqual(os.path.isfile(zappa_cli.zip_path), True) # cleanup os.remove(zappa_cli.zip_path) def test_package_output(self): for delete_local_zip in [True]: zappa_cli = ZappaCLI() if delete_local_zip: zappa_cli.api_stage = 'build_package_only_delete_local_zip_true' zappa_cli.load_settings('test_settings.json') zappa_cli.package(output="oh-boy.zip") zappa_cli.on_exit() # simulate the command exits # the zip should never be removed self.assertEqual(os.path.isfile(zappa_cli.zip_path), True) # cleanup os.remove(zappa_cli.zip_path) def test_package_does_not_load_credentials(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' with mock.patch('zappa.core.Zappa.load_credentials') as LoadCredentialsMock: # load_credentials is set in ZappaCLI.handler; simulates 'zappa package' zappa_cli.load_credentials = False zappa_cli.load_settings('test_settings.json') zappa_cli.package() zappa_cli.on_exit() # simulate the command exits # credentials should not be loaded for package command self.assertFalse(zappa_cli.load_credentials) self.assertFalse(LoadCredentialsMock.called) # cleanup os.remove(zappa_cli.zip_path) def test_flask_logging_bug(self): """ This checks whether Flask can write errors sanely. https://github.com/Miserlou/Zappa/issues/283 """ event = { "body": {}, "headers": {}, "pathParameters": {}, "path": '/', "httpMethod": "GET", "queryStringParameters": {}, "requestContext": {} } old_stderr = sys.stderr sys.stderr = BytesIO() try: environ = create_wsgi_request(event) app = flask.Flask(__name__) with app.request_context(environ): app.logger.error("This is a test") log_output = sys.stderr.getvalue() finally: sys.stderr = old_stderr def test_slim_handler(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'slim_handler' zappa_cli.load_settings('test_settings.json') zappa_cli.create_package() self.assertTrue(os.path.isfile(zappa_cli.handler_path)) self.assertTrue(os.path.isfile(zappa_cli.zip_path)) zappa_cli.remove_local_zip() def test_validate_name(self): fname = 'tests/name_scenarios.json' with open(fname, 'r') as f: scenarios = json.load(f) for scenario in scenarios: value = scenario["value"] is_valid = scenario["is_valid"] if is_valid: assert validate_name(value) else: with self.assertRaises(InvalidAwsLambdaName) as exc: validate_name(value) def test_contains_python_files_or_subdirs(self): self.assertTrue(contains_python_files_or_subdirs('tests/data')) self.assertTrue(contains_python_files_or_subdirs('tests/data/test2')) self.assertFalse(contains_python_files_or_subdirs('tests/data/test1')) def test_conflicts_with_a_neighbouring_module(self): self.assertTrue(conflicts_with_a_neighbouring_module('tests/data/test1')) self.assertFalse(conflicts_with_a_neighbouring_module('tests/data/test2')) def test_settings_py_generation(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('test_settings.json') zappa_cli.create_package() with zipfile.ZipFile(zappa_cli.zip_path, 'r') as lambda_zip: content = lambda_zip.read('zappa_settings.py').decode("utf-8") settings = {} exec(content, globals(), settings) # validate environment variables self.assertIn('ENVIRONMENT_VARIABLES', settings) self.assertEqual(settings['ENVIRONMENT_VARIABLES']['TEST_ENV_VAR'], "test_value") # validate Context header mappings self.assertIn('CONTEXT_HEADER_MAPPINGS', settings) self.assertEqual(settings['CONTEXT_HEADER_MAPPINGS']['CognitoIdentityId'], "identity.cognitoIdentityId") self.assertEqual(settings['CONTEXT_HEADER_MAPPINGS']['APIStage'], "stage") zappa_cli.remove_local_zip() def test_only_ascii_env_var_allowed(self): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('tests/test_non_ascii_environment_var_key.json') with self.assertRaises(ValueError) as context: zappa_cli.create_package() self.assertEqual('Environment variable keys must be ascii.', str(context.exception)) def test_titlecase_keys(self): raw = { 'hOSt': 'github.com', 'ConnECtiOn': 'keep-alive', 'UpGRAde-InSecuRE-ReQueSts': '1', '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', 'cONtENt-TYPe': 'text/html; charset=utf-8', 'aCCEpT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'ACcePT-encoDInG': 'gzip, deflate, br', 'AcCEpT-lAnGUagE': 'en-US,en;q=0.9' } transformed= titlecase_keys(raw) expected = { 'Host': 'github.com', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1', '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', 'Content-Type': 'text/html; charset=utf-8', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.9' } self.assertEqual(expected, transformed) def test_is_valid_bucket_name(self): # Bucket names must be at least 3 and no more than 63 characters long. self.assertFalse(is_valid_bucket_name("ab")) self.assertFalse(is_valid_bucket_name("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefhijlmn")) # Bucket names must not contain uppercase characters or underscores. self.assertFalse(is_valid_bucket_name("aaaBaaa")) self.assertFalse(is_valid_bucket_name("aaa_aaa")) # Bucket names must start with a lowercase letter or number. self.assertFalse(is_valid_bucket_name(".abbbaba")) self.assertFalse(is_valid_bucket_name("abbaba.")) self.assertFalse(is_valid_bucket_name("-abbaba")) self.assertFalse(is_valid_bucket_name("ababab-")) # Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). # Each label must start and end with a lowercase letter or a number. self.assertFalse(is_valid_bucket_name("aaa..bbbb")) self.assertFalse(is_valid_bucket_name("aaa.-bbb.ccc")) self.assertFalse(is_valid_bucket_name("aaa-.bbb.ccc")) # Bucket names must not be formatted as an IP address (for example, 192.168.5.4). self.assertFalse(is_valid_bucket_name("192.168.5.4")) self.assertFalse(is_valid_bucket_name("127.0.0.1")) self.assertFalse(is_valid_bucket_name("255.255.255.255")) self.assertTrue(is_valid_bucket_name("valid-formed-s3-bucket-name")) self.assertTrue(is_valid_bucket_name("worst.bucket.ever")) # TODO: encountered error when vpc_config["SubnetIds"] or vpc_config["SecurityGroupIds"] is missing # We need to make the code more robust in this case and avoid the KeyError def test_zappa_core_deploy_lambda_alb_missing_cert_arn(self): kwargs = { "lambda_arn": "adatok", "lambda_name": "test", "alb_vpc_config": { "SubnetIds": [], "SecurityGroupIds": [], "CertificateArn": None }, 'timeout': '30', } zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) with self.assertRaises(EnvironmentError) as context: zappa_core.deploy_lambda_alb(**kwargs) def test_zappa_core_deploy_lambda_alb(self): kwargs = { "lambda_arn": str(uuid.uuid4()), "lambda_name": str(uuid.uuid4()), "alb_vpc_config": { "SubnetIds": [], "SecurityGroupIds": [], "CertificateArn": str(uuid.uuid4()), }, "timeout": '30', } zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) zappa_core.elbv2_client = botocore.session.get_session().create_client("elbv2") zappa_core.lambda_client = botocore.session.get_session().create_client("lambda") elbv2_stubber = botocore.stub.Stubber(zappa_core.elbv2_client) lambda_stubber = botocore.stub.Stubber(zappa_core.lambda_client) loadbalancer_arn = str(uuid.uuid4()) targetgroup_arn = str(uuid.uuid4()) elbv2_stubber.add_response("create_load_balancer", expected_params={ "Name": kwargs["lambda_name"], "Subnets": kwargs["alb_vpc_config"]["SubnetIds"], "SecurityGroups": kwargs["alb_vpc_config"]["SecurityGroupIds"], "Scheme": "internet-facing", "Type": "application", "IpAddressType": "ipv4", }, service_response={ "LoadBalancers": [{ "LoadBalancerArn": loadbalancer_arn, "DNSName": "test", "VpcId": "test", "State": { "Code": "OK" } }] }, ) elbv2_stubber.add_response("describe_load_balancers", expected_params={ "LoadBalancerArns": [loadbalancer_arn], }, service_response={ "LoadBalancers": [{ "LoadBalancerArn": loadbalancer_arn, "State": { "Code": "active" } }] }, ) elbv2_stubber.add_response("modify_load_balancer_attributes", expected_params={ "LoadBalancerArn": loadbalancer_arn, 'Attributes': [{ 'Key': 'idle_timeout.timeout_seconds', 'Value': kwargs['timeout'] }] }, service_response={ 'Attributes': [{ 'Key': 'idle_timeout.timeout_seconds', 'Value': kwargs['timeout'] }] }, ) elbv2_stubber.add_response("create_target_group", expected_params={ "Name": kwargs["lambda_name"], "TargetType": "lambda", }, service_response={ "TargetGroups": [{ "TargetGroupArn": targetgroup_arn, }] }, ) elbv2_stubber.add_response("modify_target_group_attributes", expected_params={ "TargetGroupArn": targetgroup_arn, 'Attributes': [{ 'Key': 'lambda.multi_value_headers.enabled', 'Value': 'true' }], }, service_response={ 'Attributes': [{ 'Key': 'lambda.multi_value_headers.enabled', 'Value': 'true' }], }, ) lambda_stubber.add_response("add_permission", expected_params={ "Action": "lambda:InvokeFunction", "FunctionName": "{}:{}".format(kwargs["lambda_arn"], ALB_LAMBDA_ALIAS), "Principal": "elasticloadbalancing.amazonaws.com", "SourceArn": targetgroup_arn, "StatementId": kwargs["lambda_name"], }, service_response={}, ) elbv2_stubber.add_response("register_targets", expected_params={ "TargetGroupArn": targetgroup_arn, "Targets": [{"Id": "{}:{}".format(kwargs["lambda_arn"], ALB_LAMBDA_ALIAS)}], }, service_response={}, ) elbv2_stubber.add_response("create_listener", expected_params={ "Certificates": [{"CertificateArn": kwargs["alb_vpc_config"]["CertificateArn"],}], "DefaultActions": [{ "Type": "forward", "TargetGroupArn": targetgroup_arn, }], "LoadBalancerArn": loadbalancer_arn, "Protocol": "HTTPS", "Port": 443, }, service_response={}, ) lambda_stubber.activate() elbv2_stubber.activate() zappa_core.deploy_lambda_alb(**kwargs) def test_zappa_core_undeploy_lambda_alb(self): kwargs = { "lambda_name": str(uuid.uuid4()), } zappa_core = Zappa( boto_session=mock.Mock(), profile_name="test", aws_region="test", load_credentials=False ) zappa_core.elbv2_client = botocore.session.get_session().create_client("elbv2") zappa_core.lambda_client = botocore.session.get_session().create_client("lambda") elbv2_stubber = botocore.stub.Stubber(zappa_core.elbv2_client) lambda_stubber = botocore.stub.Stubber(zappa_core.lambda_client) loadbalancer_arn = str(uuid.uuid4()) listener_arn = str(uuid.uuid4()) function_arn = str(uuid.uuid4()) targetgroup_arn = str(uuid.uuid4()) lambda_stubber.add_response("remove_permission", expected_params={ "FunctionName": kwargs["lambda_name"], "StatementId": kwargs["lambda_name"], }, service_response={}, ) elbv2_stubber.add_response("describe_load_balancers", expected_params={ "Names": [kwargs["lambda_name"]], }, service_response={ "LoadBalancers": [{ "LoadBalancerArn": loadbalancer_arn, }] }, ) elbv2_stubber.add_response("describe_listeners", expected_params={ "LoadBalancerArn": loadbalancer_arn, }, service_response={ "Listeners": [{ "ListenerArn": listener_arn, }] }, ) elbv2_stubber.add_response("delete_listener", expected_params={ "ListenerArn": listener_arn, }, service_response={}, ) elbv2_stubber.add_response("delete_load_balancer", expected_params={ "LoadBalancerArn": loadbalancer_arn, }, service_response={}, ) elbv2_stubber.add_client_error("describe_load_balancers", service_error_code="LoadBalancerNotFound", ) lambda_stubber.add_response("get_function", expected_params={ "FunctionName": kwargs["lambda_name"], }, service_response={ "Configuration": {"FunctionArn": function_arn} }, ) elbv2_stubber.add_response("describe_target_groups", expected_params={ "Names": [kwargs["lambda_name"]], }, service_response={ "TargetGroups": [{"TargetGroupArn": targetgroup_arn}], }, ) elbv2_stubber.add_response("deregister_targets", service_response={}, ) elbv2_stubber.add_client_error("describe_target_health", service_error_code="InvalidTarget", ) elbv2_stubber.add_response("delete_target_group", expected_params={ "TargetGroupArn": targetgroup_arn, }, service_response={}, ) lambda_stubber.activate() elbv2_stubber.activate() zappa_core.undeploy_lambda_alb(**kwargs) @mock.patch('botocore.client') def test_set_lambda_concurrency(self, client): boto_mock = mock.MagicMock() zappa_core = Zappa( boto_session=boto_mock, profile_name="test", aws_region="test", load_credentials=True ) zappa_core.lambda_client.create_function.return_value = { "FunctionArn": "abc", "Version": 1, } access_logging_patch = zappa_core.create_lambda_function( concurrency=5, ) boto_mock.client().put_function_concurrency.assert_called_with( FunctionName="abc", ReservedConcurrentExecutions=5, ) @mock.patch('botocore.client') def test_update_lambda_concurrency(self, client): boto_mock = mock.MagicMock() zappa_core = Zappa( boto_session=boto_mock, profile_name="test", aws_region="test", load_credentials=True ) zappa_core.lambda_client.create_function.return_value = { "FunctionArn": "abc", "Version": 1, } access_logging_patch = zappa_core.update_lambda_function( bucket="test", function_name="abc", concurrency=5, ) boto_mock.client().put_function_concurrency.assert_called_with( FunctionName="abc", ReservedConcurrentExecutions=5, ) boto_mock.client().delete_function_concurrency.assert_not_called() @mock.patch('botocore.client') def test_delete_lambda_concurrency(self, client): boto_mock = mock.MagicMock() zappa_core = Zappa( boto_session=boto_mock, profile_name="test", aws_region="test", load_credentials=True ) zappa_core.lambda_client.create_function.return_value = { "FunctionArn": "abc", "Version": 1, } access_logging_patch = zappa_core.update_lambda_function( bucket="test", function_name="abc", ) boto_mock.client().put_function_concurrency.assert_not_called() boto_mock.client().delete_function_concurrency.assert_called_with( FunctionName="abc", ) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/tests_async.py ================================================ # -*- coding: utf8 -*- import boto3 import mock import os import unittest try: from mock import patch except ImportError: from unittest.mock import patch from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch('time.sleep', return_value=None) # Tests expect us-east-1. # If the user has set a different region in env variables, we set it aside for now and use us-east-1 self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None) os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.start() def tearDown(self): if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.stop() del os.environ['AWS_DEFAULT_REGION'] if self.users_current_region_name is not None: # Give the user their AWS region back, we're done testing with us-east-1. os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name ## # Sanity Tests ## def test_test(self): self.assertTrue(True) self.assertFalse(False) def test_nofails_classes(self): boto_session = boto3.Session(region_name=os.environ['AWS_DEFAULT_REGION']) a = AsyncException() l = LambdaAsyncResponse(boto_session=boto_session) # s = SnsAsyncResponse() s = SnsAsyncResponse(arn="arn:abc:def", boto_session=boto_session) def test_nofails_funcs(self): funk = import_and_get_task("tests.test_app.async_me") get_func_task_path(funk) self.assertEqual(funk.__name__, 'async_me') ## # Functional tests ## def test_sync_call(self): funk = import_and_get_task("tests.test_app.async_me") self.assertEqual(funk.sync('123'), "run async when on lambda 123") def test_async_call_with_defaults(self): """Change a task's asynchronousity at runtime.""" # Import the task first to make sure it is decorated whilst the # environment is unpatched. async_me = import_and_get_task("tests.test_app.async_me") lambda_async_mock = mock.Mock() lambda_async_mock.return_value.send.return_value = "Running async!" with mock.patch.dict('zappa.asynchronous.ASYNC_CLASSES', {'lambda': lambda_async_mock}): # First check that it still runs synchronously by default self.assertEqual(async_me("123"), "run async when on lambda 123") # Now patch the environment to make it look like we are running on # AWS Lambda options = { 'AWS_LAMBDA_FUNCTION_NAME': 'MyLambda', 'AWS_REGION': 'us-east-1' } with mock.patch.dict(os.environ, options): self.assertEqual(async_me("qux"), "Running async!") # And check the dispatching class got called correctly lambda_async_mock.assert_called_once() lambda_async_mock.assert_called_with(aws_region='us-east-1', capture_response=False, lambda_function_name="MyLambda") lambda_async_mock.return_value.send.assert_called_with( get_func_task_path(async_me), ("qux",), {}) ================================================ FILE: tests/tests_async_old.py ================================================ # -*- coding: utf8 -*- import boto3 import mock import os import unittest try: from mock import patch except ImportError: from unittest.mock import patch # NOTE: zappa.async is deprecated. # It cannot be imported normally with Python 3.7 zappa_async = __import__('zappa.async', fromlist=[ 'AsyncException', 'LambdaAsyncResponse', 'SnsAsyncResponse', 'import_and_get_task', 'get_func_task_path' ]) AsyncException = zappa_async.AsyncException LambdaAsyncResponse = zappa_async.LambdaAsyncResponse SnsAsyncResponse = zappa_async.SnsAsyncResponse import_and_get_task = zappa_async.import_and_get_task get_func_task_path = zappa_async.get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch('time.sleep', return_value=None) # Tests expect us-east-1. # If the user has set a different region in env variables, we set it aside for now and use us-east-1 self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None) os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.start() def tearDown(self): if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.stop() del os.environ['AWS_DEFAULT_REGION'] if self.users_current_region_name is not None: # Give the user their AWS region back, we're done testing with us-east-1. os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name ## # Sanity Tests ## def test_test(self): self.assertTrue(True) self.assertFalse(False) def test_nofails_classes(self): boto_session = boto3.Session(region_name=os.environ['AWS_DEFAULT_REGION']) a = AsyncException() l = LambdaAsyncResponse(boto_session=boto_session) # s = SnsAsyncResponse() s = SnsAsyncResponse(arn="arn:abc:def", boto_session=boto_session) def test_nofails_funcs(self): funk = import_and_get_task("tests.test_app.async_me") get_func_task_path(funk) self.assertEqual(funk.__name__, 'async_me') ## # Functional tests ## def test_sync_call(self): funk = import_and_get_task("tests.test_app.async_me") self.assertEqual(funk.sync('123'), "run async when on lambda 123") def test_async_call_with_defaults(self): """Change a task's asynchronousity at runtime.""" # Import the task first to make sure it is decorated whilst the # environment is unpatched. async_me = import_and_get_task("tests.test_app.async_me") lambda_async_mock = mock.Mock() lambda_async_mock.return_value.send.return_value = "Running async!" with mock.patch.dict('zappa.async.ASYNC_CLASSES', {'lambda': lambda_async_mock}): # First check that it still runs synchronously by default self.assertEqual(async_me("123"), "run async when on lambda 123") # Now patch the environment to make it look like we are running on # AWS Lambda options = { 'AWS_LAMBDA_FUNCTION_NAME': 'MyLambda', 'AWS_REGION': 'us-east-1' } with mock.patch.dict(os.environ, options): self.assertEqual(async_me("qux"), "Running async!") # And check the dispatching class got called correctly lambda_async_mock.assert_called_once() lambda_async_mock.assert_called_with(aws_region='us-east-1', capture_response=False, lambda_function_name="MyLambda") lambda_async_mock.return_value.send.assert_called_with( get_func_task_path(async_me), ("qux",), {}) ================================================ FILE: tests/tests_docs.py ================================================ import unittest import re from os import path, environ from copy import copy DIR = path.realpath(path.dirname(__file__)) class TestDocs(unittest.TestCase): def test_readmetoc(self): # this test serves as a reminder to update the README toc. # More information here: https://github.com/Miserlou/Zappa/issues/1228 # borrowed in part from https://github.com/PrzemekWirkus/git-toc/blob/729fe22417d2b310b4131bb592cd18b235633a8c/gittoc/gittoc.py (Apache license) start_marker = "\n" end_marker = "\n" template = '''{prologue}{start_marker} {toc} {end_marker}{epilogue}''' prologue = '' toc = [] epilogue = '' state = "prologue" with open(path.join(path.dirname(DIR), "README.md")) as f: contents = f.readlines() old_readme = copy(contents) state = "prologue" for line in contents: if state == "prologue": if line == start_marker: state = "toc" else: prologue = prologue + line elif state == "toc": # we don't need to capture the old TOC if line == end_marker: state = "epilogue" elif state == "epilogue": epilogue = epilogue + line # we only capture TOC contents *after* the TOC markers m = re.search('^([#]{1,6}) (.*)$', line) if m is not None and m.groups(): header = m.group(1) header_text = m.group(2) header_text_strip = re.sub("[^a-zA-Z0-9-_ ]", "", header_text) if header_text_strip == "": # skip empty header continue header_text_no_spaces = header_text_strip.replace(' ','-').lower() toc_line = " " * (len(header)-2) + "- [%s](#%s)"% (header_text, header_text_no_spaces.lower()) toc.append(toc_line) new_readme = template.format( toc="\n".join(toc), start_marker=start_marker, end_marker=end_marker, prologue=prologue, epilogue=epilogue ) if environ.get('ZAPPA_TEST_SAVE_README_NEW'): with open(path.join(path.dirname(DIR), "README.test.md"), "w") as f: f.write(new_readme) msg = "README.test.md written so you can manually compare." else: msg = "You can set environ[ZAPPA_TEST_SAVE_README_NEW]=1 to generate\n" \ " README.test.md to manually compare." self.assertEquals("".join(old_readme), new_readme, "README doesn't match after regenerating TOC\n\n" \ "You need to run doctoc after a heading change.\n{}".format(msg)) ================================================ FILE: tests/tests_middleware.py ================================================ # -*- coding: utf8 -*- import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): """ These tests can cheat and have access to the inner status and headers, through _start_response. """ def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list() self.status = list() def _start_response(self, status, headers, exc_info=None): self.status[:] = [status] self.headers[:] = headers def test_all_casings(self): # 2^9 input_string = "Set-Cookie" x = 0 for casing in all_casings(input_string): x = x + 1 self.assertEqual(x, 512) # 2^0 input_string = "" x = 0 for casing in all_casings(input_string): x = x + 1 self.assertEqual(x, 1) def test_wsgi_middleware_uglystring(self): ugly_string = "˝ÓÔÒÚÆ☃ЗИЙКЛМФХЦЧШ차를 타고 온 펲시맨(╯°□°)╯︵ ┻━┻)" # Pass some unicode through the middleware body def simple_app(environ, start_response): # String of weird characters status = '200 OK' response_headers = [] start_response(status, response_headers) return [ugly_string] # Wrap the app with the middleware app = ZappaWSGIMiddleware(simple_app) # Call with empty WSGI Environment resp = app(dict(), self._start_response) print(''.join(resp)) # Pass some unicode through the middleware headers def simple_app(environ, start_response): # String of weird characters status = '301 Moved Permanently' response_headers = [('Location', f'http://zappa.com/elsewhere{ugly_string}')] start_response(status, response_headers) return [ugly_string] # Wrap the app with the middleware app = ZappaWSGIMiddleware(simple_app) # Call with empty WSGI Environment resp = app(dict(), self._start_response) print(''.join(resp)) def test_wsgi_authorizer_handling(self): # With user event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { 'authorizer': { 'principalId': 'user1' } }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) self.assertEqual(environ['REMOTE_USER'], 'user1') # With empty authorizer, should not include REMOTE_USER event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { 'authorizer': { 'principalId': '' } }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) user = environ.get('REMOTE_USER', 'no_user') self.assertEqual(user, 'no_user') # With missing authorizer, should not include REMOTE_USER event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': {}, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) user = environ.get('REMOTE_USER', 'no_user') self.assertEqual(user, 'no_user') # With empty authorizer, should not include REMOTE_USER event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { 'authorizer': {} }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) user = environ.get('REMOTE_USER', 'no_user') self.assertEqual(user, 'no_user') def test_wsgi_map_context_headers_handling(self): # Validate a single context value mapping is translated into a HTTP header event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { 'authorizer': { 'principalId': 'user1' }, }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False, context_header_mappings={'PrincipalId': 'authorizer.principalId'}) self.assertEqual(environ['HTTP_PRINCIPALID'], 'user1') # Validate multiple mappings with an invalid mapping # Invalid mapping should be ignored event = { 'httpMethod': 'GET', 'queryStringParameters': None, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { "resourceId": "123456", "apiId": "1234567890", "resourcePath": "/{proxy+}", "httpMethod": "POST", "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", "accountId": "123456789012", "identity": { "userAgent": "Custom User Agent String", "cognitoIdentityPoolId": "userpoolID", "cognitoIdentityId": "myCognitoID", "sourceIp": "127.0.0.1", }, "stage": "prod" }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False, context_header_mappings={'CognitoIdentityID': 'identity.cognitoIdentityId', 'APIStage': 'stage', 'InvalidValue': 'identity.cognitoAuthenticationType', 'OtherInvalid': 'nothinghere'}) self.assertEqual(environ['HTTP_COGNITOIDENTITYID'], 'myCognitoID') self.assertEqual(environ['HTTP_APISTAGE'], 'prod') self.assertNotIn('HTTP_INVALIDVALUE', environ) self.assertNotIn('HTTP_OTHERINVALID', environ) def test_should_allow_empty_query_params(self): event = { 'httpMethod': 'GET', 'queryStringParameters': {}, 'multiValueQueryStringParameters': {}, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { "resourceId": "123456", "apiId": "1234567890", "resourcePath": "/{proxy+}", "httpMethod": "POST", "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", "accountId": "123456789012", "identity": { "userAgent": "Custom User Agent String", "cognitoIdentityPoolId": "userpoolID", "cognitoIdentityId": "myCognitoID", "sourceIp": "127.0.0.1", }, "stage": "prod" }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) self.assertEqual(environ['QUERY_STRING'], '') def test_should_handle_multi_value_query_string_params(self): event = { 'httpMethod': 'GET', 'queryStringParameters': {}, 'multiValueQueryStringParameters': { 'foo': [1, 2] }, 'path': '/v1/runs', 'params': {}, 'body': {}, 'headers': { 'Content-Type': 'application/json' }, 'pathParameters': { 'proxy': 'v1/runs' }, 'requestContext': { "resourceId": "123456", "apiId": "1234567890", "resourcePath": "/{proxy+}", "httpMethod": "POST", "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", "accountId": "123456789012", "identity": { "userAgent": "Custom User Agent String", "cognitoIdentityPoolId": "userpoolID", "cognitoIdentityId": "myCognitoID", "sourceIp": "127.0.0.1", }, "stage": "prod" }, 'query': {} } environ = create_wsgi_request(event, script_name='http://zappa.com/', trailing_slash=False) self.assertEqual(environ['QUERY_STRING'], 'foo=1&foo=2') ================================================ FILE: tests/tests_placebo.py ================================================ # -*- coding: utf8 -*- import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import (add_event_source, remove_event_source) from zappa.core import Zappa def random_string(length): return ''.join(random.choice(string.printable) for _ in range(length)) class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch('time.sleep', return_value=None) # Tests expect us-east-1. # If the user has set a different region in env variables, we set it aside for now and use us-east-1 self.users_current_region_name = os.environ.get('AWS_DEFAULT_REGION', None) os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.start() def tearDown(self): if not os.environ.get('PLACEBO_MODE') == 'record': self.sleep_patch.stop() del os.environ['AWS_DEFAULT_REGION'] if self.users_current_region_name is not None: # Give the user their AWS region back, we're done testing with us-east-1. os.environ['AWS_DEFAULT_REGION'] = self.users_current_region_name @placebo_session def test_upload_remove_s3(self, session): bucket_name = 'test_zappa_upload_s3' z = Zappa(session) zip_path = z.create_lambda_zip(minify=False) res = z.upload_to_s3(zip_path, bucket_name) self.assertTrue(res) s3 = session.resource('s3') # will throw ClientError with 404 if bucket doesn't exist s3.meta.client.head_bucket(Bucket=bucket_name) # will throw ClientError with 404 if object doesn't exist s3.meta.client.head_object( Bucket=bucket_name, Key=zip_path, ) res = z.remove_from_s3(zip_path, bucket_name) self.assertTrue(res) fail = z.upload_to_s3('/tmp/this_isnt_real', bucket_name) self.assertFalse(fail) #Will graciouly handle quirky S3 behavior on 'us-east-1' region name' z.aws_region = 'us-east-1' res = z.upload_to_s3(zip_path, bucket_name) os.remove(zip_path) self.assertTrue(res) @placebo_session def test_copy_on_s3(self, session): bucket_name = 'test_zappa_upload_s3' z = Zappa(session) zip_path = z.create_lambda_zip(minify=False) res = z.upload_to_s3(zip_path, bucket_name) self.assertTrue(res) s3 = session.resource('s3') # will throw ClientError with 404 if bucket doesn't exist s3.meta.client.head_bucket(Bucket=bucket_name) # will throw ClientError with 404 if object doesn't exist s3.meta.client.head_object( Bucket=bucket_name, Key=zip_path, ) zp = 'copy_' + zip_path res = z.copy_on_s3(zip_path, zp, bucket_name) os.remove(zip_path) self.assertTrue(res) @placebo_session def test_create_lambda_function_s3(self, session): bucket_name = 'lmbda' zip_path = 'Spheres-dev-1454694878.zip' z = Zappa(session) z.aws_region = 'us-east-1' z.load_credentials(session) z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' arn = z.create_lambda_function( bucket=bucket_name, s3_key=zip_path, function_name='test_lmbda_function55', handler='runme.lambda_handler' ) arn = z.update_lambda_function( bucket=bucket_name, s3_key=zip_path, function_name='test_lmbda_function55', ) @placebo_session def test_create_lambda_function_local(self, session): bucket_name = 'lmbda' local_file = 'Spheres-dev-1454694878.zip' z = Zappa(session) z.aws_region = 'us-east-1' z.load_credentials(session) z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' arn = z.create_lambda_function( bucket=bucket_name, local_zip=local_file, function_name='test_lmbda_function55', handler='runme.lambda_handler' ) arn = z.update_lambda_function( bucket=bucket_name, local_zip=local_file, function_name='test_lmbda_function55', ) @placebo_session def test_rollback_lambda_function_version(self, session): z = Zappa(session) z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution' function_name = 'django-helloworld-unicode' too_many_versions = z.rollback_lambda_function_version(function_name, 99999) self.assertFalse(too_many_versions) function_arn = z.rollback_lambda_function_version(function_name, 1) @placebo_session def test_invoke_lambda_function(self, session): z = Zappa(session) z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution' function_name = 'django-helloworld-unicode' payload = '{"event": "hello"}' response = z.invoke_lambda_function(function_name, payload) @placebo_session def test_create_iam_roles(self, session): z = Zappa(session) arn, updated = z.create_iam_roles() self.assertEqual(arn, "arn:aws:iam::123:role/{}".format(z.role_name)) @placebo_session def test_get_api_url(self, session): z = Zappa(session) z.credentials_arn = 'arn:aws:iam::724336686645:role/ZappaLambdaExecution' url = z.get_api_url('Spheres-demonstration', 'demonstration') @placebo_session def test_fetch_logs(self, session): z = Zappa(session) z.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' events = z.fetch_logs('Spheres-demonstration') self.assertTrue(events is not None) ## # Handler ## @placebo_session def test_handler(self, session): # Init will test load_remote_settings lh = LambdaHandler('test_settings', session=session) # Annoyingly, this will fail during record, but # the result will actually be okay to use in playback. # See: https://github.com/garnaat/placebo/issues/48 self.assertEqual(os.environ['hello'], 'world') event = { "body": {}, "headers": {}, "params": { "parameter_1": "asdf1", "parameter_2": "asdf2", }, "method": "GET", "query": {} } lh.handler(event, None) # Test scheduled event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'detail-type': 'Scheduled Event', 'source': 'aws.events', 'version': '0', 'time': '2016-05-10T21:05:39Z', 'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55', 'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me'] } lh.handler(event, None) # Test command event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'command': 'test_settings.command', 'source': 'aws.events', 'version': '0', 'time': '2016-05-10T21:05:39Z', 'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55', 'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me'] } lh.handler(event, None) # Test command for async event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'command': 'zappa.asynchronous.route_lambda_task', 'task_path': 'tests.test_app.async_me', 'args': ['xxx'], 'kwargs': {}, 'source': 'aws.events', 'version': '0', 'time': '2016-05-10T21:05:39Z', 'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55', } self.assertEqual('run async when on lambda xxx', lh.handler(event, None)) event['kwargs'] = {'foo': 'bar'} self.assertEqual('run async when on lambda xxxbar', lh.handler(event, None)) # Test raw_command event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'raw_command': 'print("check one two")', 'source': 'aws.events', 'version': '0', 'time': '2016-05-10T21:05:39Z', 'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55', 'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me'] } lh.handler(event, None) # Test AWS S3 event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'Records': [{'s3': {'configurationId': 'test_project:test_settings.aws_s3_event'}}], 'source': 'aws.events', 'version': '0', 'time': '2016-05-10T21:05:39Z', 'id': '0d6a6db0-d5e7-4755-93a0-750a8bf49d55', 'resources': ['arn:aws:events:us-east-1:72333333333:rule/tests.test_app.schedule_me'] } self.assertEqual("AWS S3 EVENT", lh.handler(event, None)) # Test AWS SNS event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'Records': [ { 'EventVersion': '1.0', 'EventSource': 'aws:sns', 'EventSubscriptionArn': 'arn:aws:sns:EXAMPLE', 'Sns': { 'SignatureVersion': '1', 'Timestamp': '1970-01-01T00:00:00.000Z', 'Signature': 'EXAMPLE', 'SigningCertUrl': 'EXAMPLE', 'MessageId': '95df01b4-ee98-5cb9-9903-4c221d41eb5e', 'Message': 'Hello from SNS!', 'Subject': 'TestInvoke', 'Type': 'Notification', 'UnsubscribeUrl': 'EXAMPLE', 'TopicArn': 'arn:aws:sns:1', 'MessageAttributes': { 'Test': {'Type': 'String', 'Value': 'TestString'}, 'TestBinary': {'Type': 'Binary', 'Value': 'TestBinary'} } } } ] } self.assertEqual("AWS SNS EVENT", lh.handler(event, None)) # Test AWS SNS event event = { 'account': '72333333333', 'region': 'us-east-1', 'detail': {}, 'Records': [ { 'EventVersion': '1.0', 'EventSource': 'aws:sns', 'EventSubscriptionArn': 'arn:aws:sns:EXAMPLE', 'Sns': { 'SignatureVersion': '1', 'Timestamp': '1970-01-01T00:00:00.000Z', 'Signature': 'EXAMPLE', 'SigningCertUrl': 'EXAMPLE', 'MessageId': '95df01b4-ee98-5cb9-9903-4c221d41eb5e', 'Message': '{"args": ["arg1", "arg2"], "command": "zappa.asynchronous.route_sns_task", ' '"task_path": "test_settings.aws_async_sns_event", "kwargs": {"arg3": "varg3"}}', 'Subject': 'TestInvoke', 'Type': 'Notification', 'UnsubscribeUrl': 'EXAMPLE', 'MessageAttributes': { 'Test': {'Type': 'String', 'Value': 'TestString'}, 'TestBinary': {'Type': 'Binary', 'Value': 'TestBinary'} } } } ] } self.assertEqual("AWS ASYNC SNS EVENT", lh.handler(event, None)) # Test AWS DynamoDB event event = { 'Records': [ { 'eventID': '1', 'eventVersion': '1.0', 'dynamodb': { 'Keys': {'Id': {'N': '101'}}, 'NewImage': {'Message': {'S': 'New item!'}, 'Id': {'N': '101'}}, 'StreamViewType': 'NEW_AND_OLD_IMAGES', 'SequenceNumber': '111', 'SizeBytes': 26 }, 'awsRegion': 'us-west-2', 'eventName': 'INSERT', 'eventSourceARN': 'arn:aws:dynamodb:1', 'eventSource': 'aws:dynamodb' } ] } self.assertEqual("AWS DYNAMODB EVENT", lh.handler(event, None)) # Test AWS kinesis event event = { 'Records': [ { 'eventID': 'shardId-000000000000:49545115243490985018280067714973144582180062593244200961', 'eventVersion': '1.0', 'kinesis': { 'partitionKey': 'partitionKey-3', 'data': 'SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=', 'kinesisSchemaVersion': '1.0', 'sequenceNumber': '49545115243490985018280067714973144582180062593244200961' }, 'invokeIdentityArn': 'arn:aws:iam::EXAMPLE', 'eventName': 'aws:kinesis:record', 'eventSourceARN': 'arn:aws:kinesis:1', 'eventSource': 'aws:kinesis', 'awsRegion': 'us-east-1' } ] } self.assertEqual("AWS KINESIS EVENT", lh.handler(event, None)) # Test AWS SQS event event = { "Records": [ { "messageId": "c80e8021-a70a-42c7-a470-796e1186f753", "receiptHandle": "AQEBJQ+/u6NsnT5t8Q/VbVxgdUl4TMKZ5FqhksRdIQvLBhwNvADoBxYSOVeCBXdnS9P+erlTtwEALHsnBXynkfPLH3BOUqmgzP25U8kl8eHzq6RAlzrSOfTO8ox9dcp6GLmW33YjO3zkq5VRYyQlJgLCiAZUpY2D4UQcE5D1Vm8RoKfbE+xtVaOctYeINjaQJ1u3mWx9T7tork3uAlOe1uyFjCWU5aPX/1OHhWCGi2EPPZj6vchNqDOJC/Y2k1gkivqCjz1CZl6FlZ7UVPOx3AMoszPuOYZ+Nuqpx2uCE2MHTtMHD8PVjlsWirt56oUr6JPp9aRGo6bitPIOmi4dX0FmuMKD6u/JnuZCp+AXtJVTmSHS8IXt/twsKU7A+fiMK01NtD5msNgVPoe9JbFtlGwvTQ==", "body": "{\"foo\":\"bar\"}", "attributes": { "ApproximateReceiveCount": "3", "SentTimestamp": "1529104986221", "SenderId": "594035263019", "ApproximateFirstReceiveTimestamp": "1529104986230" }, "messageAttributes": {}, "md5OfBody": "9bb58f26192e4ba00f01e2e7b136bbd8", "eventSource": "aws:sqs", "eventSourceARN": "arn:aws:sqs:1", "awsRegion": "us-east-1" } ] } self.assertEqual("AWS SQS EVENT", lh.handler(event, None)) # Test Authorizer event event = {'authorizationToken': 'hubtoken1', 'methodArn': 'arn:aws:execute-api:us-west-2:1234:xxxxx/dev/GET/v1/endpoint/param', 'type': 'TOKEN'} self.assertEqual("AUTHORIZER_EVENT", lh.handler(event, None)) # Ensure Zappa does return 401 if no function was defined. lh.settings.AUTHORIZER_FUNCTION = None with self.assertRaisesRegexp(Exception, 'Unauthorized'): lh.handler(event, None) # Unhandled event event = { 'Records': [ { 'eventID': 'shardId-000000000000:49545115243490985018280067714973144582180062593244200961', 'eventVersion': '1.0', 'kinesis': { 'partitionKey': 'partitionKey-3', 'data': 'SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=', 'kinesisSchemaVersion': '1.0', 'sequenceNumber': '49545115243490985018280067714973144582180062593244200961' }, 'eventSourceARN': 'bad:arn:1', } ] } self.assertIsNone(lh.handler(event, None)) ## # CLI ## @placebo_session def test_cli_aws(self, session): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.api_key_required = True zappa_cli.authorization_type = 'NONE' zappa_cli.load_settings('test_settings.json', session) zappa_cli.zappa.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' zappa_cli.deploy() zappa_cli.update() zappa_cli.rollback(1) zappa_cli.tail(since=0, filter_pattern='', keep_open=False) zappa_cli.schedule() zappa_cli.unschedule() zappa_cli.undeploy(no_confirm=True, remove_logs=True) @placebo_session def test_cli_aws_status(self, session): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.load_settings('test_settings.json', session) zappa_cli.api_stage = 'devor' zappa_cli.lambda_name = 'baby-flask-devor' zappa_cli.zappa.credentials_arn = 'arn:aws:iam::12345:role/ZappaLambdaExecution' resp = zappa_cli.status() ## # Let's Encrypt / ACME ## ## # Django ## ## # Util / Misc ## @placebo_session def test_add_event_source(self, session): event_source = {'arn': 'blah:blah:blah:blah', 'events': [ "s3:ObjectCreated:*" ]} # Sanity. This should fail. try: es = add_event_source(event_source, 'blah:blah:blah:blah', 'test_settings.callback', session) self.fail("Success should have failed.") except ValueError: pass event_source = {'arn': 's3:s3:s3:s3', 'events': [ "s3:ObjectCreated:*" ]} add_event_source(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True) remove_event_source(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True) # get_event_source_status(event_source, 'lambda:lambda:lambda:lambda', 'test_settings.callback', session, dry=True) @placebo_session def test_cognito_trigger(self, session): z = Zappa(session) 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') @placebo_session def test_cognito_trigger_existing(self, session): z = Zappa(session) 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') @placebo_session def test_cli_cognito_triggers(self, session): zappa_cli = ZappaCLI() zappa_cli.api_stage = 'ttt888' zappa_cli.api_key_required = True zappa_cli.load_settings('test_settings.json', session) zappa_cli.lambda_arn = 'arn:aws:lambda:us-east-1:12345:function:Zappa-Trigger-Test' zappa_cli.update_cognito_triggers() @placebo_session def test_cognito_trigger_existing_UnusedAccountValidityDays(self, session): z = Zappa(session) 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') if __name__ == '__main__': unittest.main() ================================================ FILE: tests/utils.py ================================================ import placebo import boto3 import os import functools from contextlib import contextmanager from mock import patch, MagicMock try: file except NameError: # builtin 'file' was removed in Python 3 from io import IOBase as file PLACEBO_DIR = os.path.join(os.path.dirname(__file__), 'placebo') def placebo_session(function): """ Decorator to help do testing with placebo. Simply wrap the function you want to test and make sure to add a "session" argument so the decorator can pass the placebo session. Accepts the following environment variables to configure placebo: PLACEBO_MODE: set to "record" to record AWS calls and save them PLACEBO_PROFILE: optionally set an AWS credential profile to record with """ @functools.wraps(function) def wrapper(*args, **kwargs): session_kwargs = { 'region_name': os.environ.get('AWS_DEFAULT_REGION', 'us-east-1') } profile_name = os.environ.get('PLACEBO_PROFILE', None) if profile_name: session_kwargs['profile_name'] = profile_name session = boto3.Session(**session_kwargs) self = args[0] prefix = self.__class__.__name__ + '.' + function.__name__ record_dir = os.path.join(PLACEBO_DIR, prefix) if not os.path.exists(record_dir): os.makedirs(record_dir) pill = placebo.attach(session, data_path=record_dir) if os.environ.get('PLACEBO_MODE') == 'record': pill.record() else: pill.playback() kwargs['session'] = session return function(*args, **kwargs) return wrapper @contextmanager def patch_open(): """Patch open() to allow mocking both open() itself and the file that is yielded. Yields the mock for "open" and "file", respectively.""" mock_open = MagicMock(spec=open) mock_file = MagicMock(spec=file) @contextmanager def stub_open(*args, **kwargs): mock_open(*args, **kwargs) yield mock_file with patch('__builtin__.open', stub_open): yield mock_open, mock_file ================================================ FILE: zappa/__init__.py ================================================ import sys SUPPORTED_VERSIONS = [(3, 6), (3, 7), (3, 8)] if sys.version_info[:2] not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(*version) for version in SUPPORTED_VERSIONS] err_msg = ('This version of Python ({}.{}) is not supported!\n'.format(*sys.version_info) + 'Zappa (and AWS Lambda) support the following versions of Python: {}'.format(formatted_supported_versions)) raise RuntimeError(err_msg) __version__ = '0.52.0' ================================================ FILE: zappa/async.py ================================================ # -*- coding: utf-8 -*- import warnings warnings.warn('Module "zappa.async" is deprecated; please use "zappa.asynchronous" instead.', category=DeprecationWarning) from .asynchronous import * ================================================ FILE: zappa/asynchronous.py ================================================ """ Zappa Asynchronous Tasks Example: ``` from zappa.asynchronous import task @task(service='sns') def my_async_func(*args, **kwargs): dosomething() ``` For SNS, you can also pass an `arn` argument to task() which will specify which SNS path to send it to. Without `service='sns'`, the default service is 'lambda' which will call the method in an asynchronous lambda call. The following restrictions apply: * function must have a clean import path -- i.e. no closures, lambdas, or methods. * args and kwargs must be JSON-serializable. * The JSON-serialized form must be within the size limits for Lambda (128K) or SNS (256K) events. Discussion of this comes from: https://github.com/Miserlou/Zappa/issues/61 https://github.com/Miserlou/Zappa/issues/603 https://github.com/Miserlou/Zappa/pull/694 https://github.com/Miserlou/Zappa/pull/732 https://github.com/Miserlou/Zappa/issues/840 ## Full lifetime of an asynchronous dispatch: 1. In a file called `foo.py`, there is the following code: ``` from zappa.asynchronous import task @task def my_async_func(*args, **kwargs): return sum(args) ``` 2. The decorator desugars to: `my_async_func = task(my_async_func)` 3. Somewhere else, the code runs: `res = my_async_func(1,2)` really calls task's `_run_async(1,2)` with `func` equal to the original `my_async_func` If we are running in Lambda, this runs: LambdaAsyncResponse().send('foo.my_async_func', (1,2), {}) and returns the LambdaAsyncResponse instance to the local context. That local context, can, e.g. test for `res.sent` to confirm it was dispatched correctly. 4. LambdaAsyncResponse.send invoked the currently running AWS Lambda instance with the json message: ``` { "command": "zappa.asynchronous.route_lambda_task", "task_path": "foo.my_async_func", "args": [1,2], "kwargs": {} } ``` 5. The new lambda instance is invoked with the message above, and Zappa runs its usual bootstrapping context, and inside zappa.handler, the existence of the 'command' key in the message dispatches the full message to zappa.asynchronous.route_lambda_task, which in turn calls `run_message(message)` 6. `run_message` loads the task_path value to load the `func` from `foo.py`. We should note that my_async_func is wrapped by @task in this new context, as well. However, @task also decorated `my_async_func.sync()` to run the original function synchronously. `run_message` duck-types the method and finds the `.sync` attribute and runs that instead -- thus we do not infinitely dispatch. If `my_async_func` had code to dispatch other functions inside its synchronous portions (or even call itself recursively), those *would* be dispatched asynchronously, unless, of course, they were called by: `my_async_func.sync(1,2)` in which case it would run synchronously and in the current lambda function. """ import boto3 import botocore from functools import update_wrapper, wraps import importlib import inspect import json import os import uuid import time from .utilities import get_topic_name try: from zappa_settings import ASYNC_RESPONSE_TABLE except ImportError: ASYNC_RESPONSE_TABLE = None # Declare these here so they're kept warm. try: aws_session = boto3.Session() LAMBDA_CLIENT = aws_session.client('lambda') SNS_CLIENT = aws_session.client('sns') STS_CLIENT = aws_session.client('sts') DYNAMODB_CLIENT = aws_session.client('dynamodb') except botocore.exceptions.NoRegionError as e: # pragma: no cover # This can happen while testing on Travis, but it's taken care of # during class initialization. pass ## # Response and Exception classes ## LAMBDA_ASYNC_PAYLOAD_LIMIT = 256000 SNS_ASYNC_PAYLOAD_LIMIT = 256000 class AsyncException(Exception): # pragma: no cover """ Simple exception class for async tasks. """ pass class LambdaAsyncResponse: """ Base Response Dispatcher class Can be used directly or subclassed if the method to send the message is changed. """ def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs): """ """ if kwargs.get('boto_session'): self.client = kwargs.get('boto_session').client('lambda') else: # pragma: no cover self.client = LAMBDA_CLIENT self.lambda_function_name = lambda_function_name self.aws_region = aws_region if capture_response: if ASYNC_RESPONSE_TABLE is None: print( "Warning! Attempted to capture a response without " "async_response_table configured in settings (you won't " "capture async responses)." ) capture_response = False self.response_id = "MISCONFIGURED" else: self.response_id = str(uuid.uuid4()) else: self.response_id = None self.capture_response = capture_response def send(self, task_path, args, kwargs): """ Create the message object and pass it to the actual sender. """ message = { 'task_path': task_path, 'capture_response': self.capture_response, 'response_id': self.response_id, 'args': args, 'kwargs': kwargs } self._send(message) return self def _send(self, message): """ Given a message, directly invoke the lamdba function for this task. """ message['command'] = 'zappa.asynchronous.route_lambda_task' payload = json.dumps(message).encode('utf-8') if len(payload) > LAMBDA_ASYNC_PAYLOAD_LIMIT: # pragma: no cover raise AsyncException("Payload too large for async Lambda call") self.response = self.client.invoke( FunctionName=self.lambda_function_name, InvocationType='Event', #makes the call async Payload=payload ) self.sent = (self.response.get('StatusCode', 0) == 202) class SnsAsyncResponse(LambdaAsyncResponse): """ Send a SNS message to a specified SNS topic Serialise the func path and arguments """ def __init__(self, lambda_function_name=None, aws_region=None, capture_response=False, **kwargs): self.lambda_function_name = lambda_function_name self.aws_region = aws_region if kwargs.get('boto_session'): self.client = kwargs.get('boto_session').client('sns') else: # pragma: no cover self.client = SNS_CLIENT if kwargs.get('arn'): self.arn = kwargs.get('arn') else: if kwargs.get('boto_session'): sts_client = kwargs.get('boto_session').client('sts') else: sts_client = STS_CLIENT AWS_ACCOUNT_ID = sts_client.get_caller_identity()['Account'] self.arn = 'arn:aws:sns:{region}:{account}:{topic_name}'.format( region=self.aws_region, account=AWS_ACCOUNT_ID, topic_name=get_topic_name(self.lambda_function_name) ) # Issue: https://github.com/Miserlou/Zappa/issues/1209 # TODO: Refactor self.capture_response = capture_response if capture_response: if ASYNC_RESPONSE_TABLE is None: print( "Warning! Attempted to capture a response without " "async_response_table configured in settings (you won't " "capture async responses)." ) capture_response = False self.response_id = "MISCONFIGURED" else: self.response_id = str(uuid.uuid4()) else: self.response_id = None self.capture_response = capture_response def _send(self, message): """ Given a message, publish to this topic. """ message['command'] = 'zappa.asynchronous.route_sns_task' payload = json.dumps(message).encode('utf-8') if len(payload) > LAMBDA_ASYNC_PAYLOAD_LIMIT: # pragma: no cover raise AsyncException("Payload too large for SNS") self.response = self.client.publish( TargetArn=self.arn, Message=payload ) self.sent = self.response.get('MessageId') ## # Aync Routers ## ASYNC_CLASSES = { 'lambda': LambdaAsyncResponse, 'sns': SnsAsyncResponse, } def route_lambda_task(event, context): """ Deserialises the message from event passed to zappa.handler.run_function imports the function, calls the function with args """ message = event return run_message(message) def route_sns_task(event, context): """ Gets SNS Message, deserialises the message, imports the function, calls the function with args """ record = event['Records'][0] message = json.loads( record['Sns']['Message'] ) return run_message(message) def run_message(message): """ Runs a function defined by a message object with keys: 'task_path', 'args', and 'kwargs' used by lambda routing and a 'command' in handler.py """ if message.get('capture_response', False): DYNAMODB_CLIENT.put_item( TableName=ASYNC_RESPONSE_TABLE, Item={ 'id': {'S': str(message['response_id'])}, 'ttl': {'N': str(int(time.time()+600))}, 'async_status': {'S': 'in progress'}, 'async_response': {'S': str(json.dumps('N/A'))}, } ) func = import_and_get_task(message['task_path']) if hasattr(func, 'sync'): response = func.sync( *message['args'], **message['kwargs'] ) else: response = func( *message['args'], **message['kwargs'] ) if message.get('capture_response', False): DYNAMODB_CLIENT.update_item( TableName=ASYNC_RESPONSE_TABLE, Key={'id': {'S': str(message['response_id'])}}, UpdateExpression="SET async_response = :r, async_status = :s", ExpressionAttributeValues={ ':r': {'S': str(json.dumps(response))}, ':s': {'S': 'complete'}, }, ) return response ## # Execution interfaces and classes ## def run(func, args=[], kwargs={}, service='lambda', capture_response=False, remote_aws_lambda_function_name=None, remote_aws_region=None, **task_kwargs): """ Instead of decorating a function with @task, you can just run it directly. If you were going to do func(*args, **kwargs), then you will call this: import zappa.asynchronous.run zappa.asynchronous.run(func, args, kwargs) If you want to use SNS, then do: zappa.asynchronous.run(func, args, kwargs, service='sns') and other arguments are similar to @task """ lambda_function_name = remote_aws_lambda_function_name or os.environ.get('AWS_LAMBDA_FUNCTION_NAME') aws_region = remote_aws_region or os.environ.get('AWS_REGION') task_path = get_func_task_path(func) return ASYNC_CLASSES[service](lambda_function_name=lambda_function_name, aws_region=aws_region, capture_response=capture_response, **task_kwargs).send(task_path, args, kwargs) # Handy: # http://stackoverflow.com/questions/10294014/python-decorator-best-practice-using-a-class-vs-a-function # However, this needs to pass inspect.getargspec() in handler.py which does not take classes # Wrapper written to take optional arguments # http://chase-seibert.github.io/blog/2013/12/17/python-decorator-optional-parameter.html def task(*args, **kwargs): """Async task decorator so that running Args: func (function): the function to be wrapped Further requirements: func must be an independent top-level function. i.e. not a class method or an anonymous function service (str): either 'lambda' or 'sns' remote_aws_lambda_function_name (str): the name of a remote lambda function to call with this task remote_aws_region (str): the name of a remote region to make lambda/sns calls against Returns: A replacement function that dispatches func() to run asynchronously through the service in question """ func = None if len(args) == 1 and callable(args[0]): func = args[0] if not kwargs: # Default Values service = 'lambda' lambda_function_name_arg = None aws_region_arg = None else: # Arguments were passed service = kwargs.get('service', 'lambda') lambda_function_name_arg = kwargs.get('remote_aws_lambda_function_name') aws_region_arg = kwargs.get('remote_aws_region') capture_response = kwargs.get('capture_response', False) def func_wrapper(func): task_path = get_func_task_path(func) @wraps(func) def _run_async(*args, **kwargs): """ This is the wrapping async function that replaces the function that is decorated with @task. Args: These are just passed through to @task's func Assuming a valid service is passed to task() and it is run inside a Lambda process (i.e. AWS_LAMBDA_FUNCTION_NAME exists), it dispatches the function to be run through the service variable. Otherwise, it runs the task synchronously. Returns: In async mode, the object returned includes state of the dispatch. For instance When outside of Lambda, the func passed to @task is run and we return the actual value. """ lambda_function_name = lambda_function_name_arg or os.environ.get('AWS_LAMBDA_FUNCTION_NAME') aws_region = aws_region_arg or os.environ.get('AWS_REGION') if (service in ASYNC_CLASSES) and (lambda_function_name): send_result = ASYNC_CLASSES[service](lambda_function_name=lambda_function_name, aws_region=aws_region, capture_response=capture_response).send(task_path, args, kwargs) return send_result else: return func(*args, **kwargs) update_wrapper(_run_async, func) _run_async.service = service _run_async.sync = func return _run_async return func_wrapper(func) if func else func_wrapper def task_sns(func): """ SNS-based task dispatcher. Functions the same way as task() """ return task(func, service='sns') ## # Utility Functions ## def import_and_get_task(task_path): """ Given a modular path to a function, import that module and return the function. """ module, function = task_path.rsplit('.', 1) app_module = importlib.import_module(module) app_function = getattr(app_module, function) return app_function def get_func_task_path(func): """ Format the modular task path for a function via inspection. """ module_path = inspect.getmodule(func).__name__ task_path = '{module_path}.{func_name}'.format( module_path=module_path, func_name=func.__name__ ) return task_path def get_async_response(response_id): """ Get the response from the async table """ response = DYNAMODB_CLIENT.get_item( TableName=ASYNC_RESPONSE_TABLE, Key={'id': {'S': str(response_id)}} ) if 'Item' not in response: return None return { 'status': response['Item']['async_status']['S'], 'response': json.loads(response['Item']['async_response']['S']), } ================================================ FILE: zappa/cli.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- """ Zappa CLI Deploy arbitrary Python programs as serverless Zappa applications. """ from past.builtins import basestring from builtins import input, bytes import argcomplete import argparse import base64 import pkgutil import botocore import click import collections import hjson as json import inspect import importlib import logging import os import pkg_resources import random import re import requests import slugify import string import sys import tempfile import time import toml import yaml import zipfile from click import Context, BaseCommand from click.exceptions import ClickException from click.globals import push_context from dateutil import parser from datetime import datetime, timedelta from .core import Zappa, logger, API_GATEWAY_REGIONS from .utilities import (check_new_version_available, detect_django_settings, detect_flask_apps, parse_s3_url, human_size, validate_name, InvalidAwsLambdaName, get_venv_from_python_version, get_runtime_from_python_version, string_to_timestamp, is_valid_bucket_name) CUSTOM_SETTINGS = [ 'apigateway_policy', 'assume_policy', 'attach_policy', 'aws_region', 'delete_local_zip', 'delete_s3_zip', 'exclude', 'exclude_glob', 'extra_permissions', 'include', 'role_name', 'touch', ] BOTO3_CONFIG_DOCS_URL = 'https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration' ## # Main Input Processing ## class ZappaCLI: """ ZappaCLI object is responsible for loading the settings, handling the input arguments and executing the calls to the core library. """ # CLI vargs = None command = None stage_env = None # Zappa settings zappa = None zappa_settings = None load_credentials = True disable_progress = False # Specific settings api_stage = None app_function = None aws_region = None debug = None prebuild_script = None project_name = None profile_name = None lambda_arn = None lambda_name = None lambda_description = None lambda_concurrency = None s3_bucket_name = None settings_file = None zip_path = None handler_path = None vpc_config = None memory_size = None use_apigateway = None lambda_handler = None django_settings = None manage_roles = True exception_handler = None environment_variables = None authorizer = None xray_tracing = False aws_kms_key_arn = '' context_header_mappings = None tags = [] layers = None stage_name_env_pattern = re.compile('^[a-zA-Z0-9_]+$') def __init__(self): self._stage_config_overrides = {} # change using self.override_stage_config_setting(key, val) @property def stage_config(self): """ A shortcut property for settings of a stage. """ def get_stage_setting(stage, extended_stages=None): if extended_stages is None: extended_stages = [] if stage in extended_stages: raise RuntimeError(stage + " has already been extended to these settings. " "There is a circular extends within the settings file.") extended_stages.append(stage) try: stage_settings = dict(self.zappa_settings[stage].copy()) except KeyError: raise ClickException("Cannot extend settings for undefined stage '" + stage + "'.") extends_stage = self.zappa_settings[stage].get('extends', None) if not extends_stage: return stage_settings extended_settings = get_stage_setting(stage=extends_stage, extended_stages=extended_stages) extended_settings.update(stage_settings) return extended_settings settings = get_stage_setting(stage=self.api_stage) # Backwards compatible for delete_zip setting that was more explicitly named delete_local_zip if 'delete_zip' in settings: settings['delete_local_zip'] = settings.get('delete_zip') settings.update(self.stage_config_overrides) return settings @property def stage_config_overrides(self): """ Returns zappa_settings we forcefully override for the current stage set by `self.override_stage_config_setting(key, value)` """ return getattr(self, '_stage_config_overrides', {}).get(self.api_stage, {}) def override_stage_config_setting(self, key, val): """ Forcefully override a setting set by zappa_settings (for the current stage only) :param key: settings key :param val: value """ self._stage_config_overrides = getattr(self, '_stage_config_overrides', {}) self._stage_config_overrides.setdefault(self.api_stage, {})[key] = val def handle(self, argv=None): """ Main function. Parses command, load settings and dispatches accordingly. """ desc = ('Zappa - Deploy Python applications to AWS Lambda' ' and API Gateway.\n') parser = argparse.ArgumentParser(description=desc) parser.add_argument( '-v', '--version', action='version', version=pkg_resources.get_distribution("zappa").version, help='Print the zappa version' ) parser.add_argument( '--color', default='auto', choices=['auto','never','always'] ) env_parser = argparse.ArgumentParser(add_help=False) me_group = env_parser.add_mutually_exclusive_group() all_help = ('Execute this command for all of our defined ' 'Zappa stages.') me_group.add_argument('--all', action='store_true', help=all_help) me_group.add_argument('stage_env', nargs='?') group = env_parser.add_argument_group() group.add_argument( '-a', '--app_function', help='The WSGI application function.' ) group.add_argument( '-s', '--settings_file', help='The path to a Zappa settings file.' ) group.add_argument( '-q', '--quiet', action='store_true', help='Silence all output.' ) # https://github.com/Miserlou/Zappa/issues/407 # Moved when 'template' command added. # Fuck Terraform. group.add_argument( '-j', '--json', action='store_true', help='Make the output of this command be machine readable.' ) # https://github.com/Miserlou/Zappa/issues/891 group.add_argument( '--disable_progress', action='store_true', help='Disable progress bars.' ) group.add_argument( "--no_venv", action="store_true", help="Skip venv check." ) ## # Certify ## subparsers = parser.add_subparsers(title='subcommands', dest='command') cert_parser = subparsers.add_parser( 'certify', parents=[env_parser], help='Create and install SSL certificate' ) cert_parser.add_argument( '--manual', action='store_true', help=("Gets new Let's Encrypt certificates, but prints them to console." "Does not update API Gateway domains.") ) cert_parser.add_argument( '-y', '--yes', action='store_true', help='Auto confirm yes.' ) ## # Deploy ## deploy_parser = subparsers.add_parser( 'deploy', parents=[env_parser], help='Deploy application.' ) deploy_parser.add_argument( '-z', '--zip', help='Deploy Lambda with specific local or S3 hosted zip package' ) ## # Init ## init_parser = subparsers.add_parser('init', help='Initialize Zappa app.') ## # Package ## package_parser = subparsers.add_parser( 'package', parents=[env_parser], help='Build the application zip package locally.' ) package_parser.add_argument( '-o', '--output', help='Name of file to output the package to.' ) ## # Template ## template_parser = subparsers.add_parser( 'template', parents=[env_parser], help='Create a CloudFormation template for this API Gateway.' ) template_parser.add_argument( '-l', '--lambda-arn', required=True, help='ARN of the Lambda function to template to.' ) template_parser.add_argument( '-r', '--role-arn', required=True, help='ARN of the Role to template with.' ) template_parser.add_argument( '-o', '--output', help='Name of file to output the template to.' ) ## # Invocation ## invoke_parser = subparsers.add_parser( 'invoke', parents=[env_parser], help='Invoke remote function.' ) invoke_parser.add_argument( '--raw', action='store_true', help=('When invoking remotely, invoke this python as a string,' ' not as a modular path.') ) invoke_parser.add_argument( '--no-color', action='store_true', help=("Don't color the output") ) invoke_parser.add_argument('command_rest') ## # Manage ## manage_parser = subparsers.add_parser( 'manage', help='Invoke remote Django manage.py commands.' ) rest_help = ("Command in the form of . is not " "required if --all is specified") manage_parser.add_argument('--all', action='store_true', help=all_help) manage_parser.add_argument('command_rest', nargs='+', help=rest_help) manage_parser.add_argument( '--no-color', action='store_true', help=("Don't color the output") ) # This is explicitly added here because this is the only subcommand that doesn't inherit from env_parser # https://github.com/Miserlou/Zappa/issues/1002 manage_parser.add_argument( '-s', '--settings_file', help='The path to a Zappa settings file.' ) ## # Rollback ## def positive_int(s): """ Ensure an arg is positive """ i = int(s) if i < 0: msg = "This argument must be positive (got {})".format(s) raise argparse.ArgumentTypeError(msg) return i rollback_parser = subparsers.add_parser( 'rollback', parents=[env_parser], help='Rollback deployed code to a previous version.' ) rollback_parser.add_argument( '-n', '--num-rollback', type=positive_int, default=1, help='The number of versions to rollback.' ) ## # Scheduling ## subparsers.add_parser( 'schedule', parents=[env_parser], help='Schedule functions to occur at regular intervals.' ) ## # Status ## subparsers.add_parser( 'status', parents=[env_parser], help='Show deployment status and event schedules.' ) ## # Log Tailing ## tail_parser = subparsers.add_parser( 'tail', parents=[env_parser], help='Tail deployment logs.' ) tail_parser.add_argument( '--no-color', action='store_true', help="Don't color log tail output." ) tail_parser.add_argument( '--http', action='store_true', help='Only show HTTP requests in tail output.' ) tail_parser.add_argument( '--non-http', action='store_true', help='Only show non-HTTP requests in tail output.' ) tail_parser.add_argument( '--since', type=str, default="100000s", help="Only show lines since a certain timeframe." ) tail_parser.add_argument( '--filter', type=str, default="", help="Apply a filter pattern to the logs." ) tail_parser.add_argument( '--force-color', action='store_true', help='Force coloring log tail output even if coloring support is not auto-detected. (example: piping)' ) tail_parser.add_argument( '--disable-keep-open', action='store_true', help="Exit after printing the last available log, rather than keeping the log open." ) ## # Undeploy ## undeploy_parser = subparsers.add_parser( 'undeploy', parents=[env_parser], help='Undeploy application.' ) undeploy_parser.add_argument( '--remove-logs', action='store_true', help=('Removes log groups of api gateway and lambda task' ' during the undeployment.'), ) undeploy_parser.add_argument( '-y', '--yes', action='store_true', help='Auto confirm yes.' ) ## # Unschedule ## subparsers.add_parser('unschedule', parents=[env_parser], help='Unschedule functions.') ## # Updating ## update_parser = subparsers.add_parser( 'update', parents=[env_parser], help='Update deployed application.' ) update_parser.add_argument( '-z', '--zip', help='Update Lambda with specific local or S3 hosted zip package' ) update_parser.add_argument( '-n', '--no-upload', help="Update configuration where appropriate, but don't upload new code" ) ## # Debug ## subparsers.add_parser( 'shell', parents=[env_parser], help='A debug shell with a loaded Zappa object.' ) argcomplete.autocomplete(parser) args = parser.parse_args(argv) self.vargs = vars(args) if args.color == 'never': disable_click_colors() elif args.color == 'always': #TODO: Support aggressive coloring like "--force-color" on all commands pass elif args.color == 'auto': pass # Parse the input # NOTE(rmoe): Special case for manage command # The manage command can't have both stage_env and command_rest # arguments. Since they are both positional arguments argparse can't # differentiate the two. This causes problems when used with --all. # (e.g. "manage --all showmigrations admin" argparse thinks --all has # been specified AND that stage_env='showmigrations') # By having command_rest collect everything but --all we can split it # apart here instead of relying on argparse. if not args.command: parser.print_help() return if args.command == 'manage' and not self.vargs.get('all'): self.stage_env = self.vargs['command_rest'].pop(0) else: self.stage_env = self.vargs.get('stage_env') if args.command == 'package': self.load_credentials = False self.command = args.command self.disable_progress = self.vargs.get('disable_progress') if self.vargs.get('quiet'): self.silence() # We don't have any settings yet, so make those first! # (Settings-based interactions will fail # before a project has been initialized.) if self.command == 'init': self.init() return # Make sure there isn't a new version available if not self.vargs.get('json'): self.check_for_update() # Load and Validate Settings File self.load_settings_file(self.vargs.get('settings_file')) # Should we execute this for all stages, or just one? all_stages = self.vargs.get('all') stages = [] if all_stages: # All stages! stages = self.zappa_settings.keys() else: # Just one env. if not self.stage_env: # If there's only one stage defined in the settings, # use that as the default. if len(self.zappa_settings.keys()) == 1: stages.append(list(self.zappa_settings.keys())[0]) else: parser.error("Please supply a stage to interact with.") else: stages.append(self.stage_env) for stage in stages: try: self.dispatch_command(self.command, stage) except ClickException as e: # Discussion on exit codes: https://github.com/Miserlou/Zappa/issues/407 e.show() sys.exit(e.exit_code) def dispatch_command(self, command, stage): """ Given a command to execute and stage, execute that command. """ self.api_stage = stage if command not in ['status', 'manage']: if not self.vargs.get('json', None): click.echo("Calling " + click.style(command, fg="green", bold=True) + " for stage " + click.style(self.api_stage, bold=True) + ".." ) # Explicitly define the app function. # Related: https://github.com/Miserlou/Zappa/issues/832 if self.vargs.get('app_function', None): self.app_function = self.vargs['app_function'] # Load our settings, based on api_stage. try: self.load_settings(self.vargs.get('settings_file')) except ValueError as e: if hasattr(e, 'message'): print("Error: {}".format(e.message)) else: print(str(e)) sys.exit(-1) self.callback('settings') # Hand it off if command == 'deploy': # pragma: no cover self.deploy(self.vargs['zip']) if command == 'package': # pragma: no cover self.package(self.vargs['output']) if command == 'template': # pragma: no cover self.template( self.vargs['lambda_arn'], self.vargs['role_arn'], output=self.vargs['output'], json=self.vargs['json'] ) elif command == 'update': # pragma: no cover self.update(self.vargs['zip'], self.vargs['no_upload']) elif command == 'rollback': # pragma: no cover self.rollback(self.vargs['num_rollback']) elif command == 'invoke': # pragma: no cover if not self.vargs.get('command_rest'): print("Please enter the function to invoke.") return self.invoke( self.vargs['command_rest'], raw_python=self.vargs['raw'], no_color=self.vargs['no_color'], ) elif command == 'manage': # pragma: no cover if not self.vargs.get('command_rest'): print("Please enter the management command to invoke.") return if not self.django_settings: print("This command is for Django projects only!") print("If this is a Django project, please define django_settings in your zappa_settings.") return command_tail = self.vargs.get('command_rest') if len(command_tail) > 1: command = " ".join(command_tail) # ex: zappa manage dev "shell --version" else: command = command_tail[0] # ex: zappa manage dev showmigrations admin self.invoke( command, command="manage", no_color=self.vargs['no_color'], ) elif command == 'tail': # pragma: no cover self.tail( colorize=(not self.vargs['no_color']), http=self.vargs['http'], non_http=self.vargs['non_http'], since=self.vargs['since'], filter_pattern=self.vargs['filter'], force_colorize=self.vargs['force_color'] or None, keep_open=not self.vargs['disable_keep_open'] ) elif command == 'undeploy': # pragma: no cover self.undeploy( no_confirm=self.vargs['yes'], remove_logs=self.vargs['remove_logs'] ) elif command == 'schedule': # pragma: no cover self.schedule() elif command == 'unschedule': # pragma: no cover self.unschedule() elif command == 'status': # pragma: no cover self.status(return_json=self.vargs['json']) elif command == 'certify': # pragma: no cover self.certify( no_confirm=self.vargs['yes'], manual=self.vargs['manual'] ) elif command == 'shell': # pragma: no cover self.shell() ## # The Commands ## def package(self, output=None): """ Only build the package """ # Make sure we're in a venv. self.check_venv() # force not to delete the local zip self.override_stage_config_setting('delete_local_zip', False) # Execute the prebuild script if self.prebuild_script: self.execute_prebuild_script() # Create the Lambda Zip self.create_package(output) self.callback('zip') size = human_size(os.path.getsize(self.zip_path)) click.echo(click.style("Package created", fg="green", bold=True) + ": " + click.style(self.zip_path, bold=True) + " (" + size + ")") def template(self, lambda_arn, role_arn, output=None, json=False): """ Only build the template file. """ if not lambda_arn: raise ClickException("Lambda ARN is required to template.") if not role_arn: raise ClickException("Role ARN is required to template.") self.zappa.credentials_arn = role_arn # Create the template! template = self.zappa.create_stack_template( lambda_arn=lambda_arn, lambda_name=self.lambda_name, api_key_required=self.api_key_required, iam_authorization=self.iam_authorization, authorizer=self.authorizer, cors_options=self.cors, description=self.apigateway_description, endpoint_configuration=self.endpoint_configuration ) if not output: template_file = self.lambda_name + '-template-' + str(int(time.time())) + '.json' else: template_file = output with open(template_file, 'wb') as out: out.write(bytes(template.to_json(indent=None, separators=(',',':')), "utf-8")) if not json: click.echo(click.style("Template created", fg="green", bold=True) + ": " + click.style(template_file, bold=True)) else: with open(template_file, 'r') as out: print(out.read()) def deploy(self, source_zip=None): """ Package your project, upload it to S3, register the Lambda function and create the API Gateway routes. """ if not source_zip: # Make sure we're in a venv. self.check_venv() # Execute the prebuild script if self.prebuild_script: self.execute_prebuild_script() # Make sure this isn't already deployed. deployed_versions = self.zappa.get_lambda_function_versions(self.lambda_name) if len(deployed_versions) > 0: raise ClickException("This application is " + click.style("already deployed", fg="red") + " - did you mean to call " + click.style("update", bold=True) + "?") # Make sure the necessary IAM execution roles are available if self.manage_roles: try: self.zappa.create_iam_roles() except botocore.client.ClientError as ce: raise ClickException( click.style("Failed", fg="red") + " to " + click.style("manage IAM roles", bold=True) + "!\n" + "You may " + click.style("lack the necessary AWS permissions", bold=True) + " to automatically manage a Zappa execution role.\n" + click.style("Exception reported by AWS:", bold=True) + format(ce) + '\n' + "To fix this, see here: " + click.style( "https://github.com/Miserlou/Zappa#custom-aws-iam-roles-and-policies-for-deployment", bold=True) + '\n') # Create the Lambda Zip self.create_package() self.callback('zip') # Upload it to S3 success = self.zappa.upload_to_s3( self.zip_path, self.s3_bucket_name, disable_progress=self.disable_progress) if not success: # pragma: no cover raise ClickException("Unable to upload to S3. Quitting.") # If using a slim handler, upload it to S3 and tell lambda to use this slim handler zip if self.stage_config.get('slim_handler', False): # https://github.com/Miserlou/Zappa/issues/510 success = self.zappa.upload_to_s3(self.handler_path, self.s3_bucket_name, disable_progress=self.disable_progress) if not success: # pragma: no cover raise ClickException("Unable to upload handler to S3. Quitting.") # Copy the project zip to the current project zip current_project_name = '{0!s}_{1!s}_current_project.tar.gz'.format(self.api_stage, self.project_name) success = self.zappa.copy_on_s3(src_file_name=self.zip_path, dst_file_name=current_project_name, bucket_name=self.s3_bucket_name) if not success: # pragma: no cover raise ClickException("Unable to copy the zip to be the current project. Quitting.") handler_file = self.handler_path else: handler_file = self.zip_path # Fixes https://github.com/Miserlou/Zappa/issues/613 try: self.lambda_arn = self.zappa.get_lambda_function( function_name=self.lambda_name) except botocore.client.ClientError: # Register the Lambda function with that zip as the source # You'll also need to define the path to your lambda_handler code. kwargs = dict( handler=self.lambda_handler, description=self.lambda_description, vpc_config=self.vpc_config, dead_letter_config=self.dead_letter_config, timeout=self.timeout_seconds, memory_size=self.memory_size, runtime=self.runtime, aws_environment_variables=self.aws_environment_variables, aws_kms_key_arn=self.aws_kms_key_arn, use_alb=self.use_alb, layers=self.layers, concurrency=self.lambda_concurrency, ) if source_zip and source_zip.startswith('s3://'): bucket, key_name = parse_s3_url(source_zip) kwargs['function_name'] = self.lambda_name kwargs['bucket'] = bucket kwargs['s3_key'] = key_name elif source_zip and not source_zip.startswith('s3://'): with open(source_zip, mode='rb') as fh: byte_stream = fh.read() kwargs['function_name'] = self.lambda_name kwargs['local_zip'] = byte_stream else: kwargs['function_name'] = self.lambda_name kwargs['bucket'] = self.s3_bucket_name kwargs['s3_key'] = handler_file self.lambda_arn = self.zappa.create_lambda_function(**kwargs) # Schedule events for this deployment self.schedule() endpoint_url = '' deployment_string = click.style("Deployment complete", fg="green", bold=True) + "!" if self.use_alb: kwargs = dict( lambda_arn=self.lambda_arn, lambda_name=self.lambda_name, alb_vpc_config=self.alb_vpc_config, timeout=self.timeout_seconds ) self.zappa.deploy_lambda_alb(**kwargs) if self.use_apigateway: # Create and configure the API Gateway template = self.zappa.create_stack_template( lambda_arn=self.lambda_arn, lambda_name=self.lambda_name, api_key_required=self.api_key_required, iam_authorization=self.iam_authorization, authorizer=self.authorizer, cors_options=self.cors, description=self.apigateway_description, endpoint_configuration=self.endpoint_configuration ) self.zappa.update_stack( self.lambda_name, self.s3_bucket_name, wait=True, disable_progress=self.disable_progress ) api_id = self.zappa.get_api_id(self.lambda_name) # Add binary support if self.binary_support: self.zappa.add_binary_support(api_id=api_id, cors=self.cors) # Add payload compression if self.stage_config.get('payload_compression', True): self.zappa.add_api_compression( api_id=api_id, min_compression_size=self.stage_config.get('payload_minimum_compression_size', 0)) # Deploy the API! endpoint_url = self.deploy_api_gateway(api_id) deployment_string = deployment_string + ": {}".format(endpoint_url) # Create/link API key if self.api_key_required: if self.api_key is None: self.zappa.create_api_key(api_id=api_id, stage_name=self.api_stage) else: self.zappa.add_api_stage_to_api_key(api_key=self.api_key, api_id=api_id, stage_name=self.api_stage) if self.stage_config.get('touch', True): self.touch_endpoint(endpoint_url) # Finally, delete the local copy our zip package if not source_zip: if self.stage_config.get('delete_local_zip', True): self.remove_local_zip() # Remove the project zip from S3. if not source_zip: self.remove_uploaded_zip() self.callback('post') click.echo(deployment_string) def update(self, source_zip=None, no_upload=False): """ Repackage and update the function code. """ if not source_zip: # Make sure we're in a venv. self.check_venv() # Execute the prebuild script if self.prebuild_script: self.execute_prebuild_script() # Temporary version check try: updated_time = 1472581018 function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name) conf = function_response['Configuration'] last_updated = parser.parse(conf['LastModified']) last_updated_unix = time.mktime(last_updated.timetuple()) except botocore.exceptions.BotoCoreError as e: click.echo(click.style(type(e).__name__, fg="red") + ": " + e.args[0]) sys.exit(-1) except Exception as e: click.echo(click.style("Warning!", fg="red") + " Couldn't get function " + self.lambda_name + " in " + self.zappa.aws_region + " - have you deployed yet?") sys.exit(-1) if last_updated_unix <= updated_time: click.echo(click.style("Warning!", fg="red") + " You may have upgraded Zappa since deploying this application. You will need to " + click.style("redeploy", bold=True) + " for this deployment to work properly!") # Make sure the necessary IAM execution roles are available if self.manage_roles: try: self.zappa.create_iam_roles() except botocore.client.ClientError: click.echo(click.style("Failed", fg="red") + " to " + click.style("manage IAM roles", bold=True) + "!") click.echo("You may " + click.style("lack the necessary AWS permissions", bold=True) + " to automatically manage a Zappa execution role.") click.echo("To fix this, see here: " + click.style("https://github.com/Miserlou/Zappa#custom-aws-iam-roles-and-policies-for-deployment", bold=True)) sys.exit(-1) # Create the Lambda Zip, if not no_upload: self.create_package() self.callback('zip') # Upload it to S3 if not no_upload: success = self.zappa.upload_to_s3(self.zip_path, self.s3_bucket_name, disable_progress=self.disable_progress) if not success: # pragma: no cover raise ClickException("Unable to upload project to S3. Quitting.") # If using a slim handler, upload it to S3 and tell lambda to use this slim handler zip if self.stage_config.get('slim_handler', False): # https://github.com/Miserlou/Zappa/issues/510 success = self.zappa.upload_to_s3(self.handler_path, self.s3_bucket_name, disable_progress=self.disable_progress) if not success: # pragma: no cover raise ClickException("Unable to upload handler to S3. Quitting.") # Copy the project zip to the current project zip current_project_name = '{0!s}_{1!s}_current_project.tar.gz'.format(self.api_stage, self.project_name) success = self.zappa.copy_on_s3(src_file_name=self.zip_path, dst_file_name=current_project_name, bucket_name=self.s3_bucket_name) if not success: # pragma: no cover raise ClickException("Unable to copy the zip to be the current project. Quitting.") handler_file = self.handler_path else: handler_file = self.zip_path # Register the Lambda function with that zip as the source # You'll also need to define the path to your lambda_handler code. kwargs = dict( bucket=self.s3_bucket_name, function_name=self.lambda_name, num_revisions=self.num_retained_versions, concurrency=self.lambda_concurrency, ) if source_zip and source_zip.startswith('s3://'): bucket, key_name = parse_s3_url(source_zip) kwargs.update(dict( bucket=bucket, s3_key=key_name )) self.lambda_arn = self.zappa.update_lambda_function(**kwargs) elif source_zip and not source_zip.startswith('s3://'): with open(source_zip, mode='rb') as fh: byte_stream = fh.read() kwargs['local_zip'] = byte_stream self.lambda_arn = self.zappa.update_lambda_function(**kwargs) else: if not no_upload: kwargs['s3_key'] = handler_file self.lambda_arn = self.zappa.update_lambda_function(**kwargs) # Remove the uploaded zip from S3, because it is now registered.. if not source_zip and not no_upload: self.remove_uploaded_zip() # Update the configuration, in case there are changes. self.lambda_arn = self.zappa.update_lambda_configuration( lambda_arn=self.lambda_arn, function_name=self.lambda_name, handler=self.lambda_handler, description=self.lambda_description, vpc_config=self.vpc_config, timeout=self.timeout_seconds, memory_size=self.memory_size, runtime=self.runtime, aws_environment_variables=self.aws_environment_variables, aws_kms_key_arn=self.aws_kms_key_arn, layers=self.layers ) # Finally, delete the local copy our zip package if not source_zip and not no_upload: if self.stage_config.get('delete_local_zip', True): self.remove_local_zip() if self.use_apigateway: self.zappa.create_stack_template( lambda_arn=self.lambda_arn, lambda_name=self.lambda_name, api_key_required=self.api_key_required, iam_authorization=self.iam_authorization, authorizer=self.authorizer, cors_options=self.cors, description=self.apigateway_description, endpoint_configuration=self.endpoint_configuration ) self.zappa.update_stack( self.lambda_name, self.s3_bucket_name, wait=True, update_only=True, disable_progress=self.disable_progress) api_id = self.zappa.get_api_id(self.lambda_name) # Update binary support if self.binary_support: self.zappa.add_binary_support(api_id=api_id, cors=self.cors) else: self.zappa.remove_binary_support(api_id=api_id, cors=self.cors) if self.stage_config.get('payload_compression', True): self.zappa.add_api_compression( api_id=api_id, min_compression_size=self.stage_config.get('payload_minimum_compression_size', 0)) else: self.zappa.remove_api_compression(api_id=api_id) # It looks a bit like we might actually be using this just to get the URL, # but we're also updating a few of the APIGW settings. endpoint_url = self.deploy_api_gateway(api_id) if self.stage_config.get('domain', None): endpoint_url = self.stage_config.get('domain') else: endpoint_url = None self.schedule() # Update any cognito pool with the lambda arn # do this after schedule as schedule clears the lambda policy and we need to add one self.update_cognito_triggers() self.callback('post') if endpoint_url and 'https://' not in endpoint_url: endpoint_url = 'https://' + endpoint_url if self.base_path: endpoint_url += '/' + self.base_path deployed_string = "Your updated Zappa deployment is " + click.style("live", fg='green', bold=True) + "!" if self.use_apigateway: deployed_string = deployed_string + ": " + click.style("{}".format(endpoint_url), bold=True) api_url = None if endpoint_url and 'amazonaws.com' not in endpoint_url: api_url = self.zappa.get_api_url( self.lambda_name, self.api_stage) if endpoint_url != api_url: deployed_string = deployed_string + " (" + api_url + ")" if self.stage_config.get('touch', True): if api_url: self.touch_endpoint(api_url) elif endpoint_url: self.touch_endpoint(endpoint_url) click.echo(deployed_string) def rollback(self, revision): """ Rollsback the currently deploy lambda code to a previous revision. """ print("Rolling back..") self.zappa.rollback_lambda_function_version( self.lambda_name, versions_back=revision) print("Done!") def tail(self, since, filter_pattern, limit=10000, keep_open=True, colorize=True, http=False, non_http=False, force_colorize=False): """ Tail this function's logs. if keep_open, do so repeatedly, printing any new logs """ try: since_stamp = string_to_timestamp(since) last_since = since_stamp while True: new_logs = self.zappa.fetch_logs( self.lambda_name, start_time=since_stamp, limit=limit, filter_pattern=filter_pattern, ) new_logs = [ e for e in new_logs if e['timestamp'] > last_since ] self.print_logs(new_logs, colorize, http, non_http, force_colorize) if not keep_open: break if new_logs: last_since = new_logs[-1]['timestamp'] time.sleep(1) except KeyboardInterrupt: # pragma: no cover # Die gracefully try: sys.exit(0) except SystemExit: os._exit(130) def undeploy(self, no_confirm=False, remove_logs=False): """ Tear down an existing deployment. """ if not no_confirm: # pragma: no cover confirm = input("Are you sure you want to undeploy? [y/n] ") if confirm != 'y': return if self.use_alb: self.zappa.undeploy_lambda_alb(self.lambda_name) if self.use_apigateway: if remove_logs: self.zappa.remove_api_gateway_logs(self.lambda_name) domain_name = self.stage_config.get('domain', None) base_path = self.stage_config.get('base_path', None) # Only remove the api key when not specified if self.api_key_required and self.api_key is None: api_id = self.zappa.get_api_id(self.lambda_name) self.zappa.remove_api_key(api_id, self.api_stage) gateway_id = self.zappa.undeploy_api_gateway( self.lambda_name, domain_name=domain_name, base_path=base_path ) self.unschedule() # removes event triggers, including warm up event. self.zappa.delete_lambda_function(self.lambda_name) if remove_logs: self.zappa.remove_lambda_function_logs(self.lambda_name) click.echo(click.style("Done", fg="green", bold=True) + "!") def update_cognito_triggers(self): """ Update any cognito triggers """ if self.cognito: user_pool = self.cognito.get('user_pool') triggers = self.cognito.get('triggers', []) lambda_configs = set() for trigger in triggers: lambda_configs.add(trigger['source'].split('_')[0]) self.zappa.update_cognito(self.lambda_name, user_pool, lambda_configs, self.lambda_arn) def schedule(self): """ Given a a list of functions and a schedule to execute them, setup up regular execution. """ events = self.stage_config.get('events', []) if events: if not isinstance(events, list): # pragma: no cover print("Events must be supplied as a list.") return for event in events: self.collision_warning(event.get('function')) if self.stage_config.get('keep_warm', True): if not events: events = [] keep_warm_rate = self.stage_config.get('keep_warm_expression', "rate(4 minutes)") events.append({'name': 'zappa-keep-warm', 'function': 'handler.keep_warm_callback', 'expression': keep_warm_rate, 'description': 'Zappa Keep Warm - {}'.format(self.lambda_name)}) if events: try: function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name) except botocore.exceptions.ClientError as e: # pragma: no cover click.echo(click.style("Function does not exist", fg="yellow") + ", please " + click.style("deploy", bold=True) + "first. Ex:" + click.style("zappa deploy {}.".format(self.api_stage), bold=True)) sys.exit(-1) print("Scheduling..") self.zappa.schedule_events( lambda_arn=function_response['Configuration']['FunctionArn'], lambda_name=self.lambda_name, events=events ) # Add async tasks SNS if self.stage_config.get('async_source', None) == 'sns' \ and self.stage_config.get('async_resources', True): self.lambda_arn = self.zappa.get_lambda_function( function_name=self.lambda_name) topic_arn = self.zappa.create_async_sns_topic( lambda_name=self.lambda_name, lambda_arn=self.lambda_arn ) click.echo('SNS Topic created: %s' % topic_arn) # Add async tasks DynamoDB table_name = self.stage_config.get('async_response_table', False) read_capacity = self.stage_config.get('async_response_table_read_capacity', 1) write_capacity = self.stage_config.get('async_response_table_write_capacity', 1) if table_name and self.stage_config.get('async_resources', True): created, response_table = self.zappa.create_async_dynamodb_table( table_name, read_capacity, write_capacity) if created: click.echo('DynamoDB table created: %s' % table_name) else: click.echo('DynamoDB table exists: %s' % table_name) provisioned_throughput = response_table['Table']['ProvisionedThroughput'] if provisioned_throughput['ReadCapacityUnits'] != read_capacity or \ provisioned_throughput['WriteCapacityUnits'] != write_capacity: click.echo(click.style( "\nWarning! Existing DynamoDB table ({}) does not match configured capacity.\n".format(table_name), fg='red' )) def unschedule(self): """ Given a a list of scheduled functions, tear down their regular execution. """ # Run even if events are not defined to remove previously existing ones (thus default to []). events = self.stage_config.get('events', []) if not isinstance(events, list): # pragma: no cover print("Events must be supplied as a list.") return function_arn = None try: function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name) function_arn = function_response['Configuration']['FunctionArn'] except botocore.exceptions.ClientError as e: # pragma: no cover raise ClickException("Function does not exist, you should deploy first. Ex: zappa deploy {}. " "Proceeding to unschedule CloudWatch based events.".format(self.api_stage)) print("Unscheduling..") self.zappa.unschedule_events( lambda_name=self.lambda_name, lambda_arn=function_arn, events=events, ) # Remove async task SNS if self.stage_config.get('async_source', None) == 'sns' \ and self.stage_config.get('async_resources', True): removed_arns = self.zappa.remove_async_sns_topic(self.lambda_name) click.echo('SNS Topic removed: %s' % ', '.join(removed_arns)) def invoke(self, function_name, raw_python=False, command=None, no_color=False): """ Invoke a remote function. """ # There are three likely scenarios for 'command' here: # command, which is a modular function path # raw_command, which is a string of python to execute directly # manage, which is a Django-specific management command invocation key = command if command is not None else 'command' if raw_python: command = {'raw_command': function_name} else: command = {key: function_name} # Can't use hjson import json as json response = self.zappa.invoke_lambda_function( self.lambda_name, json.dumps(command), invocation_type='RequestResponse', ) if 'LogResult' in response: if no_color: print(base64.b64decode(response['LogResult'])) else: decoded = base64.b64decode(response['LogResult']).decode() formatted = self.format_invoke_command(decoded) colorized = self.colorize_invoke_command(formatted) print(colorized) else: print(response) # For a successful request FunctionError is not in response. # https://github.com/Miserlou/Zappa/pull/1254/ if 'FunctionError' in response: raise ClickException( "{} error occurred while invoking command.".format(response['FunctionError']) ) def format_invoke_command(self, string): """ Formats correctly the string output from the invoke() method, replacing line breaks and tabs when necessary. """ string = string.replace('\\n', '\n') formated_response = '' for line in string.splitlines(): if line.startswith('REPORT'): line = line.replace('\t', '\n') if line.startswith('[DEBUG]'): line = line.replace('\t', ' ') formated_response += line + '\n' formated_response = formated_response.replace('\n\n', '\n') return formated_response def colorize_invoke_command(self, string): """ Apply various heuristics to return a colorized version the invoke command string. If these fail, simply return the string in plaintext. Inspired by colorize_log_entry(). """ final_string = string try: # Line headers try: for token in ['START', 'END', 'REPORT', '[DEBUG]']: if token in final_string: format_string = '[{}]' # match whole words only pattern = r'\b{}\b' if token == '[DEBUG]': format_string = '{}' pattern = re.escape(token) repl = click.style( format_string.format(token), bold=True, fg='cyan' ) final_string = re.sub( pattern.format(token), repl, final_string ) except Exception: # pragma: no cover pass # Green bold Tokens try: for token in [ 'Zappa Event:', 'RequestId:', 'Version:', 'Duration:', 'Billed', 'Memory Size:', 'Max Memory Used:' ]: if token in final_string: final_string = final_string.replace(token, click.style( token, bold=True, fg='green' )) except Exception: # pragma: no cover pass # UUIDs for token in final_string.replace('\t', ' ').split(' '): try: if token.count('-') == 4 and token.replace('-', '').isalnum(): final_string = final_string.replace( token, click.style(token, fg='magenta') ) except Exception: # pragma: no cover pass return final_string except Exception: return string def status(self, return_json=False): """ Describe the status of the current deployment. """ def tabular_print(title, value): """ Convenience function for priting formatted table items. """ click.echo('%-*s%s' % (32, click.style("\t" + title, fg='green') + ':', str(value))) return # Lambda Env Details lambda_versions = self.zappa.get_lambda_function_versions(self.lambda_name) if not lambda_versions: raise ClickException(click.style("No Lambda %s detected in %s - have you deployed yet?" % (self.lambda_name, self.zappa.aws_region), fg='red')) status_dict = collections.OrderedDict() status_dict["Lambda Versions"] = len(lambda_versions) function_response = self.zappa.lambda_client.get_function(FunctionName=self.lambda_name) conf = function_response['Configuration'] self.lambda_arn = conf['FunctionArn'] status_dict["Lambda Name"] = self.lambda_name status_dict["Lambda ARN"] = self.lambda_arn status_dict["Lambda Role ARN"] = conf['Role'] status_dict["Lambda Handler"] = conf['Handler'] status_dict["Lambda Code Size"] = conf['CodeSize'] status_dict["Lambda Version"] = conf['Version'] status_dict["Lambda Last Modified"] = conf['LastModified'] status_dict["Lambda Memory Size"] = conf['MemorySize'] status_dict["Lambda Timeout"] = conf['Timeout'] status_dict["Lambda Runtime"] = conf['Runtime'] if 'VpcConfig' in conf.keys(): status_dict["Lambda VPC ID"] = conf.get('VpcConfig', {}).get('VpcId', 'Not assigned') else: status_dict["Lambda VPC ID"] = None # Calculated statistics try: function_invocations = self.zappa.cloudwatch.get_metric_statistics( Namespace='AWS/Lambda', MetricName='Invocations', StartTime=datetime.utcnow()-timedelta(days=1), EndTime=datetime.utcnow(), Period=1440, Statistics=['Sum'], Dimensions=[{'Name': 'FunctionName', 'Value': '{}'.format(self.lambda_name)}] )['Datapoints'][0]['Sum'] except Exception as e: function_invocations = 0 try: function_errors = self.zappa.cloudwatch.get_metric_statistics( Namespace='AWS/Lambda', MetricName='Errors', StartTime=datetime.utcnow()-timedelta(days=1), EndTime=datetime.utcnow(), Period=1440, Statistics=['Sum'], Dimensions=[{'Name': 'FunctionName', 'Value': '{}'.format(self.lambda_name)}] )['Datapoints'][0]['Sum'] except Exception as e: function_errors = 0 try: error_rate = "{0:.2f}%".format(function_errors / function_invocations * 100) except: error_rate = "Error calculating" status_dict["Invocations (24h)"] = int(function_invocations) status_dict["Errors (24h)"] = int(function_errors) status_dict["Error Rate (24h)"] = error_rate # URLs if self.use_apigateway: api_url = self.zappa.get_api_url( self.lambda_name, self.api_stage) status_dict["API Gateway URL"] = api_url # Api Keys api_id = self.zappa.get_api_id(self.lambda_name) for api_key in self.zappa.get_api_keys(api_id, self.api_stage): status_dict["API Gateway x-api-key"] = api_key # There literally isn't a better way to do this. # AWS provides no way to tie a APIGW domain name to its Lambda function. domain_url = self.stage_config.get('domain', None) base_path = self.stage_config.get('base_path', None) if domain_url: status_dict["Domain URL"] = 'https://' + domain_url if base_path: status_dict["Domain URL"] += '/' + base_path else: status_dict["Domain URL"] = "None Supplied" # Scheduled Events event_rules = self.zappa.get_event_rules_for_lambda(lambda_arn=self.lambda_arn) status_dict["Num. Event Rules"] = len(event_rules) if len(event_rules) > 0: status_dict['Events'] = [] for rule in event_rules: event_dict = {} rule_name = rule['Name'] event_dict["Event Rule Name"] = rule_name event_dict["Event Rule Schedule"] = rule.get('ScheduleExpression', None) event_dict["Event Rule State"] = rule.get('State', None).title() event_dict["Event Rule ARN"] = rule.get('Arn', None) status_dict['Events'].append(event_dict) if return_json: # Putting the status in machine readable format # https://github.com/Miserlou/Zappa/issues/407 print(json.dumpsJSON(status_dict)) else: click.echo("Status for " + click.style(self.lambda_name, bold=True) + ": ") for k, v in status_dict.items(): if k == 'Events': # Events are a list of dicts for event in v: for item_k, item_v in event.items(): tabular_print(item_k, item_v) else: tabular_print(k, v) # TODO: S3/SQS/etc. type events? return True def check_stage_name(self, stage_name): """ Make sure the stage name matches the AWS-allowed pattern (calls to apigateway_client.create_deployment, will fail with error message "ClientError: An error occurred (BadRequestException) when calling the CreateDeployment operation: Stage name only allows a-zA-Z0-9_" if the pattern does not match) """ if self.stage_name_env_pattern.match(stage_name): return True raise ValueError("AWS requires stage name to match a-zA-Z0-9_") def check_environment(self, environment): """ Make sure the environment contains only strings (since putenv needs a string) """ non_strings = [] for (k,v) in environment.items(): if not isinstance(v, basestring): non_strings.append(k) if non_strings: raise ValueError("The following environment variables are not strings: {}".format(", ".join(non_strings))) else: return True def init(self, settings_file="zappa_settings.json"): """ Initialize a new Zappa project by creating a new zappa_settings.json in a guided process. This should probably be broken up into few separate componants once it's stable. Testing these inputs requires monkeypatching with mock, which isn't pretty. """ # Make sure we're in a venv. self.check_venv() # Ensure that we don't already have a zappa_settings file. if os.path.isfile(settings_file): raise ClickException("This project already has a " + click.style("{0!s} file".format(settings_file), fg="red", bold=True) + "!") # Explain system. click.echo(click.style("""\n███████╗ █████╗ ██████╗ ██████╗ █████╗ ╚══███╔╝██╔══██╗██╔══██╗██╔══██╗██╔══██╗ ███╔╝ ███████║██████╔╝██████╔╝███████║ ███╔╝ ██╔══██║██╔═══╝ ██╔═══╝ ██╔══██║ ███████╗██║ ██║██║ ██║ ██║ ██║ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝\n""", fg='green', bold=True)) click.echo(click.style("Welcome to ", bold=True) + click.style("Zappa", fg='green', bold=True) + click.style("!\n", bold=True)) click.echo(click.style("Zappa", bold=True) + " is a system for running server-less Python web applications" " on AWS Lambda and AWS API Gateway.") click.echo("This `init` command will help you create and configure your new Zappa deployment.") click.echo("Let's get started!\n") # Create Env while True: click.echo("Your Zappa configuration can support multiple production stages, like '" + click.style("dev", bold=True) + "', '" + click.style("staging", bold=True) + "', and '" + click.style("production", bold=True) + "'.") env = input("What do you want to call this environment (default 'dev'): ") or "dev" try: self.check_stage_name(env) break except ValueError: click.echo(click.style("Stage names must match a-zA-Z0-9_", fg="red")) # Detect AWS profiles and regions # If anyone knows a more straightforward way to easily detect and parse AWS profiles I'm happy to change this, feels like a hack session = botocore.session.Session() config = session.full_config profiles = config.get("profiles", {}) profile_names = list(profiles.keys()) click.echo("\nAWS Lambda and API Gateway are only available in certain regions. "\ "Let's check to make sure you have a profile set up in one that will work.") if not profile_names: profile_name, profile = None, None 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: {}" .format(click.style(BOTO3_CONFIG_DOCS_URL, fg="blue", underline=True))) elif len(profile_names) == 1: profile_name = profile_names[0] profile = profiles[profile_name] click.echo("Okay, using profile {}!".format(click.style(profile_name, bold=True))) else: if "default" in profile_names: default_profile = [p for p in profile_names if p == "default"][0] else: default_profile = profile_names[0] while True: profile_name = input("We found the following profiles: {}, and {}. "\ "Which would you like us to use? (default '{}'): " .format( ', '.join(profile_names[:-1]), profile_names[-1], default_profile )) or default_profile if profile_name in profiles: profile = profiles[profile_name] break else: click.echo("Please enter a valid name for your AWS profile.") profile_region = profile.get("region") if profile else None # Create Bucket click.echo("\nYour Zappa deployments will need to be uploaded to a " + click.style("private S3 bucket", bold=True) + ".") click.echo("If you don't have a bucket yet, we'll create one for you too.") default_bucket = "zappa-" + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(9)) while True: bucket = input("What do you want to call your bucket? (default '%s'): " % default_bucket) or default_bucket if is_valid_bucket_name(bucket): break click.echo(click.style("Invalid bucket name!", bold=True)) click.echo("S3 buckets must be named according to the following rules:") click.echo("""* Bucket names must be unique across all existing bucket names in Amazon S3. * Bucket names must comply with DNS naming conventions. * Bucket names must be at least 3 and no more than 63 characters long. * Bucket names must not contain uppercase characters or underscores. * Bucket names must start with a lowercase letter or number. * Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number. * Bucket names must not be formatted as an IP address (for example, 192.168.5.4). * When you use virtual hosted–style buckets with Secure Sockets Layer (SSL), the SSL wildcard certificate only matches buckets that don't contain periods. To work around this, use HTTP or write your own certificate verification logic. We recommend that you do not use periods (".") in bucket names when using virtual hosted–style buckets. """) # Detect Django/Flask try: # pragma: no cover import django has_django = True except ImportError as e: has_django = False try: # pragma: no cover import flask has_flask = True except ImportError as e: has_flask = False print('') # App-specific if has_django: # pragma: no cover click.echo("It looks like this is a " + click.style("Django", bold=True) + " application!") click.echo("What is the " + click.style("module path", bold=True) + " to your projects's Django settings?") django_settings = None matches = detect_django_settings() while django_settings in [None, '']: if matches: click.echo("We discovered: " + click.style(', '.join('{}'.format(i) for v, i in enumerate(matches)), bold=True)) django_settings = input("Where are your project's settings? (default '%s'): " % matches[0]) or matches[0] else: click.echo("(This will likely be something like 'your_project.settings')") django_settings = input("Where are your project's settings?: ") django_settings = django_settings.replace("'", "") django_settings = django_settings.replace('"', "") else: matches = None if has_flask: click.echo("It looks like this is a " + click.style("Flask", bold=True) + " application.") matches = detect_flask_apps() click.echo("What's the " + click.style("modular path", bold=True) + " to your app's function?") click.echo("This will likely be something like 'your_module.app'.") app_function = None while app_function in [None, '']: if matches: click.echo("We discovered: " + click.style(', '.join('{}'.format(i) for v, i in enumerate(matches)), bold=True)) app_function = input("Where is your app's function? (default '%s'): " % matches[0]) or matches[0] else: app_function = input("Where is your app's function?: ") app_function = app_function.replace("'", "") app_function = app_function.replace('"', "") # TODO: Create VPC? # Memory size? Time limit? # Domain? LE keys? Region? # 'Advanced Settings' mode? # Globalize click.echo("\nYou can optionally deploy to " + click.style("all available regions", bold=True) + " in order to provide fast global service.") click.echo("If you are using Zappa for the first time, you probably don't want to do this!") global_deployment = False while True: global_type = input("Would you like to deploy this application " + click.style("globally", bold=True) + "? (default 'n') [y/n/(p)rimary]: ") if not global_type: break if global_type.lower() in ["y", "yes", "p", "primary"]: global_deployment = True break if global_type.lower() in ["n", "no"]: global_deployment = False break # The given environment name zappa_settings = { env: { 'profile_name': profile_name, 's3_bucket': bucket, 'runtime': get_venv_from_python_version(), 'project_name': self.get_project_name() } } if profile_region: zappa_settings[env]['aws_region'] = profile_region if has_django: zappa_settings[env]['django_settings'] = django_settings else: zappa_settings[env]['app_function'] = app_function # Global Region Deployment if global_deployment: additional_regions = [r for r in API_GATEWAY_REGIONS if r != profile_region] # Create additional stages if global_type.lower() in ["p", "primary"]: additional_regions = [r for r in additional_regions if '-1' in r] for region in additional_regions: env_name = env + '_' + region.replace('-', '_') g_env = { env_name: { 'extends': env, 'aws_region': region } } zappa_settings.update(g_env) import json as json # hjson is fine for loading, not fine for writing. zappa_settings_json = json.dumps(zappa_settings, sort_keys=True, indent=4) click.echo("\nOkay, here's your " + click.style("zappa_settings.json", bold=True) + ":\n") click.echo(click.style(zappa_settings_json, fg="yellow", bold=False)) confirm = input("\nDoes this look " + click.style("okay", bold=True, fg="green") + "? (default 'y') [y/n]: ") or 'yes' if confirm[0] not in ['y', 'Y', 'yes', 'YES']: click.echo("" + click.style("Sorry", bold=True, fg='red') + " to hear that! Please init again.") return # Write with open("zappa_settings.json", "w") as zappa_settings_file: zappa_settings_file.write(zappa_settings_json) if global_deployment: click.echo("\n" + click.style("Done", bold=True) + "! You can also " + click.style("deploy all", bold=True) + " by executing:\n") click.echo(click.style("\t$ zappa deploy --all", bold=True)) click.echo("\nAfter that, you can " + click.style("update", bold=True) + " your application code with:\n") click.echo(click.style("\t$ zappa update --all", bold=True)) else: click.echo("\n" + click.style("Done", bold=True) + "! Now you can " + click.style("deploy", bold=True) + " your Zappa application by executing:\n") click.echo(click.style("\t$ zappa deploy %s" % env, bold=True)) click.echo("\nAfter that, you can " + click.style("update", bold=True) + " your application code with:\n") click.echo(click.style("\t$ zappa update %s" % env, bold=True)) click.echo("\nTo learn more, check out our project page on " + click.style("GitHub", bold=True) + " here: " + click.style("https://github.com/Miserlou/Zappa", fg="cyan", bold=True)) click.echo("and stop by our " + click.style("Slack", bold=True) + " channel here: " + click.style("https://zappateam.slack.com", fg="cyan", bold=True)) click.echo("\nEnjoy!,") click.echo(" ~ Team " + click.style("Zappa", bold=True) + "!") return def certify(self, no_confirm=True, manual=False): """ Register or update a domain certificate for this env. """ if not self.domain: raise ClickException("Can't certify a domain without " + click.style("domain", fg="red", bold=True) + " configured!") if not no_confirm: # pragma: no cover confirm = input("Are you sure you want to certify? [y/n] ") if confirm != 'y': return # Make sure this isn't already deployed. deployed_versions = self.zappa.get_lambda_function_versions(self.lambda_name) if len(deployed_versions) == 0: raise ClickException("This application " + click.style("isn't deployed yet", fg="red") + " - did you mean to call " + click.style("deploy", bold=True) + "?") account_key_location = self.stage_config.get('lets_encrypt_key', None) cert_location = self.stage_config.get('certificate', None) cert_key_location = self.stage_config.get('certificate_key', None) cert_chain_location = self.stage_config.get('certificate_chain', None) cert_arn = self.stage_config.get('certificate_arn', None) base_path = self.stage_config.get('base_path', None) # These are sensitive certificate_body = None certificate_private_key = None certificate_chain = None # Prepare for custom Let's Encrypt if not cert_location and not cert_arn: if not account_key_location: raise ClickException("Can't certify a domain without " + click.style("lets_encrypt_key", fg="red", bold=True) + " or " + click.style("certificate", fg="red", bold=True)+ " or " + click.style("certificate_arn", fg="red", bold=True) + " configured!") # Get install account_key to /tmp/account_key.pem from .letsencrypt import gettempdir if account_key_location.startswith('s3://'): bucket, key_name = parse_s3_url(account_key_location) self.zappa.s3_client.download_file(bucket, key_name, os.path.join(gettempdir(), 'account.key')) else: from shutil import copyfile copyfile(account_key_location, os.path.join(gettempdir(), 'account.key')) # Prepare for Custom SSL elif not account_key_location and not cert_arn: if not cert_location or not cert_key_location or not cert_chain_location: raise ClickException("Can't certify a domain without " + click.style("certificate, certificate_key and certificate_chain", fg="red", bold=True) + " configured!") # Read the supplied certificates. with open(cert_location) as f: certificate_body = f.read() with open(cert_key_location) as f: certificate_private_key = f.read() with open(cert_chain_location) as f: certificate_chain = f.read() click.echo("Certifying domain " + click.style(self.domain, fg="green", bold=True) + "..") # Get cert and update domain. # Let's Encrypt if not cert_location and not cert_arn: from .letsencrypt import get_cert_and_update_domain cert_success = get_cert_and_update_domain( self.zappa, self.lambda_name, self.api_stage, self.domain, manual ) # Custom SSL / ACM else: route53 = self.stage_config.get('route53_enabled', True) if not self.zappa.get_domain_name(self.domain, route53=route53): dns_name = self.zappa.create_domain_name( domain_name=self.domain, certificate_name=self.domain + "-Zappa-Cert", certificate_body=certificate_body, certificate_private_key=certificate_private_key, certificate_chain=certificate_chain, certificate_arn=cert_arn, lambda_name=self.lambda_name, stage=self.api_stage, base_path=base_path ) if route53: self.zappa.update_route53_records(self.domain, dns_name) print("Created a new domain name with supplied certificate. 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.") else: self.zappa.update_domain_name( domain_name=self.domain, certificate_name=self.domain + "-Zappa-Cert", certificate_body=certificate_body, certificate_private_key=certificate_private_key, certificate_chain=certificate_chain, certificate_arn=cert_arn, lambda_name=self.lambda_name, stage=self.api_stage, route53=route53, base_path=base_path ) cert_success = True if cert_success: click.echo("Certificate " + click.style("updated", fg="green", bold=True) + "!") else: click.echo(click.style("Failed", fg="red", bold=True) + " to generate or install certificate! :(") click.echo("\n==============\n") shamelessly_promote() ## # Shell ## def shell(self): """ Spawn a debug shell. """ 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!") self.zappa.shell() return ## # Utility ## def callback(self, position): """ Allows the execution of custom code between creation of the zip file and deployment to AWS. :return: None """ callbacks = self.stage_config.get('callbacks', {}) callback = callbacks.get(position) if callback: (mod_path, cb_func_name) = callback.rsplit('.', 1) try: # Prefer callback in working directory if mod_path.count('.') >= 1: # Callback function is nested in a folder (mod_folder_path, mod_name) = mod_path.rsplit('.', 1) mod_folder_path_fragments = mod_folder_path.split('.') working_dir = os.path.join(os.getcwd(), *mod_folder_path_fragments) else: mod_name = mod_path working_dir = os.getcwd() working_dir_importer = pkgutil.get_importer(working_dir) module_ = working_dir_importer.find_module(mod_name).load_module(mod_name) except (ImportError, AttributeError): try: # Callback func might be in virtualenv module_ = importlib.import_module(mod_path) except ImportError: # pragma: no cover raise ClickException(click.style("Failed ", fg="red") + 'to ' + click.style( "import {position} callback ".format(position=position), bold=True) + 'module: "{mod_path}"'.format(mod_path=click.style(mod_path, bold=True))) if not hasattr(module_, cb_func_name): # pragma: no cover raise ClickException(click.style("Failed ", fg="red") + 'to ' + click.style( "find {position} callback ".format(position=position), bold=True) + 'function: "{cb_func_name}" '.format( cb_func_name=click.style(cb_func_name, bold=True)) + 'in module "{mod_path}"'.format(mod_path=mod_path)) cb_func = getattr(module_, cb_func_name) cb_func(self) # Call the function passing self def check_for_update(self): """ Print a warning if there's a new Zappa version available. """ try: version = pkg_resources.require("zappa")[0].version updateable = check_new_version_available(version) if updateable: click.echo(click.style("Important!", fg="yellow", bold=True) + " A new version of " + click.style("Zappa", bold=True) + " is available!") click.echo("Upgrade with: " + click.style("pip install zappa --upgrade", bold=True)) click.echo("Visit the project page on GitHub to see the latest changes: " + click.style("https://github.com/Miserlou/Zappa", bold=True)) except Exception as e: # pragma: no cover print(e) return def load_settings(self, settings_file=None, session=None): """ Load the local zappa_settings file. An existing boto session can be supplied, though this is likely for testing purposes. Returns the loaded Zappa object. """ # Ensure we're passed a valid settings file. if not settings_file: settings_file = self.get_json_or_yaml_settings() if not os.path.isfile(settings_file): raise ClickException("Please configure your zappa_settings file.") # Load up file self.load_settings_file(settings_file) # Make sure that the stages are valid names: for stage_name in self.zappa_settings.keys(): try: self.check_stage_name(stage_name) except ValueError: raise ValueError("API stage names must match a-zA-Z0-9_ ; '{0!s}' does not.".format(stage_name)) # Make sure that this stage is our settings if self.api_stage not in self.zappa_settings.keys(): raise ClickException("Please define stage '{0!s}' in your Zappa settings.".format(self.api_stage)) # We need a working title for this project. Use one if supplied, else cwd dirname. if 'project_name' in self.stage_config: # pragma: no cover # If the name is invalid, this will throw an exception with message up stack self.project_name = validate_name(self.stage_config['project_name']) else: self.project_name = self.get_project_name() # The name of the actual AWS Lambda function, ex, 'helloworld-dev' # Assume that we already have have validated the name beforehand. # Related: https://github.com/Miserlou/Zappa/pull/664 # https://github.com/Miserlou/Zappa/issues/678 # And various others from Slack. self.lambda_name = slugify.slugify(self.project_name + '-' + self.api_stage) # Load stage-specific settings self.s3_bucket_name = self.stage_config.get('s3_bucket', "zappa-" + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(9))) self.vpc_config = self.stage_config.get('vpc_config', {}) self.memory_size = self.stage_config.get('memory_size', 512) self.app_function = self.stage_config.get('app_function', None) self.exception_handler = self.stage_config.get('exception_handler', None) self.aws_region = self.stage_config.get('aws_region', None) self.debug = self.stage_config.get('debug', True) self.prebuild_script = self.stage_config.get('prebuild_script', None) self.profile_name = self.stage_config.get('profile_name', None) self.log_level = self.stage_config.get('log_level', "DEBUG") self.domain = self.stage_config.get('domain', None) self.base_path = self.stage_config.get('base_path', None) self.timeout_seconds = self.stage_config.get('timeout_seconds', 30) dead_letter_arn = self.stage_config.get('dead_letter_arn', '') self.dead_letter_config = {'TargetArn': dead_letter_arn} if dead_letter_arn else {} self.cognito = self.stage_config.get('cognito', None) self.num_retained_versions = self.stage_config.get('num_retained_versions',None) # Check for valid values of num_retained_versions if self.num_retained_versions is not None and type(self.num_retained_versions) is not int: 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)) elif type(self.num_retained_versions) is int and self.num_retained_versions<1: raise ClickException("The value for num_retained_versions in the zappa_settings.json should be greater than 0.") # Provide legacy support for `use_apigateway`, now `apigateway_enabled`. # https://github.com/Miserlou/Zappa/issues/490 # https://github.com/Miserlou/Zappa/issues/493 self.use_apigateway = self.stage_config.get('use_apigateway', True) if self.use_apigateway: self.use_apigateway = self.stage_config.get('apigateway_enabled', True) self.apigateway_description = self.stage_config.get('apigateway_description', None) self.lambda_handler = self.stage_config.get('lambda_handler', 'handler.lambda_handler') # DEPRECATED. https://github.com/Miserlou/Zappa/issues/456 self.remote_env_bucket = self.stage_config.get('remote_env_bucket', None) self.remote_env_file = self.stage_config.get('remote_env_file', None) self.remote_env = self.stage_config.get('remote_env', None) self.settings_file = self.stage_config.get('settings_file', None) self.django_settings = self.stage_config.get('django_settings', None) self.manage_roles = self.stage_config.get('manage_roles', True) self.binary_support = self.stage_config.get('binary_support', True) self.api_key_required = self.stage_config.get('api_key_required', False) self.api_key = self.stage_config.get('api_key') self.endpoint_configuration = self.stage_config.get('endpoint_configuration', None) self.iam_authorization = self.stage_config.get('iam_authorization', False) self.cors = self.stage_config.get("cors", False) self.lambda_description = self.stage_config.get('lambda_description', "Zappa Deployment") self.lambda_concurrency = self.stage_config.get('lambda_concurrency', None) self.environment_variables = self.stage_config.get('environment_variables', {}) self.aws_environment_variables = self.stage_config.get('aws_environment_variables', {}) self.check_environment(self.environment_variables) self.authorizer = self.stage_config.get('authorizer', {}) self.runtime = self.stage_config.get('runtime', get_runtime_from_python_version()) self.aws_kms_key_arn = self.stage_config.get('aws_kms_key_arn', '') self.context_header_mappings = self.stage_config.get('context_header_mappings', {}) self.xray_tracing = self.stage_config.get('xray_tracing', False) self.desired_role_arn = self.stage_config.get('role_arn') self.layers = self.stage_config.get('layers', None) # Load ALB-related settings self.use_alb = self.stage_config.get('alb_enabled', False) self.alb_vpc_config = self.stage_config.get('alb_vpc_config', {}) # Additional tags self.tags = self.stage_config.get('tags', {}) desired_role_name = self.lambda_name + "-ZappaLambdaExecutionRole" self.zappa = Zappa( boto_session=session, profile_name=self.profile_name, aws_region=self.aws_region, load_credentials=self.load_credentials, desired_role_name=desired_role_name, desired_role_arn=self.desired_role_arn, runtime=self.runtime, tags=self.tags, endpoint_urls=self.stage_config.get('aws_endpoint_urls',{}), xray_tracing=self.xray_tracing ) for setting in CUSTOM_SETTINGS: if setting in self.stage_config: setting_val = self.stage_config[setting] # Read the policy file contents. if setting.endswith('policy'): with open(setting_val, 'r') as f: setting_val = f.read() setattr(self.zappa, setting, setting_val) if self.app_function: self.collision_warning(self.app_function) if self.app_function[-3:] == '.py': click.echo(click.style("Warning!", fg="red", bold=True) + " Your app_function is pointing to a " + click.style("file and not a function", bold=True) + "! It should probably be something like 'my_file.app', not 'my_file.py'!") return self.zappa def get_json_or_yaml_settings(self, settings_name="zappa_settings"): """ Return zappa_settings path as JSON or YAML (or TOML), as appropriate. """ zs_json = settings_name + ".json" zs_yml = settings_name + ".yml" zs_yaml = settings_name + ".yaml" zs_toml = settings_name + ".toml" # Must have at least one if not os.path.isfile(zs_json) \ and not os.path.isfile(zs_yml) \ and not os.path.isfile(zs_yaml) \ and not os.path.isfile(zs_toml): raise ClickException("Please configure a zappa_settings file or call `zappa init`.") # Prefer JSON if os.path.isfile(zs_json): settings_file = zs_json elif os.path.isfile(zs_toml): settings_file = zs_toml elif os.path.isfile(zs_yml): settings_file = zs_yml else: settings_file = zs_yaml return settings_file def load_settings_file(self, settings_file=None): """ Load our settings file. """ if not settings_file: settings_file = self.get_json_or_yaml_settings() if not os.path.isfile(settings_file): raise ClickException("Please configure your zappa_settings file or call `zappa init`.") path, ext = os.path.splitext(settings_file) if ext == '.yml' or ext == '.yaml': with open(settings_file) as yaml_file: try: self.zappa_settings = yaml.safe_load(yaml_file) except ValueError: # pragma: no cover raise ValueError("Unable to load the Zappa settings YAML. It may be malformed.") elif ext == '.toml': with open(settings_file) as toml_file: try: self.zappa_settings = toml.load(toml_file) except ValueError: # pragma: no cover raise ValueError("Unable to load the Zappa settings TOML. It may be malformed.") else: with open(settings_file) as json_file: try: self.zappa_settings = json.load(json_file) except ValueError: # pragma: no cover raise ValueError("Unable to load the Zappa settings JSON. It may be malformed.") def create_package(self, output=None): """ Ensure that the package can be properly configured, and then create it. """ # Create the Lambda zip package (includes project and virtualenvironment) # Also define the path the handler file so it can be copied to the zip # root for Lambda. current_file = os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))) handler_file = os.sep.join(current_file.split(os.sep)[0:]) + os.sep + 'handler.py' # Create the zip file(s) if self.stage_config.get('slim_handler', False): # Create two zips. One with the application and the other with just the handler. # https://github.com/Miserlou/Zappa/issues/510 self.zip_path = self.zappa.create_lambda_zip( prefix=self.lambda_name, use_precompiled_packages=self.stage_config.get('use_precompiled_packages', True), exclude=self.stage_config.get('exclude', []), exclude_glob=self.stage_config.get('exclude_glob', []), disable_progress=self.disable_progress, archive_format='tarball' ) # Make sure the normal venv is not included in the handler's zip exclude = self.stage_config.get('exclude', []) cur_venv = self.zappa.get_current_venv() exclude.append(cur_venv.split('/')[-1]) self.handler_path = self.zappa.create_lambda_zip( prefix='handler_{0!s}'.format(self.lambda_name), venv=self.zappa.create_handler_venv(), handler_file=handler_file, slim_handler=True, exclude=exclude, exclude_glob=self.stage_config.get('exclude_glob', []), output=output, disable_progress=self.disable_progress ) else: # This could be python3.6 optimized. exclude = self.stage_config.get( 'exclude', [ "boto3", "dateutil", "botocore", "s3transfer", "concurrent" ]) # Create a single zip that has the handler and application self.zip_path = self.zappa.create_lambda_zip( prefix=self.lambda_name, handler_file=handler_file, use_precompiled_packages=self.stage_config.get('use_precompiled_packages', True), exclude=exclude, exclude_glob=self.stage_config.get('exclude_glob', []), output=output, disable_progress=self.disable_progress ) # Warn if this is too large for Lambda. file_stats = os.stat(self.zip_path) if file_stats.st_size > 52428800: # pragma: no cover print('\n\nWarning: Application zip package is likely to be too large for AWS Lambda. ' 'Try setting "slim_handler" to true in your Zappa settings file.\n\n') # Throw custom settings into the zip that handles requests if self.stage_config.get('slim_handler', False): handler_zip = self.handler_path else: handler_zip = self.zip_path with zipfile.ZipFile(handler_zip, 'a') as lambda_zip: settings_s = "# Generated by Zappa\n" if self.app_function: if '.' not in self.app_function: # pragma: no cover raise ClickException("Your " + click.style("app_function", fg='red', bold=True) + " value is not a modular path." + " It needs to be in the format `" + click.style("your_module.your_app_object", bold=True) + "`.") app_module, app_function = self.app_function.rsplit('.', 1) settings_s = settings_s + "APP_MODULE='{0!s}'\nAPP_FUNCTION='{1!s}'\n".format(app_module, app_function) if self.exception_handler: settings_s += "EXCEPTION_HANDLER='{0!s}'\n".format(self.exception_handler) else: settings_s += "EXCEPTION_HANDLER=None\n" if self.debug: settings_s = settings_s + "DEBUG=True\n" else: settings_s = settings_s + "DEBUG=False\n" settings_s = settings_s + "LOG_LEVEL='{0!s}'\n".format((self.log_level)) if self.binary_support: settings_s = settings_s + "BINARY_SUPPORT=True\n" else: settings_s = settings_s + "BINARY_SUPPORT=False\n" head_map_dict = {} head_map_dict.update(dict(self.context_header_mappings)) settings_s = settings_s + "CONTEXT_HEADER_MAPPINGS={0}\n".format( head_map_dict ) # If we're on a domain, we don't need to define the /<> in # the WSGI PATH if self.domain: settings_s = settings_s + "DOMAIN='{0!s}'\n".format((self.domain)) else: settings_s = settings_s + "DOMAIN=None\n" if self.base_path: settings_s = settings_s + "BASE_PATH='{0!s}'\n".format((self.base_path)) else: settings_s = settings_s + "BASE_PATH=None\n" # Pass through remote config bucket and path if self.remote_env: settings_s = settings_s + "REMOTE_ENV='{0!s}'\n".format( self.remote_env ) # DEPRECATED. use remove_env instead elif self.remote_env_bucket and self.remote_env_file: settings_s = settings_s + "REMOTE_ENV='s3://{0!s}/{1!s}'\n".format( self.remote_env_bucket, self.remote_env_file ) # Local envs env_dict = {} if self.aws_region: env_dict['AWS_REGION'] = self.aws_region env_dict.update(dict(self.environment_variables)) # Environment variable keys must be ascii # https://github.com/Miserlou/Zappa/issues/604 # https://github.com/Miserlou/Zappa/issues/998 try: env_dict = dict((k.encode('ascii').decode('ascii'), v) for (k, v) in env_dict.items()) except Exception: raise ValueError("Environment variable keys must be ascii.") settings_s = settings_s + "ENVIRONMENT_VARIABLES={0}\n".format( env_dict ) # We can be environment-aware settings_s = settings_s + "API_STAGE='{0!s}'\n".format((self.api_stage)) settings_s = settings_s + "PROJECT_NAME='{0!s}'\n".format((self.project_name)) if self.settings_file: settings_s = settings_s + "SETTINGS_FILE='{0!s}'\n".format((self.settings_file)) else: settings_s = settings_s + "SETTINGS_FILE=None\n" if self.django_settings: settings_s = settings_s + "DJANGO_SETTINGS='{0!s}'\n".format((self.django_settings)) else: settings_s = settings_s + "DJANGO_SETTINGS=None\n" # If slim handler, path to project zip if self.stage_config.get('slim_handler', False): settings_s += "ARCHIVE_PATH='s3://{0!s}/{1!s}_{2!s}_current_project.tar.gz'\n".format( self.s3_bucket_name, self.api_stage, self.project_name) # since includes are for slim handler add the setting here by joining arbitrary list from zappa_settings file # and tell the handler we are the slim_handler # https://github.com/Miserlou/Zappa/issues/776 settings_s += "SLIM_HANDLER=True\n" include = self.stage_config.get('include', []) if len(include) >= 1: settings_s += "INCLUDE=" + str(include) + '\n' # AWS Events function mapping event_mapping = {} events = self.stage_config.get('events', []) for event in events: arn = event.get('event_source', {}).get('arn') function = event.get('function') if arn and function: event_mapping[arn] = function settings_s = settings_s + "AWS_EVENT_MAPPING={0!s}\n".format(event_mapping) # Map Lext bot events bot_events = self.stage_config.get('bot_events', []) bot_events_mapping = {} for bot_event in bot_events: event_source = bot_event.get('event_source', {}) intent = event_source.get('intent') invocation_source = event_source.get('invocation_source') function = bot_event.get('function') if intent and invocation_source and function: bot_events_mapping[str(intent) + ':' + str(invocation_source)] = function settings_s = settings_s + "AWS_BOT_EVENT_MAPPING={0!s}\n".format(bot_events_mapping) # Map cognito triggers cognito_trigger_mapping = {} cognito_config = self.stage_config.get('cognito', {}) triggers = cognito_config.get('triggers', []) for trigger in triggers: source = trigger.get('source') function = trigger.get('function') if source and function: cognito_trigger_mapping[source] = function settings_s = settings_s + "COGNITO_TRIGGER_MAPPING={0!s}\n".format(cognito_trigger_mapping) # Authorizer config authorizer_function = self.authorizer.get('function', None) if authorizer_function: settings_s += "AUTHORIZER_FUNCTION='{0!s}'\n".format(authorizer_function) # Copy our Django app into root of our package. # It doesn't work otherwise. if self.django_settings: base = __file__.rsplit(os.sep, 1)[0] django_py = ''.join(os.path.join(base, 'ext', 'django_zappa.py')) lambda_zip.write(django_py, 'django_zappa_app.py') # async response async_response_table = self.stage_config.get('async_response_table', '') settings_s += "ASYNC_RESPONSE_TABLE='{0!s}'\n".format(async_response_table) # Lambda requires a specific chmod temp_settings = tempfile.NamedTemporaryFile(delete=False) os.chmod(temp_settings.name, 0o644) temp_settings.write(bytes(settings_s, "utf-8")) temp_settings.close() lambda_zip.write(temp_settings.name, 'zappa_settings.py') os.unlink(temp_settings.name) def remove_local_zip(self): """ Remove our local zip file. """ if self.stage_config.get('delete_local_zip', True): try: if os.path.isfile(self.zip_path): os.remove(self.zip_path) if self.handler_path and os.path.isfile(self.handler_path): os.remove(self.handler_path) except Exception as e: # pragma: no cover sys.exit(-1) def remove_uploaded_zip(self): """ Remove the local and S3 zip file after uploading and updating. """ # Remove the uploaded zip from S3, because it is now registered.. if self.stage_config.get('delete_s3_zip', True): self.zappa.remove_from_s3(self.zip_path, self.s3_bucket_name) if self.stage_config.get('slim_handler', False): # Need to keep the project zip as the slim handler uses it. self.zappa.remove_from_s3(self.handler_path, self.s3_bucket_name) def on_exit(self): """ Cleanup after the command finishes. Always called: SystemExit, KeyboardInterrupt and any other Exception that occurs. """ if self.zip_path: # Only try to remove uploaded zip if we're running a command that has loaded credentials if self.load_credentials: self.remove_uploaded_zip() self.remove_local_zip() def print_logs(self, logs, colorize=True, http=False, non_http=False, force_colorize=None): """ Parse, filter and print logs to the console. """ for log in logs: timestamp = log['timestamp'] message = log['message'] if "START RequestId" in message: continue if "REPORT RequestId" in message: continue if "END RequestId" in message: continue if not colorize and not force_colorize: if http: if self.is_http_log_entry(message.strip()): print("[" + str(timestamp) + "] " + message.strip()) elif non_http: if not self.is_http_log_entry(message.strip()): print("[" + str(timestamp) + "] " + message.strip()) else: print("[" + str(timestamp) + "] " + message.strip()) else: if http: if self.is_http_log_entry(message.strip()): 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) elif non_http: if not self.is_http_log_entry(message.strip()): 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) else: 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) def is_http_log_entry(self, string): """ Determines if a log entry is an HTTP-formatted log string or not. """ # Debug event filter if 'Zappa Event' in string: return False # IP address filter for token in string.replace('\t', ' ').split(' '): try: if (token.count('.') == 3 and token.replace('.', '').isnumeric()): return True except Exception: # pragma: no cover pass return False def get_project_name(self): return slugify.slugify(os.getcwd().split(os.sep)[-1])[:15] def colorize_log_entry(self, string): """ Apply various heuristics to return a colorized version of a string. If these fail, simply return the string in plaintext. """ final_string = string try: # First, do stuff in square brackets inside_squares = re.findall(r'\[([^]]*)\]', string) for token in inside_squares: if token in ['CRITICAL', 'ERROR', 'WARNING', 'DEBUG', 'INFO', 'NOTSET']: final_string = final_string.replace('[' + token + ']', click.style("[", fg='cyan') + click.style(token, fg='cyan', bold=True) + click.style("]", fg='cyan')) else: final_string = final_string.replace('[' + token + ']', click.style("[", fg='cyan') + click.style(token, bold=True) + click.style("]", fg='cyan')) # Then do quoted strings quotes = re.findall(r'"[^"]*"', string) for token in quotes: final_string = final_string.replace(token, click.style(token, fg="yellow")) # And UUIDs for token in final_string.replace('\t', ' ').split(' '): try: if token.count('-') == 4 and token.replace('-', '').isalnum(): final_string = final_string.replace(token, click.style(token, fg="magenta")) except Exception: # pragma: no cover pass # And IP addresses try: if token.count('.') == 3 and token.replace('.', '').isnumeric(): final_string = final_string.replace(token, click.style(token, fg="red")) except Exception: # pragma: no cover pass # And status codes try: if token in ['200']: final_string = final_string.replace(token, click.style(token, fg="green")) if token in ['400', '401', '403', '404', '405', '500']: final_string = final_string.replace(token, click.style(token, fg="red")) except Exception: # pragma: no cover pass # And Zappa Events try: if "Zappa Event:" in final_string: final_string = final_string.replace("Zappa Event:", click.style("Zappa Event:", bold=True, fg="green")) except Exception: # pragma: no cover pass # And dates for token in final_string.split('\t'): try: is_date = parser.parse(token) final_string = final_string.replace(token, click.style(token, fg="green")) except Exception: # pragma: no cover pass final_string = final_string.replace('\t', ' ').replace(' ', ' ') if final_string[0] != ' ': final_string = ' ' + final_string return final_string except Exception as e: # pragma: no cover return string def execute_prebuild_script(self): """ Parse and execute the prebuild_script from the zappa_settings. """ (pb_mod_path, pb_func) = self.prebuild_script.rsplit('.', 1) try: # Prefer prebuild script in working directory if pb_mod_path.count('.') >= 1: # Prebuild script func is nested in a folder (mod_folder_path, mod_name) = pb_mod_path.rsplit('.', 1) mod_folder_path_fragments = mod_folder_path.split('.') working_dir = os.path.join(os.getcwd(), *mod_folder_path_fragments) else: mod_name = pb_mod_path working_dir = os.getcwd() working_dir_importer = pkgutil.get_importer(working_dir) module_ = working_dir_importer.find_module(mod_name).load_module(mod_name) except (ImportError, AttributeError): try: # Prebuild func might be in virtualenv module_ = importlib.import_module(pb_mod_path) except ImportError: # pragma: no cover raise ClickException(click.style("Failed ", fg="red") + 'to ' + click.style( "import prebuild script ", bold=True) + 'module: "{pb_mod_path}"'.format( pb_mod_path=click.style(pb_mod_path, bold=True))) if not hasattr(module_, pb_func): # pragma: no cover raise ClickException(click.style("Failed ", fg="red") + 'to ' + click.style( "find prebuild script ", bold=True) + 'function: "{pb_func}" '.format( pb_func=click.style(pb_func, bold=True)) + 'in module "{pb_mod_path}"'.format( pb_mod_path=pb_mod_path)) prebuild_function = getattr(module_, pb_func) prebuild_function() # Call the function def collision_warning(self, item): """ Given a string, print a warning if this could collide with a Zappa core package module. Use for app functions and events. """ namespace_collisions = [ "zappa.", "wsgi.", "middleware.", "handler.", "util.", "letsencrypt.", "cli." ] for namespace_collision in namespace_collisions: if item.startswith(namespace_collision): click.echo(click.style("Warning!", fg="red", bold=True) + " You may have a namespace collision between " + click.style(item, bold=True) + " and " + click.style(namespace_collision, bold=True) + "! You may want to rename that file.") def deploy_api_gateway(self, api_id): cache_cluster_enabled = self.stage_config.get('cache_cluster_enabled', False) cache_cluster_size = str(self.stage_config.get('cache_cluster_size', .5)) endpoint_url = self.zappa.deploy_api_gateway( api_id=api_id, stage_name=self.api_stage, cache_cluster_enabled=cache_cluster_enabled, cache_cluster_size=cache_cluster_size, cloudwatch_log_level=self.stage_config.get('cloudwatch_log_level', 'OFF'), cloudwatch_data_trace=self.stage_config.get('cloudwatch_data_trace', False), cloudwatch_metrics_enabled=self.stage_config.get('cloudwatch_metrics_enabled', False), cache_cluster_ttl=self.stage_config.get('cache_cluster_ttl', 300), cache_cluster_encrypted=self.stage_config.get('cache_cluster_encrypted', False) ) return endpoint_url def check_venv(self): """ Ensure we're inside a virtualenv. """ if self.vargs and self.vargs.get("no_venv"): return if self.zappa: venv = self.zappa.get_current_venv() else: # Just for `init`, when we don't have settings yet. venv = Zappa.get_current_venv() if not venv: raise ClickException( click.style("Zappa", bold=True) + " requires an " + click.style("active virtual environment", bold=True, fg="red") + "!\n" + "Learn more about virtual environments here: " + click.style("http://docs.python-guide.org/en/latest/dev/virtualenvs/", bold=False, fg="cyan")) def silence(self): """ Route all stdout to null. """ sys.stdout = open(os.devnull, 'w') sys.stderr = open(os.devnull, 'w') def touch_endpoint(self, endpoint_url): """ Test the deployed endpoint with a GET request. """ # Private APIGW endpoints most likely can't be reached by a deployer # unless they're connected to the VPC by VPN. Instead of trying # connect to the service, print a warning and let the user know # to check it manually. # See: https://github.com/Miserlou/Zappa/pull/1719#issuecomment-471341565 if 'PRIVATE' in self.stage_config.get('endpoint_configuration', []): print( click.style("Warning!", fg="yellow", bold=True) + " Since you're deploying a private API Gateway endpoint," " Zappa cannot determine if your function is returning " " a correct status code. You should check your API's response" " manually before considering this deployment complete." ) return touch_path = self.stage_config.get('touch_path', '/') req = requests.get(endpoint_url + touch_path) # Sometimes on really large packages, it can take 60-90 secs to be # ready and requests will return 504 status_code until ready. # So, if we get a 504 status code, rerun the request up to 4 times or # until we don't get a 504 error if req.status_code == 504: i = 0 status_code = 504 while status_code == 504 and i <= 4: req = requests.get(endpoint_url + touch_path) status_code = req.status_code i += 1 if req.status_code >= 500: raise ClickException(click.style("Warning!", fg="red", bold=True) + " Status check on the deployed lambda failed." + " A GET request to '" + touch_path + "' yielded a " + click.style(str(req.status_code), fg="red", bold=True) + " response code.") #################################################################### # Main #################################################################### def shamelessly_promote(): """ Shamelessly promote our little community. """ click.echo("Need " + click.style("help", fg='green', bold=True) + "? Found a " + click.style("bug", fg='green', bold=True) + "? Let us " + click.style("know", fg='green', bold=True) + "! :D") click.echo("File bug reports on " + click.style("GitHub", bold=True) + " here: " + click.style("https://github.com/Miserlou/Zappa", fg='cyan', bold=True)) click.echo("And join our " + click.style("Slack", bold=True) + " channel here: " + click.style("https://zappateam.slack.com", fg='cyan', bold=True)) click.echo("Love!,") click.echo(" ~ Team " + click.style("Zappa", bold=True) + "!") def disable_click_colors(): """ Set a Click context where colors are disabled. Creates a throwaway BaseCommand to play nicely with the Context constructor. The intended side-effect here is that click.echo() checks this context and will suppress colors. https://github.com/pallets/click/blob/e1aa43a3/click/globals.py#L39 """ ctx = Context(BaseCommand('AllYourBaseAreBelongToUs')) ctx.color = False push_context(ctx) def handle(): # pragma: no cover """ Main program execution handler. """ try: cli = ZappaCLI() sys.exit(cli.handle()) except SystemExit as e: # pragma: no cover cli.on_exit() sys.exit(e.code) except KeyboardInterrupt: # pragma: no cover cli.on_exit() sys.exit(130) except Exception as e: cli.on_exit() click.echo("Oh no! An " + click.style("error occurred", fg='red', bold=True) + "! :(") click.echo("\n==============\n") import traceback traceback.print_exc() click.echo("\n==============\n") shamelessly_promote() sys.exit(-1) if __name__ == '__main__': # pragma: no cover handle() ================================================ FILE: zappa/core.py ================================================ """ Zappa core library. You may also want to look at `cli.py` and `util.py`. """ ## # Imports ## import getpass import glob import hashlib import json import logging import os import random import re import shutil import string import subprocess import tarfile import tempfile import time import uuid import zipfile from builtins import bytes, int from distutils.dir_util import copy_tree from io import open import requests from setuptools import find_packages import boto3 import botocore import troposphere import troposphere.apigateway from botocore.exceptions import ClientError from tqdm import tqdm from .utilities import (add_event_source, conflicts_with_a_neighbouring_module, contains_python_files_or_subdirs, copytree, get_topic_name, get_venv_from_python_version, human_size, remove_event_source) ## # Logging Config ## logging.basicConfig(format='%(levelname)s:%(message)s') logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) ## # Policies And Template Mappings ## ASSUME_POLICY = """{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": [ "apigateway.amazonaws.com", "lambda.amazonaws.com", "events.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] }""" ATTACH_POLICY = """{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:*" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "lambda:InvokeFunction" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "xray:PutTraceSegments", "xray:PutTelemetryRecords" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "ec2:AttachNetworkInterface", "ec2:CreateNetworkInterface", "ec2:DeleteNetworkInterface", "ec2:DescribeInstances", "ec2:DescribeNetworkInterfaces", "ec2:DetachNetworkInterface", "ec2:ModifyNetworkInterfaceAttribute", "ec2:ResetNetworkInterfaceAttribute" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:*" ], "Resource": "arn:aws:s3:::*" }, { "Effect": "Allow", "Action": [ "kinesis:*" ], "Resource": "arn:aws:kinesis:*:*:*" }, { "Effect": "Allow", "Action": [ "sns:*" ], "Resource": "arn:aws:sns:*:*:*" }, { "Effect": "Allow", "Action": [ "sqs:*" ], "Resource": "arn:aws:sqs:*:*:*" }, { "Effect": "Allow", "Action": [ "dynamodb:*" ], "Resource": "arn:aws:dynamodb:*:*:*" }, { "Effect": "Allow", "Action": [ "route53:*" ], "Resource": "*" } ] }""" # Latest list: https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region API_GATEWAY_REGIONS = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-central-1', 'eu-north-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-north-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', 'ap-east-1', 'ap-south-1', 'ca-central-1', 'cn-north-1', 'cn-northwest-1', 'sa-east-1', 'us-gov-east-1', 'us-gov-west-1'] # Latest list: https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region LAMBDA_REGIONS = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-central-1', 'eu-north-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-north-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', 'ap-east-1', 'ap-south-1', 'ca-central-1', 'cn-north-1', 'cn-northwest-1', 'sa-east-1', 'us-gov-east-1', 'us-gov-west-1'] # We never need to include these. # Related: https://github.com/Miserlou/Zappa/pull/56 # Related: https://github.com/Miserlou/Zappa/pull/581 ZIP_EXCLUDES = [ '*.exe', '*.DS_Store', '*.Python', '*.git', '.git/*', '*.zip', '*.tar.gz', '*.hg', 'pip', 'docutils*', 'setuputils*', '__pycache__/*' ] # When using ALB as an event source for Lambdas, we need to create an alias # to ensure that, on zappa update, the ALB doesn't lose permissions to access # the Lambda. # See: https://github.com/Miserlou/Zappa/pull/1730 ALB_LAMBDA_ALIAS = 'current-alb-version' ## # Classes ## class Zappa: """ Zappa! Makes it easy to run Python web applications on AWS Lambda/API Gateway. """ ## # Configurables ## http_methods = ['ANY'] role_name = "ZappaLambdaExecution" extra_permissions = None assume_policy = ASSUME_POLICY attach_policy = ATTACH_POLICY apigateway_policy = None cloudwatch_log_levels = ['OFF', 'ERROR', 'INFO'] xray_tracing = False ## # Credentials ## boto_session = None credentials_arn = None def __init__(self, boto_session=None, profile_name=None, aws_region=None, load_credentials=True, desired_role_name=None, desired_role_arn=None, runtime='python3.6', # Detected at runtime in CLI tags=(), endpoint_urls={}, xray_tracing=False ): """ Instantiate this new Zappa instance, loading any custom credentials if necessary. """ # Set aws_region to None to use the system's region instead if aws_region is None: # https://github.com/Miserlou/Zappa/issues/413 self.aws_region = boto3.Session().region_name logger.debug("Set region from boto: %s", self.aws_region) else: self.aws_region = aws_region if desired_role_name: self.role_name = desired_role_name if desired_role_arn: self.credentials_arn = desired_role_arn self.runtime = runtime if self.runtime == 'python3.6': self.manylinux_suffix_start = 'cp36m' elif self.runtime == 'python3.7': self.manylinux_suffix_start = 'cp37m' else: # The 'm' has been dropped in python 3.8+ since builds with and without pymalloc are ABI compatible # See https://github.com/pypa/manylinux for a more detailed explanation self.manylinux_suffix_start = 'cp38' # AWS Lambda supports manylinux1/2010 and manylinux2014 manylinux_suffixes = ("2014", "2010", "1") self.manylinux_wheel_file_match = re.compile(f'^.*{self.manylinux_suffix_start}-manylinux({"|".join(manylinux_suffixes)})_x86_64.whl$') self.manylinux_wheel_abi3_file_match = re.compile(f'^.*cp3.-abi3-manylinux({"|".join(manylinux_suffixes)})_x86_64.whl$') self.endpoint_urls = endpoint_urls self.xray_tracing = xray_tracing # Some common invocations, such as DB migrations, # can take longer than the default. # Note that this is set to 300s, but if connected to # APIGW, Lambda will max out at 30s. # Related: https://github.com/Miserlou/Zappa/issues/205 long_config_dict = { 'region_name': aws_region, 'connect_timeout': 5, 'read_timeout': 300 } long_config = botocore.client.Config(**long_config_dict) if load_credentials: self.load_credentials(boto_session, profile_name) # Initialize clients self.s3_client = self.boto_client('s3') self.lambda_client = self.boto_client('lambda', config=long_config) self.elbv2_client = self.boto_client('elbv2') self.events_client = self.boto_client('events') self.apigateway_client = self.boto_client('apigateway') # AWS ACM certificates need to be created from us-east-1 to be used by API gateway east_config = botocore.client.Config(region_name='us-east-1') self.acm_client = self.boto_client('acm', config=east_config) self.logs_client = self.boto_client('logs') self.iam_client = self.boto_client('iam') self.iam = self.boto_resource('iam') self.cloudwatch = self.boto_client('cloudwatch') self.route53 = self.boto_client('route53') self.sns_client = self.boto_client('sns') self.cf_client = self.boto_client('cloudformation') self.dynamodb_client = self.boto_client('dynamodb') self.cognito_client = self.boto_client('cognito-idp') self.sts_client = self.boto_client('sts') self.tags = tags self.cf_template = troposphere.Template() self.cf_api_resources = [] self.cf_parameters = {} def configure_boto_session_method_kwargs(self, service, kw): """Allow for custom endpoint urls for non-AWS (testing and bootleg cloud) deployments""" if service in self.endpoint_urls and not 'endpoint_url' in kw: kw['endpoint_url'] = self.endpoint_urls[service] return kw def boto_client(self, service, *args, **kwargs): """A wrapper to apply configuration options to boto clients""" return self.boto_session.client(service, *args, **self.configure_boto_session_method_kwargs(service, kwargs)) def boto_resource(self, service, *args, **kwargs): """A wrapper to apply configuration options to boto resources""" return self.boto_session.resource(service, *args, **self.configure_boto_session_method_kwargs(service, kwargs)) def cache_param(self, value): '''Returns a troposphere Ref to a value cached as a parameter.''' if value not in self.cf_parameters: keyname = chr(ord('A') + len(self.cf_parameters)) param = self.cf_template.add_parameter(troposphere.Parameter( keyname, Type="String", Default=value, tags=self.tags )) self.cf_parameters[value] = param return troposphere.Ref(self.cf_parameters[value]) ## # Packaging ## def copy_editable_packages(self, egg_links, temp_package_path): """ """ for egg_link in egg_links: with open(egg_link, 'rb') as df: egg_path = df.read().decode('utf-8').splitlines()[0].strip() pkgs = set([x.split(".")[0] for x in find_packages(egg_path, exclude=['test', 'tests'])]) for pkg in pkgs: copytree(os.path.join(egg_path, pkg), os.path.join(temp_package_path, pkg), metadata=False, symlinks=False) if temp_package_path: # now remove any egg-links as they will cause issues if they still exist for link in glob.glob(os.path.join(temp_package_path, "*.egg-link")): os.remove(link) def get_deps_list(self, pkg_name, installed_distros=None): """ For a given package, returns a list of required packages. Recursive. """ # https://github.com/Miserlou/Zappa/issues/1478. Using `pkg_resources` # instead of `pip` is the recommended approach. The usage is nearly # identical. import pkg_resources deps = [] if not installed_distros: installed_distros = pkg_resources.WorkingSet() for package in installed_distros: if package.project_name.lower() == pkg_name.lower(): deps = [(package.project_name, package.version)] for req in package.requires(): deps += self.get_deps_list(pkg_name=req.project_name, installed_distros=installed_distros) return list(set(deps)) # de-dupe before returning def create_handler_venv(self): """ Takes the installed zappa and brings it into a fresh virtualenv-like folder. All dependencies are then downloaded. """ import subprocess # We will need the currenv venv to pull Zappa from current_venv = self.get_current_venv() # Make a new folder for the handler packages ve_path = os.path.join(os.getcwd(), 'handler_venv') if os.sys.platform == 'win32': current_site_packages_dir = os.path.join(current_venv, 'Lib', 'site-packages') venv_site_packages_dir = os.path.join(ve_path, 'Lib', 'site-packages') else: current_site_packages_dir = os.path.join(current_venv, 'lib', get_venv_from_python_version(), 'site-packages') venv_site_packages_dir = os.path.join(ve_path, 'lib', get_venv_from_python_version(), 'site-packages') if not os.path.isdir(venv_site_packages_dir): os.makedirs(venv_site_packages_dir) # Copy zappa* to the new virtualenv zappa_things = [z for z in os.listdir(current_site_packages_dir) if z.lower()[:5] == 'zappa'] for z in zappa_things: copytree(os.path.join(current_site_packages_dir, z), os.path.join(venv_site_packages_dir, z)) # Use pip to download zappa's dependencies. Copying from current venv causes issues with things like PyYAML that installs as yaml zappa_deps = self.get_deps_list('zappa') pkg_list = ['{0!s}=={1!s}'.format(dep, version) for dep, version in zappa_deps] # Need to manually add setuptools pkg_list.append('setuptools') command = ["pip", "install", "--quiet", "--target", venv_site_packages_dir] + pkg_list # This is the recommended method for installing packages if you don't # to depend on `setuptools` # https://github.com/pypa/pip/issues/5240#issuecomment-381662679 pip_process = subprocess.Popen(command, stdout=subprocess.PIPE) # Using communicate() to avoid deadlocks pip_process.communicate() pip_return_code = pip_process.returncode if pip_return_code: raise EnvironmentError("Pypi lookup failed") return ve_path # staticmethod as per https://github.com/Miserlou/Zappa/issues/780 @staticmethod def get_current_venv(): """ Returns the path to the current virtualenv """ if 'VIRTUAL_ENV' in os.environ: venv = os.environ['VIRTUAL_ENV'] elif os.path.exists('.python-version'): # pragma: no cover try: subprocess.check_output(['pyenv', 'help'], stderr=subprocess.STDOUT) except OSError: print("This directory seems to have pyenv's local venv, " "but pyenv executable was not found.") with open('.python-version', 'r') as f: # minor fix in how .python-version is read # Related: https://github.com/Miserlou/Zappa/issues/921 env_name = f.readline().strip() bin_path = subprocess.check_output(['pyenv', 'which', 'python']).decode('utf-8') venv = bin_path[:bin_path.rfind(env_name)] + env_name else: # pragma: no cover return None return venv def create_lambda_zip( self, prefix='lambda_package', handler_file=None, slim_handler=False, minify=True, exclude=None, exclude_glob=None, use_precompiled_packages=True, include=None, venv=None, output=None, disable_progress=False, archive_format='zip' ): """ Create a Lambda-ready zip file of the current virtualenvironment and working directory. Returns path to that file. """ # Validate archive_format if archive_format not in ['zip', 'tarball']: raise KeyError("The archive format to create a lambda package must be zip or tarball") # Pip is a weird package. # Calling this function in some environments without this can cause.. funkiness. import pip if not venv: venv = self.get_current_venv() build_time = str(int(time.time())) cwd = os.getcwd() if not output: if archive_format == 'zip': archive_fname = prefix + '-' + build_time + '.zip' elif archive_format == 'tarball': archive_fname = prefix + '-' + build_time + '.tar.gz' else: archive_fname = output archive_path = os.path.join(cwd, archive_fname) # Files that should be excluded from the zip if exclude is None: exclude = list() if exclude_glob is None: exclude_glob = list() # Exclude the zip itself exclude.append(archive_path) # Make sure that 'concurrent' is always forbidden. # https://github.com/Miserlou/Zappa/issues/827 if not 'concurrent' in exclude: exclude.append('concurrent') def splitpath(path): parts = [] (path, tail) = os.path.split(path) while path and tail: parts.append(tail) (path, tail) = os.path.split(path) parts.append(os.path.join(path, tail)) return list(map(os.path.normpath, parts))[::-1] split_venv = splitpath(venv) split_cwd = splitpath(cwd) # Ideally this should be avoided automatically, # but this serves as an okay stop-gap measure. if split_venv[-1] == split_cwd[-1]: # pragma: no cover print( "Warning! Your project and virtualenv have the same name! You may want " "to re-create your venv with a new name, or explicitly define a " "'project_name', as this may cause errors." ) # First, do the project.. temp_project_path = tempfile.mkdtemp(prefix='zappa-project') if not slim_handler: # Slim handler does not take the project files. if minify: # Related: https://github.com/Miserlou/Zappa/issues/744 excludes = ZIP_EXCLUDES + exclude + [split_venv[-1]] copytree(cwd, temp_project_path, metadata=False, symlinks=False, ignore=shutil.ignore_patterns(*excludes)) else: copytree(cwd, temp_project_path, metadata=False, symlinks=False) for glob_path in exclude_glob: for path in glob.glob(os.path.join(temp_project_path, glob_path)): try: os.remove(path) except OSError: # is a directory shutil.rmtree(path) # If a handler_file is supplied, copy that to the root of the package, # because that's where AWS Lambda looks for it. It can't be inside a package. if handler_file: filename = handler_file.split(os.sep)[-1] shutil.copy(handler_file, os.path.join(temp_project_path, filename)) # Create and populate package ID file and write to temp project path package_info = {} package_info['uuid'] = str(uuid.uuid4()) package_info['build_time'] = build_time package_info['build_platform'] = os.sys.platform package_info['build_user'] = getpass.getuser() # TODO: Add git head and info? # Ex, from @scoates: # def _get_git_branch(): # chdir(DIR) # out = check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip() # lambci_branch = environ.get('LAMBCI_BRANCH', None) # if out == "HEAD" and lambci_branch: # out += " lambci:{}".format(lambci_branch) # return out # def _get_git_hash(): # chdir(DIR) # return check_output(['git', 'rev-parse', 'HEAD']).strip() # def _get_uname(): # return check_output(['uname', '-a']).strip() # def _get_user(): # return check_output(['whoami']).strip() # def set_id_info(zappa_cli): # build_info = { # 'branch': _get_git_branch(), # 'hash': _get_git_hash(), # 'build_uname': _get_uname(), # 'build_user': _get_user(), # 'build_time': datetime.datetime.utcnow().isoformat(), # } # with open(path.join(DIR, 'id_info.json'), 'w') as f: # json.dump(build_info, f) # return True package_id_file = open(os.path.join(temp_project_path, 'package_info.json'), 'w') dumped = json.dumps(package_info, indent=4) try: package_id_file.write(dumped) except TypeError: # This is a Python 2/3 issue. TODO: Make pretty! package_id_file.write(str(dumped)) package_id_file.close() # Then, do site site-packages.. egg_links = [] temp_package_path = tempfile.mkdtemp(prefix='zappa-packages') if os.sys.platform == 'win32': site_packages = os.path.join(venv, 'Lib', 'site-packages') else: site_packages = os.path.join(venv, 'lib', get_venv_from_python_version(), 'site-packages') egg_links.extend(glob.glob(os.path.join(site_packages, '*.egg-link'))) if minify: excludes = ZIP_EXCLUDES + exclude copytree(site_packages, temp_package_path, metadata=False, symlinks=False, ignore=shutil.ignore_patterns(*excludes)) else: copytree(site_packages, temp_package_path, metadata=False, symlinks=False) # We may have 64-bin specific packages too. site_packages_64 = os.path.join(venv, 'lib64', get_venv_from_python_version(), 'site-packages') if os.path.exists(site_packages_64): egg_links.extend(glob.glob(os.path.join(site_packages_64, '*.egg-link'))) if minify: excludes = ZIP_EXCLUDES + exclude copytree(site_packages_64, temp_package_path, metadata = False, symlinks=False, ignore=shutil.ignore_patterns(*excludes)) else: copytree(site_packages_64, temp_package_path, metadata = False, symlinks=False) if egg_links: self.copy_editable_packages(egg_links, temp_package_path) copy_tree(temp_package_path, temp_project_path, update=True) # Then the pre-compiled packages.. if use_precompiled_packages: print("Downloading and installing dependencies..") installed_packages = self.get_installed_packages(site_packages, site_packages_64) try: for installed_package_name, installed_package_version in installed_packages.items(): cached_wheel_path = self.get_cached_manylinux_wheel(installed_package_name, installed_package_version, disable_progress) if cached_wheel_path: # Otherwise try to use manylinux packages from PyPi.. # Related: https://github.com/Miserlou/Zappa/issues/398 shutil.rmtree(os.path.join(temp_project_path, installed_package_name), ignore_errors=True) with zipfile.ZipFile(cached_wheel_path) as zfile: zfile.extractall(temp_project_path) except Exception as e: print(e) # XXX - What should we do here? # Cleanup for glob_path in exclude_glob: for path in glob.glob(os.path.join(temp_project_path, glob_path)): try: os.remove(path) except OSError: # is a directory shutil.rmtree(path) # Then archive it all up.. if archive_format == 'zip': print("Packaging project as zip.") try: compression_method = zipfile.ZIP_DEFLATED except ImportError: # pragma: no cover compression_method = zipfile.ZIP_STORED archivef = zipfile.ZipFile(archive_path, 'w', compression_method) elif archive_format == 'tarball': print("Packaging project as gzipped tarball.") archivef = tarfile.open(archive_path, 'w|gz') for root, dirs, files in os.walk(temp_project_path): for filename in files: # Skip .pyc files for Django migrations # https://github.com/Miserlou/Zappa/issues/436 # https://github.com/Miserlou/Zappa/issues/464 if filename[-4:] == '.pyc' and root[-10:] == 'migrations': continue # If there is a .pyc file in this package, # we can skip the python source code as we'll just # use the compiled bytecode anyway.. if filename[-3:] == '.py' and root[-10:] != 'migrations': abs_filname = os.path.join(root, filename) abs_pyc_filename = abs_filname + 'c' if os.path.isfile(abs_pyc_filename): # but only if the pyc is older than the py, # otherwise we'll deploy outdated code! py_time = os.stat(abs_filname).st_mtime pyc_time = os.stat(abs_pyc_filename).st_mtime if pyc_time > py_time: continue # Make sure that the files are all correctly chmodded # Related: https://github.com/Miserlou/Zappa/issues/484 # Related: https://github.com/Miserlou/Zappa/issues/682 os.chmod(os.path.join(root, filename), 0o755) if archive_format == 'zip': # Actually put the file into the proper place in the zip # Related: https://github.com/Miserlou/Zappa/pull/716 zipi = zipfile.ZipInfo(os.path.join(root.replace(temp_project_path, '').lstrip(os.sep), filename)) zipi.create_system = 3 zipi.external_attr = 0o755 << int(16) # Is this P2/P3 functional? with open(os.path.join(root, filename), 'rb') as f: archivef.writestr(zipi, f.read(), compression_method) elif archive_format == 'tarball': tarinfo = tarfile.TarInfo(os.path.join(root.replace(temp_project_path, '').lstrip(os.sep), filename)) tarinfo.mode = 0o755 stat = os.stat(os.path.join(root, filename)) tarinfo.mtime = stat.st_mtime tarinfo.size = stat.st_size with open(os.path.join(root, filename), 'rb') as f: archivef.addfile(tarinfo, f) # Create python init file if it does not exist # Only do that if there are sub folders or python files and does not conflict with a neighbouring module # Related: https://github.com/Miserlou/Zappa/issues/766 if not contains_python_files_or_subdirs(root): # if the directory does not contain any .py file at any level, we can skip the rest dirs[:] = [d for d in dirs if d != root] else: if '__init__.py' not in files and not conflicts_with_a_neighbouring_module(root): tmp_init = os.path.join(temp_project_path, '__init__.py') open(tmp_init, 'a').close() os.chmod(tmp_init, 0o755) arcname = os.path.join(root.replace(temp_project_path, ''), os.path.join(root.replace(temp_project_path, ''), '__init__.py')) if archive_format == 'zip': archivef.write(tmp_init, arcname) elif archive_format == 'tarball': archivef.add(tmp_init, arcname) # And, we're done! archivef.close() # Trash the temp directory shutil.rmtree(temp_project_path) shutil.rmtree(temp_package_path) if os.path.isdir(venv) and slim_handler: # Remove the temporary handler venv folder shutil.rmtree(venv) return archive_fname @staticmethod def get_installed_packages(site_packages, site_packages_64): """ Returns a dict of installed packages that Zappa cares about. """ import pkg_resources package_to_keep = [] if os.path.isdir(site_packages): package_to_keep += os.listdir(site_packages) if os.path.isdir(site_packages_64): package_to_keep += os.listdir(site_packages_64) package_to_keep = [x.lower() for x in package_to_keep] installed_packages = {package.project_name.lower(): package.version for package in pkg_resources.WorkingSet() if package.project_name.lower() in package_to_keep or package.location.lower() in [site_packages.lower(), site_packages_64.lower()]} return installed_packages @staticmethod def download_url_with_progress(url, stream, disable_progress): """ Downloads a given url in chunks and writes to the provided stream (can be any io stream). Displays the progress bar for the download. """ resp = requests.get(url, timeout=float(os.environ.get('PIP_TIMEOUT', 2)), stream=True) resp.raw.decode_content = True progress = tqdm(unit="B", unit_scale=True, total=int(resp.headers.get('Content-Length', 0)), disable=disable_progress) for chunk in resp.iter_content(chunk_size=1024): if chunk: progress.update(len(chunk)) stream.write(chunk) progress.close() def get_cached_manylinux_wheel(self, package_name, package_version, disable_progress=False): """ Gets the locally stored version of a manylinux wheel. If one does not exist, the function downloads it. """ cached_wheels_dir = os.path.join(tempfile.gettempdir(), 'cached_wheels') if not os.path.isdir(cached_wheels_dir): os.makedirs(cached_wheels_dir) else: # Check if we already have a cached copy wheel_name = re.sub("[^\w\d.]+", "_", package_name, re.UNICODE) wheel_file = f'{wheel_name}-{package_version}-*_x86_64.whl' wheel_path = os.path.join(cached_wheels_dir, wheel_file) for pathname in glob.iglob(wheel_path): if re.match(self.manylinux_wheel_file_match, pathname) or re.match(self.manylinux_wheel_abi3_file_match, pathname): print(f" - {package_name}=={package_version}: Using locally cached manylinux wheel") return pathname # The file is not cached, download it. wheel_url, filename = self.get_manylinux_wheel_url(package_name, package_version) if not wheel_url: return None wheel_path = os.path.join(cached_wheels_dir, filename) print(f" - {package_name}=={package_version}: Downloading") with open(wheel_path, 'wb') as f: self.download_url_with_progress(wheel_url, f, disable_progress) if not zipfile.is_zipfile(wheel_path): return None return wheel_path def get_manylinux_wheel_url(self, package_name, package_version): """ For a given package name, returns a link to the download URL, else returns None. Related: https://github.com/Miserlou/Zappa/issues/398 Examples here: https://gist.github.com/perrygeo/9545f94eaddec18a65fd7b56880adbae This function downloads metadata JSON of `package_name` from Pypi and examines if the package has a manylinux wheel. This function also caches the JSON file so that we don't have to poll Pypi every time. """ cached_pypi_info_dir = os.path.join(tempfile.gettempdir(), 'cached_pypi_info') if not os.path.isdir(cached_pypi_info_dir): os.makedirs(cached_pypi_info_dir) # Even though the metadata is for the package, we save it in a # filename that includes the package's version. This helps in # invalidating the cached file if the user moves to a different # version of the package. # Related: https://github.com/Miserlou/Zappa/issues/899 json_file = '{0!s}-{1!s}.json'.format(package_name, package_version) json_file_path = os.path.join(cached_pypi_info_dir, json_file) if os.path.exists(json_file_path): with open(json_file_path, 'rb') as metafile: data = json.load(metafile) else: url = 'https://pypi.python.org/pypi/{}/json'.format(package_name) try: res = requests.get(url, timeout=float(os.environ.get('PIP_TIMEOUT', 1.5))) data = res.json() except Exception as e: # pragma: no cover return None, None with open(json_file_path, 'wb') as metafile: jsondata = json.dumps(data) metafile.write(bytes(jsondata, "utf-8")) if package_version not in data['releases']: return None, None for f in data['releases'][package_version]: if re.match(self.manylinux_wheel_file_match, f['filename']): return f['url'], f['filename'] elif re.match(self.manylinux_wheel_abi3_file_match, f['filename']): return f['url'], f['filename'] return None, None ## # S3 ## def upload_to_s3(self, source_path, bucket_name, disable_progress=False): r""" Given a file, upload it to S3. Credentials should be stored in environment variables or ~/.aws/credentials (%USERPROFILE%\.aws\credentials on Windows). Returns True on success, false on failure. """ try: self.s3_client.head_bucket(Bucket=bucket_name) except botocore.exceptions.ClientError: # This is really stupid S3 quirk. Technically, us-east-1 one has no S3, # it's actually "US Standard", or something. # More here: https://github.com/boto/boto3/issues/125 if self.aws_region == 'us-east-1': self.s3_client.create_bucket( Bucket=bucket_name, ) else: self.s3_client.create_bucket( Bucket=bucket_name, CreateBucketConfiguration={'LocationConstraint': self.aws_region}, ) if self.tags: tags = { 'TagSet': [{'Key': key, 'Value': self.tags[key]} for key in self.tags.keys()] } self.s3_client.put_bucket_tagging(Bucket=bucket_name, Tagging=tags) if not os.path.isfile(source_path) or os.stat(source_path).st_size == 0: print("Problem with source file {}".format(source_path)) return False dest_path = os.path.split(source_path)[1] try: source_size = os.stat(source_path).st_size print("Uploading {0} ({1})..".format(dest_path, human_size(source_size))) progress = tqdm(total=float(os.path.getsize(source_path)), unit_scale=True, unit='B', disable=disable_progress) # Attempt to upload to S3 using the S3 meta client with the progress bar. # If we're unable to do that, try one more time using a session client, # which cannot use the progress bar. # Related: https://github.com/boto/boto3/issues/611 try: self.s3_client.upload_file( source_path, bucket_name, dest_path, Callback=progress.update ) except Exception as e: # pragma: no cover self.s3_client.upload_file(source_path, bucket_name, dest_path) progress.close() except (KeyboardInterrupt, SystemExit): # pragma: no cover raise except Exception as e: # pragma: no cover print(e) return False return True def copy_on_s3(self, src_file_name, dst_file_name, bucket_name): """ Copies src file to destination within a bucket. """ try: self.s3_client.head_bucket(Bucket=bucket_name) except botocore.exceptions.ClientError as e: # pragma: no cover # If a client error is thrown, then check that it was a 404 error. # If it was a 404 error, then the bucket does not exist. error_code = int(e.response['Error']['Code']) if error_code == 404: return False copy_src = { "Bucket": bucket_name, "Key": src_file_name } try: self.s3_client.copy( CopySource=copy_src, Bucket=bucket_name, Key=dst_file_name ) return True except botocore.exceptions.ClientError: # pragma: no cover return False def remove_from_s3(self, file_name, bucket_name): """ Given a file name and a bucket, remove it from S3. 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. Returns True on success, False on failure. """ try: self.s3_client.head_bucket(Bucket=bucket_name) except botocore.exceptions.ClientError as e: # pragma: no cover # If a client error is thrown, then check that it was a 404 error. # If it was a 404 error, then the bucket does not exist. error_code = int(e.response['Error']['Code']) if error_code == 404: return False try: self.s3_client.delete_object(Bucket=bucket_name, Key=file_name) return True except (botocore.exceptions.ParamValidationError, botocore.exceptions.ClientError): # pragma: no cover return False ## # Lambda ## def create_lambda_function( self, bucket=None, function_name=None, handler=None, s3_key=None, description='Zappa Deployment', timeout=30, memory_size=512, publish=True, vpc_config=None, dead_letter_config=None, runtime='python3.6', aws_environment_variables=None, aws_kms_key_arn=None, xray_tracing=False, local_zip=None, use_alb=False, layers=None, concurrency=None, ): """ Given a bucket and key (or a local path) of a valid Lambda-zip, a function name and a handler, register that Lambda function. """ if not vpc_config: vpc_config = {} if not dead_letter_config: dead_letter_config = {} if not self.credentials_arn: self.get_credentials_arn() if not aws_environment_variables: aws_environment_variables = {} if not aws_kms_key_arn: aws_kms_key_arn = '' if not layers: layers = [] kwargs = dict( FunctionName=function_name, Runtime=runtime, Role=self.credentials_arn, Handler=handler, Description=description, Timeout=timeout, MemorySize=memory_size, Publish=publish, VpcConfig=vpc_config, DeadLetterConfig=dead_letter_config, Environment={'Variables': aws_environment_variables}, KMSKeyArn=aws_kms_key_arn, TracingConfig={ 'Mode': 'Active' if self.xray_tracing else 'PassThrough' }, Layers=layers ) if local_zip: kwargs['Code'] = { 'ZipFile': local_zip } else: kwargs['Code'] = { 'S3Bucket': bucket, 'S3Key': s3_key } response = self.lambda_client.create_function(**kwargs) resource_arn = response['FunctionArn'] version = response['Version'] # If we're using an ALB, let's create an alias mapped to the newly # created function. This allows clean, no downtime association when # using application load balancers as an event source. # See: https://github.com/Miserlou/Zappa/pull/1730 # https://github.com/Miserlou/Zappa/issues/1823 if use_alb: self.lambda_client.create_alias( FunctionName=resource_arn, FunctionVersion=version, Name=ALB_LAMBDA_ALIAS, ) if self.tags: self.lambda_client.tag_resource(Resource=resource_arn, Tags=self.tags) if concurrency is not None: self.lambda_client.put_function_concurrency( FunctionName=resource_arn, ReservedConcurrentExecutions=concurrency, ) return resource_arn def update_lambda_function(self, bucket, function_name, s3_key=None, publish=True, local_zip=None, num_revisions=None, concurrency=None): """ 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. Optionally, delete previous versions if they exceed the optional limit. """ print("Updating Lambda function code..") kwargs = dict( FunctionName=function_name, Publish=publish ) if local_zip: kwargs['ZipFile'] = local_zip else: kwargs['S3Bucket'] = bucket kwargs['S3Key'] = s3_key response = self.lambda_client.update_function_code(**kwargs) resource_arn = response['FunctionArn'] version = response['Version'] # If the lambda has an ALB alias, let's update the alias # to point to the newest version of the function. We have to use a GET # here, as there's no HEAD-esque call to retrieve metadata about a # function alias. # Related: https://github.com/Miserlou/Zappa/pull/1730 # https://github.com/Miserlou/Zappa/issues/1823 try: response = self.lambda_client.get_alias( FunctionName=function_name, Name=ALB_LAMBDA_ALIAS, ) alias_exists = True except botocore.exceptions.ClientError as e: # pragma: no cover if "ResourceNotFoundException" not in e.response["Error"]["Code"]: raise e alias_exists = False if alias_exists: self.lambda_client.update_alias( FunctionName=function_name, FunctionVersion=version, Name=ALB_LAMBDA_ALIAS, ) if concurrency is not None: self.lambda_client.put_function_concurrency( FunctionName=function_name, ReservedConcurrentExecutions=concurrency, ) else: self.lambda_client.delete_function_concurrency( FunctionName=function_name ) if num_revisions: # Find the existing revision IDs for the given function # Related: https://github.com/Miserlou/Zappa/issues/1402 versions_in_lambda = [] versions = self.lambda_client.list_versions_by_function(FunctionName=function_name) for version in versions['Versions']: versions_in_lambda.append(version['Version']) while 'NextMarker' in versions: versions = self.lambda_client.list_versions_by_function(FunctionName=function_name,Marker=versions['NextMarker']) for version in versions['Versions']: versions_in_lambda.append(version['Version']) versions_in_lambda.remove('$LATEST') # Delete older revisions if their number exceeds the specified limit for version in versions_in_lambda[::-1][num_revisions:]: self.lambda_client.delete_function(FunctionName=function_name,Qualifier=version) return resource_arn def update_lambda_configuration( self, lambda_arn, function_name, handler, description='Zappa Deployment', timeout=30, memory_size=512, publish=True, vpc_config=None, runtime='python3.6', aws_environment_variables=None, aws_kms_key_arn=None, layers=None ): """ Given an existing function ARN, update the configuration variables. """ print("Updating Lambda function configuration..") if not vpc_config: vpc_config = {} if not self.credentials_arn: self.get_credentials_arn() if not aws_kms_key_arn: aws_kms_key_arn = '' if not aws_environment_variables: aws_environment_variables = {} if not layers: layers = [] # Check if there are any remote aws lambda env vars so they don't get trashed. # https://github.com/Miserlou/Zappa/issues/987, Related: https://github.com/Miserlou/Zappa/issues/765 lambda_aws_config = self.lambda_client.get_function_configuration(FunctionName=function_name) if "Environment" in lambda_aws_config: lambda_aws_environment_variables = lambda_aws_config["Environment"].get("Variables", {}) # Append keys that are remote but not in settings file for key, value in lambda_aws_environment_variables.items(): if key not in aws_environment_variables: aws_environment_variables[key] = value response = self.lambda_client.update_function_configuration( FunctionName=function_name, Runtime=runtime, Role=self.credentials_arn, Handler=handler, Description=description, Timeout=timeout, MemorySize=memory_size, VpcConfig=vpc_config, Environment={'Variables': aws_environment_variables}, KMSKeyArn=aws_kms_key_arn, TracingConfig={ 'Mode': 'Active' if self.xray_tracing else 'PassThrough' }, Layers=layers ) resource_arn = response['FunctionArn'] if self.tags: self.lambda_client.tag_resource(Resource=resource_arn, Tags=self.tags) return resource_arn def invoke_lambda_function( self, function_name, payload, invocation_type='Event', log_type='Tail', client_context=None, qualifier=None ): """ Directly invoke a named Lambda function with a payload. Returns the response. """ return self.lambda_client.invoke( FunctionName=function_name, InvocationType=invocation_type, LogType=log_type, Payload=payload ) def rollback_lambda_function_version(self, function_name, versions_back=1, publish=True): """ Rollback the lambda function code 'versions_back' number of revisions. Returns the Function ARN. """ response = self.lambda_client.list_versions_by_function(FunctionName=function_name) # Take into account $LATEST if len(response['Versions']) < versions_back + 1: print("We do not have {} revisions. Aborting".format(str(versions_back))) return False revisions = [int(revision['Version']) for revision in response['Versions'] if revision['Version'] != '$LATEST'] revisions.sort(reverse=True) response = self.lambda_client.get_function(FunctionName='function:{}:{}'.format(function_name, revisions[versions_back])) response = requests.get(response['Code']['Location']) if response.status_code != 200: print("Failed to get version {} of {} code".format(versions_back, function_name)) return False response = self.lambda_client.update_function_code(FunctionName=function_name, ZipFile=response.content, Publish=publish) # pragma: no cover return response['FunctionArn'] def get_lambda_function(self, function_name): """ Returns the lambda function ARN, given a name This requires the "lambda:GetFunction" role. """ response = self.lambda_client.get_function( FunctionName=function_name) return response['Configuration']['FunctionArn'] def get_lambda_function_versions(self, function_name): """ Simply returns the versions available for a Lambda function, given a function name. """ try: response = self.lambda_client.list_versions_by_function( FunctionName=function_name ) return response.get('Versions', []) except Exception: return [] def delete_lambda_function(self, function_name): """ Given a function name, delete it from AWS Lambda. Returns the response. """ print("Deleting Lambda function..") return self.lambda_client.delete_function( FunctionName=function_name, ) ## # Application load balancer ## def deploy_lambda_alb( self, lambda_arn, lambda_name, alb_vpc_config, timeout ): """ The `zappa deploy` functionality for ALB infrastructure. """ if not alb_vpc_config: raise EnvironmentError('When creating an ALB, alb_vpc_config must be filled out in zappa_settings.') if 'SubnetIds' not in alb_vpc_config: raise EnvironmentError('When creating an ALB, you must supply two subnets in different availability zones.') if 'SecurityGroupIds' not in alb_vpc_config: alb_vpc_config["SecurityGroupIds"] = [] if not alb_vpc_config.get('CertificateArn'): raise EnvironmentError('When creating an ALB, you must supply a CertificateArn for the HTTPS listener.') # Related: https://github.com/Miserlou/Zappa/issues/1856 if 'Scheme' not in alb_vpc_config: alb_vpc_config["Scheme"] = "internet-facing" print("Deploying ALB infrastructure...") # Create load balancer # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_load_balancer kwargs = dict( Name=lambda_name, Subnets=alb_vpc_config["SubnetIds"], SecurityGroups=alb_vpc_config["SecurityGroupIds"], Scheme=alb_vpc_config["Scheme"], # TODO: Tags might be a useful means of stock-keeping zappa-generated assets. #Tags=[], Type="application", # TODO: can be ipv4 or dualstack (for ipv4 and ipv6) ipv4 is required for internal Scheme. IpAddressType="ipv4" ) response = self.elbv2_client.create_load_balancer(**kwargs) if not(response["LoadBalancers"]) or len(response["LoadBalancers"]) != 1: raise EnvironmentError("Failure to create application load balancer. Response was in unexpected format. Response was: {}".format(repr(response))) if response["LoadBalancers"][0]['State']['Code'] == 'failed': raise EnvironmentError("Failure to create application load balancer. Response reported a failed state: {}".format(response["LoadBalancers"][0]['State']['Reason'])) load_balancer_arn = response["LoadBalancers"][0]["LoadBalancerArn"] load_balancer_dns = response["LoadBalancers"][0]["DNSName"] load_balancer_vpc = response["LoadBalancers"][0]["VpcId"] waiter = self.elbv2_client.get_waiter('load_balancer_available') print('Waiting for load balancer [{}] to become active..'.format(load_balancer_arn)) waiter.wait(LoadBalancerArns=[load_balancer_arn], WaiterConfig={"Delay": 3}) # Match the lambda timeout on the load balancer. self.elbv2_client.modify_load_balancer_attributes( LoadBalancerArn=load_balancer_arn, Attributes=[{ 'Key': 'idle_timeout.timeout_seconds', 'Value': str(timeout) }] ) # Create/associate target group. # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_target_group kwargs = dict( Name=lambda_name, TargetType="lambda", # TODO: Add options for health checks ) response = self.elbv2_client.create_target_group(**kwargs) if not(response["TargetGroups"]) or len(response["TargetGroups"]) != 1: raise EnvironmentError("Failure to create application load balancer target group. Response was in unexpected format. Response was: {}".format(repr(response))) target_group_arn = response["TargetGroups"][0]["TargetGroupArn"] # Enable multi-value headers by default. response = self.elbv2_client.modify_target_group_attributes( TargetGroupArn=target_group_arn, Attributes=[ { 'Key': 'lambda.multi_value_headers.enabled', 'Value': 'true' }, ] ) # Allow execute permissions from target group to lambda. # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.add_permission kwargs = dict( Action="lambda:InvokeFunction", FunctionName="{}:{}".format(lambda_arn, ALB_LAMBDA_ALIAS), Principal="elasticloadbalancing.amazonaws.com", SourceArn=target_group_arn, StatementId=lambda_name ) response = self.lambda_client.add_permission(**kwargs) # Register target group to lambda association. # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.register_targets kwargs = dict( TargetGroupArn=target_group_arn, Targets=[{"Id": "{}:{}".format(lambda_arn, ALB_LAMBDA_ALIAS)}] ) response = self.elbv2_client.register_targets(**kwargs) # Bind listener to load balancer with default rule to target group. # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_listener kwargs = dict( # TODO: Listeners support custom ssl certificates (Certificates). For now we leave this default. Certificates=[{"CertificateArn": alb_vpc_config['CertificateArn']}], DefaultActions=[{ "Type": "forward", "TargetGroupArn": target_group_arn, }], LoadBalancerArn=load_balancer_arn, Protocol="HTTPS", # TODO: Add option for custom ports Port=443, # TODO: Listeners support custom ssl security policy (SslPolicy). For now we leave this default. ) response = self.elbv2_client.create_listener(**kwargs) print("ALB created with DNS: {}".format(load_balancer_dns)) print("Note it may take several minutes for load balancer to become available.") def undeploy_lambda_alb(self, lambda_name): """ The `zappa undeploy` functionality for ALB infrastructure. """ print("Undeploying ALB infrastructure...") # Locate and delete alb/lambda permissions try: # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.remove_permission self.lambda_client.remove_permission( FunctionName=lambda_name, StatementId=lambda_name ) except botocore.exceptions.ClientError as e: # pragma: no cover if "ResourceNotFoundException" in e.response["Error"]["Code"]: pass else: raise e # Locate and delete load balancer try: # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_load_balancers response = self.elbv2_client.describe_load_balancers( Names=[lambda_name] ) if not(response["LoadBalancers"]) or len(response["LoadBalancers"]) > 1: raise EnvironmentError("Failure to locate/delete ALB named [{}]. Response was: {}".format(lambda_name, repr(response))) load_balancer_arn = response["LoadBalancers"][0]["LoadBalancerArn"] # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_listeners response = self.elbv2_client.describe_listeners(LoadBalancerArn=load_balancer_arn) if not(response["Listeners"]): print('No listeners found.') elif len(response["Listeners"]) > 1: raise EnvironmentError("Failure to locate/delete listener for ALB named [{}]. Response was: {}".format(lambda_name, repr(response))) else: listener_arn = response["Listeners"][0]["ListenerArn"] # Remove the listener. This explicit deletion of the listener seems necessary to avoid ResourceInUseExceptions when deleting target groups. # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_listener response = self.elbv2_client.delete_listener(ListenerArn=listener_arn) # Remove the load balancer and wait for completion # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_load_balancer response = self.elbv2_client.delete_load_balancer(LoadBalancerArn=load_balancer_arn) waiter = self.elbv2_client.get_waiter('load_balancers_deleted') print('Waiting for load balancer [{}] to be deleted..'.format(lambda_name)) waiter.wait(LoadBalancerArns=[load_balancer_arn], WaiterConfig={"Delay": 3}) except botocore.exceptions.ClientError as e: # pragma: no cover print(e.response["Error"]["Code"]) if "LoadBalancerNotFound" in e.response["Error"]["Code"]: pass else: raise e # Locate and delete target group try: # Locate the lambda ARN # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.get_function response = self.lambda_client.get_function(FunctionName=lambda_name) lambda_arn = response["Configuration"]["FunctionArn"] # Locate the target group ARN # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.describe_target_groups response = self.elbv2_client.describe_target_groups(Names=[lambda_name]) if not(response["TargetGroups"]) or len(response["TargetGroups"]) > 1: raise EnvironmentError("Failure to locate/delete ALB target group named [{}]. Response was: {}".format(lambda_name, repr(response))) target_group_arn = response["TargetGroups"][0]["TargetGroupArn"] # Deregister targets and wait for completion self.elbv2_client.deregister_targets( TargetGroupArn=target_group_arn, Targets=[{"Id": lambda_arn}] ) waiter = self.elbv2_client.get_waiter('target_deregistered') print('Waiting for target [{}] to be deregistered...'.format(lambda_name)) waiter.wait( TargetGroupArn=target_group_arn, Targets=[{"Id": lambda_arn}], WaiterConfig={"Delay": 3} ) # Remove the target group # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.delete_target_group self.elbv2_client.delete_target_group(TargetGroupArn=target_group_arn) except botocore.exceptions.ClientError as e: # pragma: no cover print(e.response["Error"]["Code"]) if "TargetGroupNotFound" in e.response["Error"]["Code"]: pass else: raise e ## # API Gateway ## def create_api_gateway_routes( self, lambda_arn, api_name=None, api_key_required=False, authorization_type='NONE', authorizer=None, cors_options=None, description=None, endpoint_configuration=None ): """ Create the API Gateway for this Zappa deployment. Returns the new RestAPI CF resource. """ restapi = troposphere.apigateway.RestApi('Api') restapi.Name = api_name or lambda_arn.split(':')[-1] if not description: description = 'Created automatically by Zappa.' restapi.Description = description endpoint_configuration = [] if endpoint_configuration is None else endpoint_configuration if self.boto_session.region_name == "us-gov-west-1": endpoint_configuration.append("REGIONAL") if endpoint_configuration: endpoint = troposphere.apigateway.EndpointConfiguration() endpoint.Types = list(set(endpoint_configuration)) restapi.EndpointConfiguration = endpoint if self.apigateway_policy: restapi.Policy = json.loads(self.apigateway_policy) self.cf_template.add_resource(restapi) root_id = troposphere.GetAtt(restapi, 'RootResourceId') invocation_prefix = "aws" if self.boto_session.region_name != "us-gov-west-1" else "aws-us-gov" invocations_uri = 'arn:' + invocation_prefix + ':apigateway:' + self.boto_session.region_name + ':lambda:path/2015-03-31/functions/' + lambda_arn + '/invocations' ## # The Resources ## authorizer_resource = None if authorizer: authorizer_lambda_arn = authorizer.get('arn', lambda_arn) lambda_uri = 'arn:{invocation_prefix}:apigateway:{region_name}:lambda:path/2015-03-31/functions/{lambda_arn}/invocations'.format( invocation_prefix=invocation_prefix, region_name=self.boto_session.region_name, lambda_arn=authorizer_lambda_arn ) authorizer_resource = self.create_authorizer( restapi, lambda_uri, authorizer ) self.create_and_setup_methods( restapi, root_id, api_key_required, invocations_uri, authorization_type, authorizer_resource, 0 ) if cors_options: self.create_and_setup_cors( restapi, root_id, invocations_uri, 0, cors_options ) resource = troposphere.apigateway.Resource('ResourceAnyPathSlashed') self.cf_api_resources.append(resource.title) resource.RestApiId = troposphere.Ref(restapi) resource.ParentId = root_id resource.PathPart = "{proxy+}" self.cf_template.add_resource(resource) self.create_and_setup_methods( restapi, resource, api_key_required, invocations_uri, authorization_type, authorizer_resource, 1 ) # pragma: no cover if cors_options: self.create_and_setup_cors( restapi, resource, invocations_uri, 1, cors_options ) # pragma: no cover return restapi def create_authorizer(self, restapi, uri, authorizer): """ Create Authorizer for API gateway """ authorizer_type = authorizer.get("type", "TOKEN").upper() identity_validation_expression = authorizer.get('validation_expression', None) authorizer_resource = troposphere.apigateway.Authorizer("Authorizer") authorizer_resource.RestApiId = troposphere.Ref(restapi) authorizer_resource.Name = authorizer.get("name", "ZappaAuthorizer") authorizer_resource.Type = authorizer_type authorizer_resource.AuthorizerUri = uri authorizer_resource.IdentitySource = "method.request.header.%s" % authorizer.get('token_header', 'Authorization') if identity_validation_expression: authorizer_resource.IdentityValidationExpression = identity_validation_expression if authorizer_type == 'TOKEN': if not self.credentials_arn: self.get_credentials_arn() authorizer_resource.AuthorizerResultTtlInSeconds = authorizer.get('result_ttl', 300) authorizer_resource.AuthorizerCredentials = self.credentials_arn if authorizer_type == 'COGNITO_USER_POOLS': authorizer_resource.ProviderARNs = authorizer.get('provider_arns') self.cf_api_resources.append(authorizer_resource.title) self.cf_template.add_resource(authorizer_resource) return authorizer_resource def create_and_setup_methods( self, restapi, resource, api_key_required, uri, authorization_type, authorizer_resource, depth ): """ Set up the methods, integration responses and method responses for a given API Gateway resource. """ for method_name in self.http_methods: method = troposphere.apigateway.Method(method_name + str(depth)) method.RestApiId = troposphere.Ref(restapi) if type(resource) is troposphere.apigateway.Resource: method.ResourceId = troposphere.Ref(resource) else: method.ResourceId = resource method.HttpMethod = method_name.upper() method.AuthorizationType = authorization_type if authorizer_resource: method.AuthorizerId = troposphere.Ref(authorizer_resource) method.ApiKeyRequired = api_key_required method.MethodResponses = [] self.cf_template.add_resource(method) self.cf_api_resources.append(method.title) if not self.credentials_arn: self.get_credentials_arn() credentials = self.credentials_arn # This must be a Role ARN integration = troposphere.apigateway.Integration() integration.CacheKeyParameters = [] integration.CacheNamespace = 'none' integration.Credentials = credentials integration.IntegrationHttpMethod = 'POST' integration.IntegrationResponses = [] integration.PassthroughBehavior = 'NEVER' integration.Type = 'AWS_PROXY' integration.Uri = uri method.Integration = integration def create_and_setup_cors(self, restapi, resource, uri, depth, config): """ Set up the methods, integration responses and method responses for a given API Gateway resource. """ if config is True: config = {} method_name = "OPTIONS" method = troposphere.apigateway.Method(method_name + str(depth)) method.RestApiId = troposphere.Ref(restapi) if type(resource) is troposphere.apigateway.Resource: method.ResourceId = troposphere.Ref(resource) else: method.ResourceId = resource method.HttpMethod = method_name.upper() method.AuthorizationType = "NONE" method_response = troposphere.apigateway.MethodResponse() method_response.ResponseModels = { "application/json": "Empty" } response_headers = { "Access-Control-Allow-Headers": "'%s'" % ",".join(config.get( "allowed_headers", ["Content-Type", "X-Amz-Date", "Authorization", "X-Api-Key", "X-Amz-Security-Token"])), "Access-Control-Allow-Methods": "'%s'" % ",".join(config.get( "allowed_methods", ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"])), "Access-Control-Allow-Origin": "'%s'" % config.get( "allowed_origin", "*") } method_response.ResponseParameters = { "method.response.header.%s" % key: True for key in response_headers } method_response.StatusCode = "200" method.MethodResponses = [ method_response ] self.cf_template.add_resource(method) self.cf_api_resources.append(method.title) integration = troposphere.apigateway.Integration() integration.Type = 'MOCK' integration.PassthroughBehavior = 'NEVER' integration.RequestTemplates = { "application/json": "{\"statusCode\": 200}" } integration_response = troposphere.apigateway.IntegrationResponse() integration_response.ResponseParameters = { "method.response.header.%s" % key: value for key, value in response_headers.items() } integration_response.ResponseTemplates = { "application/json": "" } integration_response.StatusCode = "200" integration.IntegrationResponses = [ integration_response ] integration.Uri = uri method.Integration = integration def deploy_api_gateway( self, api_id, stage_name, stage_description="", description="", cache_cluster_enabled=False, cache_cluster_size='0.5', variables=None, cloudwatch_log_level='OFF', cloudwatch_data_trace=False, cloudwatch_metrics_enabled=False, cache_cluster_ttl=300, cache_cluster_encrypted=False ): """ Deploy the API Gateway! Return the deployed API URL. """ print("Deploying API Gateway..") self.apigateway_client.create_deployment( restApiId=api_id, stageName=stage_name, stageDescription=stage_description, description=description, cacheClusterEnabled=cache_cluster_enabled, cacheClusterSize=cache_cluster_size, variables=variables or {} ) if cloudwatch_log_level not in self.cloudwatch_log_levels: cloudwatch_log_level = 'OFF' self.apigateway_client.update_stage( restApiId=api_id, stageName=stage_name, patchOperations=[ self.get_patch_op('logging/loglevel', cloudwatch_log_level), self.get_patch_op('logging/dataTrace', cloudwatch_data_trace), self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled), self.get_patch_op('caching/ttlInSeconds', str(cache_cluster_ttl)), self.get_patch_op('caching/dataEncrypted', cache_cluster_encrypted) ] ) return "https://{}.execute-api.{}.amazonaws.com/{}".format(api_id, self.boto_session.region_name, stage_name) def add_binary_support(self, api_id, cors=False): """ Add binary support """ response = self.apigateway_client.get_rest_api( restApiId=api_id ) if "binaryMediaTypes" not in response or "*/*" not in response["binaryMediaTypes"]: self.apigateway_client.update_rest_api( restApiId=api_id, patchOperations=[ { 'op': "add", 'path': '/binaryMediaTypes/*~1*' } ] ) if cors: # fix for issue 699 and 1035, cors+binary support don't work together # go through each resource and update the contentHandling type response = self.apigateway_client.get_resources(restApiId=api_id) resource_ids = [ item['id'] for item in response['items'] if 'OPTIONS' in item.get('resourceMethods', {}) ] for resource_id in resource_ids: self.apigateway_client.update_integration( restApiId=api_id, resourceId=resource_id, httpMethod='OPTIONS', patchOperations=[ { "op": "replace", "path": "/contentHandling", "value": "CONVERT_TO_TEXT" } ] ) def remove_binary_support(self, api_id, cors=False): """ Remove binary support """ response = self.apigateway_client.get_rest_api( restApiId=api_id ) if "binaryMediaTypes" in response and "*/*" in response["binaryMediaTypes"]: self.apigateway_client.update_rest_api( restApiId=api_id, patchOperations=[ { 'op': 'remove', 'path': '/binaryMediaTypes/*~1*' } ] ) if cors: # go through each resource and change the contentHandling type response = self.apigateway_client.get_resources(restApiId=api_id) resource_ids = [ item['id'] for item in response['items'] if 'OPTIONS' in item.get('resourceMethods', {}) ] for resource_id in resource_ids: self.apigateway_client.update_integration( restApiId=api_id, resourceId=resource_id, httpMethod='OPTIONS', patchOperations=[ { "op": "replace", "path": "/contentHandling", "value": "" } ] ) def add_api_compression(self, api_id, min_compression_size): """ Add Rest API compression """ self.apigateway_client.update_rest_api( restApiId=api_id, patchOperations=[ { 'op': 'replace', 'path': '/minimumCompressionSize', 'value': str(min_compression_size) } ] ) def remove_api_compression(self, api_id): """ Remove Rest API compression """ self.apigateway_client.update_rest_api( restApiId=api_id, patchOperations=[ { 'op': 'replace', 'path': '/minimumCompressionSize', } ] ) def get_api_keys(self, api_id, stage_name): """ Generator that allows to iterate per API keys associated to an api_id and a stage_name. """ response = self.apigateway_client.get_api_keys(limit=500) stage_key = '{}/{}'.format(api_id, stage_name) for api_key in response.get('items'): if stage_key in api_key.get('stageKeys'): yield api_key.get('id') def create_api_key(self, api_id, stage_name): """ Create new API key and link it with an api_id and a stage_name """ response = self.apigateway_client.create_api_key( name='{}_{}'.format(stage_name, api_id), description='Api Key for {}'.format(api_id), enabled=True, stageKeys=[ { 'restApiId': '{}'.format(api_id), 'stageName': '{}'.format(stage_name) }, ] ) print('Created a new x-api-key: {}'.format(response['id'])) def remove_api_key(self, api_id, stage_name): """ Remove a generated API key for api_id and stage_name """ response = self.apigateway_client.get_api_keys( limit=1, nameQuery='{}_{}'.format(stage_name, api_id) ) for api_key in response.get('items'): self.apigateway_client.delete_api_key( apiKey="{}".format(api_key['id']) ) def add_api_stage_to_api_key(self, api_key, api_id, stage_name): """ Add api stage to Api key """ self.apigateway_client.update_api_key( apiKey=api_key, patchOperations=[ { 'op': 'add', 'path': '/stages', 'value': '{}/{}'.format(api_id, stage_name) } ] ) def get_patch_op(self, keypath, value, op='replace'): """ Return an object that describes a change of configuration on the given staging. Setting will be applied on all available HTTP methods. """ if isinstance(value, bool): value = str(value).lower() return {'op': op, 'path': '/*/*/{}'.format(keypath), 'value': value} def get_rest_apis(self, project_name): """ Generator that allows to iterate per every available apis. """ all_apis = self.apigateway_client.get_rest_apis( limit=500 ) for api in all_apis['items']: if api['name'] != project_name: continue yield api def undeploy_api_gateway(self, lambda_name, domain_name=None, base_path=None): """ Delete a deployed REST API Gateway. """ print("Deleting API Gateway..") api_id = self.get_api_id(lambda_name) if domain_name: # XXX - Remove Route53 smartly here? # XXX - This doesn't raise, but doesn't work either. try: self.apigateway_client.delete_base_path_mapping( domainName=domain_name, basePath='(none)' if base_path is None else base_path ) except Exception as e: # We may not have actually set up the domain. pass was_deleted = self.delete_stack(lambda_name, wait=True) if not was_deleted: # try erasing it with the older method for api in self.get_rest_apis(lambda_name): self.apigateway_client.delete_rest_api( restApiId=api['id'] ) def update_stage_config( self, project_name, stage_name, cloudwatch_log_level, cloudwatch_data_trace, cloudwatch_metrics_enabled ): """ Update CloudWatch metrics configuration. """ if cloudwatch_log_level not in self.cloudwatch_log_levels: cloudwatch_log_level = 'OFF' for api in self.get_rest_apis(project_name): self.apigateway_client.update_stage( restApiId=api['id'], stageName=stage_name, patchOperations=[ self.get_patch_op('logging/loglevel', cloudwatch_log_level), self.get_patch_op('logging/dataTrace', cloudwatch_data_trace), self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled), ] ) def update_cognito(self, lambda_name, user_pool, lambda_configs, lambda_arn): LambdaConfig = {} for config in lambda_configs: LambdaConfig[config] = lambda_arn description = self.cognito_client.describe_user_pool(UserPoolId=user_pool) description_kwargs = {} for key, value in description['UserPool'].items(): if key in ('UserPoolId', 'Policies', 'AutoVerifiedAttributes', 'SmsVerificationMessage', 'EmailVerificationMessage', 'EmailVerificationSubject', 'VerificationMessageTemplate', 'SmsAuthenticationMessage', 'MfaConfiguration', 'DeviceConfiguration', 'EmailConfiguration', 'SmsConfiguration', 'UserPoolTags', 'AdminCreateUserConfig'): description_kwargs[key] = value elif key == 'LambdaConfig': for lckey, lcvalue in value.items(): if lckey in LambdaConfig: value[lckey] = LambdaConfig[lckey] print("value", value) description_kwargs[key] = value if 'LambdaConfig' not in description_kwargs: description_kwargs['LambdaConfig'] = LambdaConfig if 'TemporaryPasswordValidityDays' in description_kwargs['Policies']['PasswordPolicy']: description_kwargs['AdminCreateUserConfig'].pop( 'UnusedAccountValidityDays', None) if 'UnusedAccountValidityDays' in description_kwargs['AdminCreateUserConfig']: description_kwargs['Policies']['PasswordPolicy']\ ['TemporaryPasswordValidityDays'] = description_kwargs['AdminCreateUserConfig'].pop( 'UnusedAccountValidityDays', None) result = self.cognito_client.update_user_pool(UserPoolId=user_pool, **description_kwargs) if result['ResponseMetadata']['HTTPStatusCode'] != 200: print("Cognito: Failed to update user pool", result) # Now we need to add a policy to the IAM that allows cognito access result = self.create_event_permission(lambda_name, 'cognito-idp.amazonaws.com', 'arn:aws:cognito-idp:{}:{}:userpool/{}'. format(self.aws_region, self.sts_client.get_caller_identity().get('Account'), user_pool) ) if result['ResponseMetadata']['HTTPStatusCode'] != 201: print("Cognito: Failed to update lambda permission", result) def delete_stack(self, name, wait=False): """ Delete the CF stack managed by Zappa. """ try: stack = self.cf_client.describe_stacks(StackName=name)['Stacks'][0] except: # pragma: no cover print('No Zappa stack named {0}'.format(name)) return False tags = {x['Key']:x['Value'] for x in stack['Tags']} if tags.get('ZappaProject') == name: self.cf_client.delete_stack(StackName=name) if wait: waiter = self.cf_client.get_waiter('stack_delete_complete') print('Waiting for stack {0} to be deleted..'.format(name)) waiter.wait(StackName=name) return True else: print('ZappaProject tag not found on {0}, doing nothing'.format(name)) return False def create_stack_template( self, lambda_arn, lambda_name, api_key_required, iam_authorization, authorizer, cors_options=None, description=None, endpoint_configuration=None ): """ Build the entire CF stack. Just used for the API Gateway, but could be expanded in the future. """ auth_type = "NONE" if iam_authorization and authorizer: logger.warn("Both IAM Authorization and Authorizer are specified, this is not possible. " "Setting Auth method to IAM Authorization") authorizer = None auth_type = "AWS_IAM" elif iam_authorization: auth_type = "AWS_IAM" elif authorizer: auth_type = authorizer.get("type", "CUSTOM") # build a fresh template self.cf_template = troposphere.Template() self.cf_template.add_description('Automatically generated with Zappa') self.cf_api_resources = [] self.cf_parameters = {} restapi = self.create_api_gateway_routes( lambda_arn, api_name=lambda_name, api_key_required=api_key_required, authorization_type=auth_type, authorizer=authorizer, cors_options=cors_options, description=description, endpoint_configuration=endpoint_configuration ) return self.cf_template def update_stack(self, name, working_bucket, wait=False, update_only=False, disable_progress=False): """ Update or create the CF stack managed by Zappa. """ capabilities = [] template = name + '-template-' + str(int(time.time())) + '.json' with open(template, 'wb') as out: out.write(bytes(self.cf_template.to_json(indent=None, separators=(',',':')), "utf-8")) self.upload_to_s3(template, working_bucket, disable_progress=disable_progress) if self.boto_session.region_name == "us-gov-west-1": url = 'https://s3-us-gov-west-1.amazonaws.com/{0}/{1}'.format(working_bucket, template) else: url = 'https://s3.amazonaws.com/{0}/{1}'.format(working_bucket, template) tags = [{'Key': key, 'Value': self.tags[key]} for key in self.tags.keys() if key != 'ZappaProject'] tags.append({'Key':'ZappaProject','Value':name}) update = True try: self.cf_client.describe_stacks(StackName=name) except botocore.client.ClientError: update = False if update_only and not update: print('CloudFormation stack missing, re-deploy to enable updates') return if not update: self.cf_client.create_stack(StackName=name, Capabilities=capabilities, TemplateURL=url, Tags=tags) print('Waiting for stack {0} to create (this can take a bit)..'.format(name)) else: try: self.cf_client.update_stack(StackName=name, Capabilities=capabilities, TemplateURL=url, Tags=tags) print('Waiting for stack {0} to update..'.format(name)) except botocore.client.ClientError as e: if e.response['Error']['Message'] == 'No updates are to be performed.': wait = False else: raise if wait: total_resources = len(self.cf_template.resources) current_resources = 0 sr = self.cf_client.get_paginator('list_stack_resources') progress = tqdm(total=total_resources, unit='res', disable=disable_progress) while True: time.sleep(3) result = self.cf_client.describe_stacks(StackName=name) if not result['Stacks']: continue # might need to wait a bit if result['Stacks'][0]['StackStatus'] in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']: break # Something has gone wrong. # Is raising enough? Should we also remove the Lambda function? if result['Stacks'][0]['StackStatus'] in [ 'DELETE_COMPLETE', 'DELETE_IN_PROGRESS', 'ROLLBACK_IN_PROGRESS', 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS', 'UPDATE_ROLLBACK_COMPLETE' ]: raise EnvironmentError("Stack creation failed. " "Please check your CloudFormation console. " "You may also need to `undeploy`.") count = 0 for result in sr.paginate(StackName=name): done = (1 for x in result['StackResourceSummaries'] if 'COMPLETE' in x['ResourceStatus']) count += sum(done) if count: # We can end up in a situation where we have more resources being created # than anticipated. if (count - current_resources) > 0: progress.update(count - current_resources) current_resources = count progress.close() try: os.remove(template) except OSError: pass self.remove_from_s3(template, working_bucket) def stack_outputs(self, name): """ Given a name, describes CloudFront stacks and returns dict of the stack Outputs , else returns an empty dict. """ try: stack = self.cf_client.describe_stacks(StackName=name)['Stacks'][0] return {x['OutputKey']: x['OutputValue'] for x in stack['Outputs']} except botocore.client.ClientError: return {} def get_api_url(self, lambda_name, stage_name): """ Given a lambda_name and stage_name, return a valid API URL. """ api_id = self.get_api_id(lambda_name) if api_id: return "https://{}.execute-api.{}.amazonaws.com/{}".format(api_id, self.boto_session.region_name, stage_name) else: return None def get_api_id(self, lambda_name): """ Given a lambda_name, return the API id. """ try: response = self.cf_client.describe_stack_resource(StackName=lambda_name, LogicalResourceId='Api') return response['StackResourceDetail'].get('PhysicalResourceId', None) except: # pragma: no cover try: # Try the old method (project was probably made on an older, non CF version) response = self.apigateway_client.get_rest_apis(limit=500) for item in response['items']: if item['name'] == lambda_name: return item['id'] logger.exception('Could not get API ID.') return None except: # pragma: no cover # We don't even have an API deployed. That's okay! return None def create_domain_name(self, domain_name, certificate_name, certificate_body=None, certificate_private_key=None, certificate_chain=None, certificate_arn=None, lambda_name=None, stage=None, base_path=None): """ Creates the API GW domain and returns the resulting DNS name. """ # This is a Let's Encrypt or custom certificate if not certificate_arn: agw_response = self.apigateway_client.create_domain_name( domainName=domain_name, certificateName=certificate_name, certificateBody=certificate_body, certificatePrivateKey=certificate_private_key, certificateChain=certificate_chain ) # This is an AWS ACM-hosted Certificate else: agw_response = self.apigateway_client.create_domain_name( domainName=domain_name, certificateName=certificate_name, certificateArn=certificate_arn ) api_id = self.get_api_id(lambda_name) if not api_id: raise LookupError("No API URL to certify found - did you deploy?") self.apigateway_client.create_base_path_mapping( domainName=domain_name, basePath='' if base_path is None else base_path, restApiId=api_id, stage=stage ) return agw_response['distributionDomainName'] def update_route53_records(self, domain_name, dns_name): """ Updates Route53 Records following GW domain creation """ zone_id = self.get_hosted_zone_id_for_domain(domain_name) is_apex = self.route53.get_hosted_zone(Id=zone_id)['HostedZone']['Name'][:-1] == domain_name if is_apex: record_set = { 'Name': domain_name, 'Type': 'A', 'AliasTarget': { 'HostedZoneId': 'Z2FDTNDATAQYW2', # This is a magic value that means "CloudFront" 'DNSName': dns_name, 'EvaluateTargetHealth': False } } else: record_set = { 'Name': domain_name, 'Type': 'CNAME', 'ResourceRecords': [ { 'Value': dns_name } ], 'TTL': 60 } # Related: https://github.com/boto/boto3/issues/157 # and: http://docs.aws.amazon.com/Route53/latest/APIReference/CreateAliasRRSAPI.html # and policy: https://spin.atomicobject.com/2016/04/28/route-53-hosted-zone-managment/ # pure_zone_id = zone_id.split('/hostedzone/')[1] # XXX: ClientError: An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: # Tried to create an alias that targets d1awfeji80d0k2.cloudfront.net., type A in zone Z1XWOQP59BYF6Z, # but the alias target name does not lie within the target zone response = self.route53.change_resource_record_sets( HostedZoneId=zone_id, ChangeBatch={ 'Changes': [ { 'Action': 'UPSERT', 'ResourceRecordSet': record_set } ] } ) return response def update_domain_name(self, domain_name, certificate_name=None, certificate_body=None, certificate_private_key=None, certificate_chain=None, certificate_arn=None, lambda_name=None, stage=None, route53=True, base_path=None): """ This updates your certificate information for an existing domain, with similar arguments to boto's update_domain_name API Gateway api. It returns the resulting new domain information including the new certificate's ARN if created during this process. Previously, this method involved downtime that could take up to 40 minutes because the API Gateway api only allowed this by deleting, and then creating it. Related issues: https://github.com/Miserlou/Zappa/issues/590 https://github.com/Miserlou/Zappa/issues/588 https://github.com/Miserlou/Zappa/pull/458 https://github.com/Miserlou/Zappa/issues/882 https://github.com/Miserlou/Zappa/pull/883 """ print("Updating domain name!") certificate_name = certificate_name + str(time.time()) api_gateway_domain = self.apigateway_client.get_domain_name(domainName=domain_name) if not certificate_arn\ and certificate_body and certificate_private_key and certificate_chain: acm_certificate = self.acm_client.import_certificate(Certificate=certificate_body, PrivateKey=certificate_private_key, CertificateChain=certificate_chain) certificate_arn = acm_certificate['CertificateArn'] self.update_domain_base_path_mapping(domain_name, lambda_name, stage, base_path) return self.apigateway_client.update_domain_name(domainName=domain_name, patchOperations=[ {"op" : "replace", "path" : "/certificateName", "value" : certificate_name}, {"op" : "replace", "path" : "/certificateArn", "value" : certificate_arn} ]) def update_domain_base_path_mapping(self, domain_name, lambda_name, stage, base_path): """ Update domain base path mapping on API Gateway if it was changed """ api_id = self.get_api_id(lambda_name) if not api_id: print("Warning! Can't update base path mapping!") return base_path_mappings = self.apigateway_client.get_base_path_mappings(domainName=domain_name) found = False for base_path_mapping in base_path_mappings.get('items', []): if base_path_mapping['restApiId'] == api_id and base_path_mapping['stage'] == stage: found = True if base_path_mapping['basePath'] != base_path: self.apigateway_client.update_base_path_mapping(domainName=domain_name, basePath=base_path_mapping['basePath'], patchOperations=[ {"op" : "replace", "path" : "/basePath", "value" : '' if base_path is None else base_path} ]) if not found: self.apigateway_client.create_base_path_mapping( domainName=domain_name, basePath='' if base_path is None else base_path, restApiId=api_id, stage=stage ) def get_all_zones(self): """Same behaviour of list_host_zones, but transparently handling pagination.""" zones = {'HostedZones': []} new_zones = self.route53.list_hosted_zones(MaxItems='100') while new_zones['IsTruncated']: zones['HostedZones'] += new_zones['HostedZones'] new_zones = self.route53.list_hosted_zones(Marker=new_zones['NextMarker'], MaxItems='100') zones['HostedZones'] += new_zones['HostedZones'] return zones def get_domain_name(self, domain_name, route53=True): """ Scan our hosted zones for the record of a given name. Returns the record entry, else None. """ # Make sure api gateway domain is present try: self.apigateway_client.get_domain_name(domainName=domain_name) except Exception: return None if not route53: return True try: zones = self.get_all_zones() for zone in zones['HostedZones']: records = self.route53.list_resource_record_sets(HostedZoneId=zone['Id']) for record in records['ResourceRecordSets']: if record['Type'] in ('CNAME', 'A') and record['Name'][:-1] == domain_name: return record except Exception as e: return None ## # Old, automatic logic. # If re-introduced, should be moved to a new function. # Related ticket: https://github.com/Miserlou/Zappa/pull/458 ## # We may be in a position where Route53 doesn't have a domain, but the API Gateway does. # We need to delete this before we can create the new Route53. # try: # api_gateway_domain = self.apigateway_client.get_domain_name(domainName=domain_name) # self.apigateway_client.delete_domain_name(domainName=domain_name) # except Exception: # pass return None ## # IAM ## def get_credentials_arn(self): """ Given our role name, get and set the credentials_arn. """ role = self.iam.Role(self.role_name) self.credentials_arn = role.arn return role, self.credentials_arn def create_iam_roles(self): """ Create and defines the IAM roles and policies necessary for Zappa. If the IAM role already exists, it will be updated if necessary. """ attach_policy_obj = json.loads(self.attach_policy) assume_policy_obj = json.loads(self.assume_policy) if self.extra_permissions: for permission in self.extra_permissions: attach_policy_obj['Statement'].append(dict(permission)) self.attach_policy = json.dumps(attach_policy_obj) updated = False # Create the role if needed try: role, credentials_arn = self.get_credentials_arn() except botocore.client.ClientError: print("Creating " + self.role_name + " IAM Role..") role = self.iam.create_role( RoleName=self.role_name, AssumeRolePolicyDocument=self.assume_policy ) self.credentials_arn = role.arn updated = True # create or update the role's policies if needed policy = self.iam.RolePolicy(self.role_name, 'zappa-permissions') try: if policy.policy_document != attach_policy_obj: print("Updating zappa-permissions policy on " + self.role_name + " IAM Role.") policy.put(PolicyDocument=self.attach_policy) updated = True except botocore.client.ClientError: print("Creating zappa-permissions policy on " + self.role_name + " IAM Role.") policy.put(PolicyDocument=self.attach_policy) updated = True if role.assume_role_policy_document != assume_policy_obj and \ set(role.assume_role_policy_document['Statement'][0]['Principal']['Service']) != set(assume_policy_obj['Statement'][0]['Principal']['Service']): print("Updating assume role policy on " + self.role_name + " IAM Role.") self.iam_client.update_assume_role_policy( RoleName=self.role_name, PolicyDocument=self.assume_policy ) updated = True return self.credentials_arn, updated def _clear_policy(self, lambda_name): """ Remove obsolete policy statements to prevent policy from bloating over the limit after repeated updates. """ try: policy_response = self.lambda_client.get_policy( FunctionName=lambda_name ) if policy_response['ResponseMetadata']['HTTPStatusCode'] == 200: statement = json.loads(policy_response['Policy'])['Statement'] for s in statement: delete_response = self.lambda_client.remove_permission( FunctionName=lambda_name, StatementId=s['Sid'] ) if delete_response['ResponseMetadata']['HTTPStatusCode'] != 204: logger.error('Failed to delete an obsolete policy statement: {}'.format(policy_response)) else: logger.debug('Failed to load Lambda function policy: {}'.format(policy_response)) except ClientError as e: if e.args[0].find('ResourceNotFoundException') > -1: logger.debug('No policy found, must be first run.') else: logger.error('Unexpected client error {}'.format(e.args[0])) ## # CloudWatch Events ## def create_event_permission(self, lambda_name, principal, source_arn): """ Create permissions to link to an event. Related: http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-configure-event-source.html """ logger.debug('Adding new permission to invoke Lambda function: {}'.format(lambda_name)) permission_response = self.lambda_client.add_permission( FunctionName=lambda_name, StatementId=''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(8)), Action='lambda:InvokeFunction', Principal=principal, SourceArn=source_arn, ) if permission_response['ResponseMetadata']['HTTPStatusCode'] != 201: print('Problem creating permission to invoke Lambda function') return None # XXX: Raise? return permission_response def schedule_events(self, lambda_arn, lambda_name, events, default=True): """ Given a Lambda ARN, name and a list of events, schedule this as CloudWatch Events. 'events' is a list of dictionaries, where the dict must contains the string of a 'function' and the string of the event 'expression', and an optional 'name' and 'description'. Expressions can be in rate or cron format: http://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html """ # The stream sources - DynamoDB, Kinesis and SQS - are working differently than the other services (pull vs push) # and do not require event permissions. They do require additional permissions on the Lambda roles though. # http://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html pull_services = ['dynamodb', 'kinesis', 'sqs'] # XXX: Not available in Lambda yet. # We probably want to execute the latest code. # if default: # lambda_arn = lambda_arn + ":$LATEST" self.unschedule_events(lambda_name=lambda_name, lambda_arn=lambda_arn, events=events, excluded_source_services=pull_services) for event in events: function = event['function'] expression = event.get('expression', None) # single expression expressions = event.get('expressions', None) # multiple expression kwargs = event.get('kwargs', {}) # optional dict of keyword arguments for the event event_source = event.get('event_source', None) description = event.get('description', function) # - If 'cron' or 'rate' in expression, use ScheduleExpression # - Else, use EventPattern # - ex https://github.com/awslabs/aws-lambda-ddns-function if not self.credentials_arn: self.get_credentials_arn() if expression: expressions = [expression] # same code for single and multiple expression if expressions: for index, expression in enumerate(expressions): name = self.get_scheduled_event_name(event, function, lambda_name, index) # if it's possible that we truncated name, generate a unique, shortened name # https://github.com/Miserlou/Zappa/issues/970 if len(name) >= 64: rule_name = self.get_hashed_rule_name(event, function, lambda_name) else: rule_name = name rule_response = self.events_client.put_rule( Name=rule_name, ScheduleExpression=expression, State='ENABLED', Description=description, RoleArn=self.credentials_arn ) if 'RuleArn' in rule_response: logger.debug('Rule created. ARN {}'.format(rule_response['RuleArn'])) # Specific permissions are necessary for any trigger to work. self.create_event_permission(lambda_name, 'events.amazonaws.com', rule_response['RuleArn']) # Overwriting the input, supply the original values and add kwargs input_template = '{"time":