aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.61k stars 1.01k forks source link

Custom Authorizer not working #1164

Closed akshay-scalex closed 5 years ago

akshay-scalex commented 5 years ago

I am using AWS Custom Authorizer to secure lambda function. I am not able to use the custom authorizer because of some configurational issues. Below is a sample code which I have written:

from chalice import Chalice
from chalice import CustomAuthorizer
app = Chalice(app_name='helloworld-python')

authorizer = CustomAuthorizer(
    'MyCustomAuth', header='Authorization',
    authorizer_uri=('arn:aws:apigateway:{region}:lambda:path/2015-03-31'
                    '/functions/arn:aws:lambda:{region}:{account-id}:'
                    'function:{function-name}/invocations'))

@app.route('/test/test_authorizer', authorizer=authorizer)
def index():
    return {'hello': 'world'}

I have configured the following policy:

{
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Allow",
        "Action": [
          "execute-api:Invoke"
        ],
        "Resource": [
          "*"
        ]
      }
    ]
  }

I am not able to add the authorizer to the lambda function. When I fire the endpoint it is giving me following error: image

At the same time, when I tried attaching the authorizer from API Gateway Console, it is working fine. When the authorizer is attached from code, it is not giving any error. I tried checking the cloudwatch logs, the logs are not generated for lambda functions(both for authorizer and helloworld function).

How can I achieve this. Please provide me with the proper intel.

stealthycoin commented 5 years ago

You left a bunch of place holders in that example code. Are those filled in correctly in the deployed version? This in particular: 'arn:aws:apigateway:{region}:lambda:path/2015-03-31/functions/arn:aws:lambda:{region}:{account-id}:function:{function-name}/invocations' is not a valid lambda function. Your policy is also lacking an Allow statement for invoking a lambda function, execute-api:Invoke is for api gateway.

If all this is correctly set up and it still doesnt work, can you deploy it with chalice --debug deploy and post the logs here so we can see what API calls it executed?

akshay-scalex commented 5 years ago

You were right @stealthycoin , I left a bunch of plceholders in the code. Thanks for the help.

akshay-scalex commented 5 years ago

@stealthycoin This are the logs

2019-07-24 11:18:35,253 botocore.hooks [DEBUG] Changing event name from before-call.apigateway to before-call.api-gateway
2019-07-24 11:18:35,254 botocore.hooks [DEBUG] Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2019-07-24 11:18:35,256 botocore.hooks [DEBUG] Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2019-07-24 11:18:35,256 botocore.hooks [DEBUG] Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2019-07-24 11:18:35,257 botocore.hooks [DEBUG] Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2019-07-24 11:18:35,258 botocore.hooks [DEBUG] Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
2019-07-24 11:18:35,260 botocore.hooks [DEBUG] Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
2019-07-24 11:18:35,260 botocore.hooks [DEBUG] Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
2019-07-24 11:18:35,261 botocore.hooks [DEBUG] Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
2019-07-24 11:18:35,261 botocore.hooks [DEBUG] Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (3.0.4) doesn't match a supported version!
2019-07-24 11:18:35,898 pip.vcs [DEBUG] Registered VCS backend: git
2019-07-24 11:18:35,948 pip.vcs [DEBUG] Registered VCS backend: hg
2019-07-24 11:18:35,998 pip.vcs [DEBUG] Registered VCS backend: svn
2019-07-24 11:18:35,998 pip.vcs [DEBUG] Registered VCS backend: bzr
2019-07-24 11:18:36,081 botocore.hooks [DEBUG] Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
2019-07-24 11:18:36,084 botocore.hooks [DEBUG] Changing event name from before-call.apigateway to before-call.api-gateway
2019-07-24 11:18:36,085 botocore.hooks [DEBUG] Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2019-07-24 11:18:36,087 botocore.hooks [DEBUG] Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2019-07-24 11:18:36,087 botocore.hooks [DEBUG] Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2019-07-24 11:18:36,088 botocore.hooks [DEBUG] Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2019-07-24 11:18:36,089 botocore.hooks [DEBUG] Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
2019-07-24 11:18:36,091 botocore.hooks [DEBUG] Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
2019-07-24 11:18:36,091 botocore.hooks [DEBUG] Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
2019-07-24 11:18:36,091 botocore.hooks [DEBUG] Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
2019-07-24 11:18:36,092 botocore.hooks [DEBUG] Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
Creating deployment package.
2019-07-24 11:18:36,095 chalice.deploy.packager [DEBUG] Creating deployment package.
2019-07-24 11:18:36,100 botocore.credentials [DEBUG] Looking for credentials via: env
2019-07-24 11:18:36,101 botocore.credentials [DEBUG] Looking for credentials via: assume-role
2019-07-24 11:18:36,101 botocore.credentials [DEBUG] Looking for credentials via: shared-credentials-file
2019-07-24 11:18:36,102 botocore.credentials [INFO] Found credentials in shared credentials file: ~/.aws/credentials
2019-07-24 11:18:36,102 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.6/dist-packages/botocore/data/endpoints.json
2019-07-24 11:18:36,107 botocore.hooks [DEBUG] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f673121cae8>
2019-07-24 11:18:36,112 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.6/dist-packages/botocore/data/iam/2010-05-08/service-2.json
2019-07-24 11:18:36,121 botocore.hooks [DEBUG] Event creating-client-class.iam: calling handler <function add_generate_presigned_url at 0x7f673125b0d0>
2019-07-24 11:18:36,122 botocore.regions [DEBUG] Using partition endpoint for iam, ap-south-1: aws-global
2019-07-24 11:18:36,122 botocore.args [DEBUG] The s3 config key is not a dictionary type, ignoring its value of: None
2019-07-24 11:18:36,124 botocore.endpoint [DEBUG] Setting iam timeout as (60, 60)
2019-07-24 11:18:36,125 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.6/dist-packages/botocore/data/_retry.json
2019-07-24 11:18:36,126 botocore.client [DEBUG] Registering retry handlers for service: iam
2019-07-24 11:18:36,126 botocore.hooks [DEBUG] Event before-parameter-build.iam.GetRole: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:36,127 botocore.hooks [DEBUG] Event before-call.iam.GetRole: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:36,127 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetRole) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': {'Action': 'GetRole', 'Version': '2010-05-08', 'RoleName': 'auth-custom-dev'}, 'url': 'https://iam.amazonaws.com/', 'context': {'client_region': 'aws-global', 'client_config': <botocore.config.Config object at 0x7f672ec80e10>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:36,127 botocore.hooks [DEBUG] Event request-created.iam.GetRole: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec80da0>>
2019-07-24 11:18:36,127 botocore.hooks [DEBUG] Event choose-signer.iam.GetRole: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:36,128 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:36,128 botocore.auth [DEBUG] CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:iam.amazonaws.com
x-amz-date:20190724T111836Z

content-type;host;x-amz-date
2a0bf23644962c352ccce58c8c8449b24240730195e00b9cf64d0fdde47bdd5f
2019-07-24 11:18:36,129 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111836Z
20190724/us-east-1/iam/aws4_request
d13c78cd04a93948edbf325c3cf3ce66e2af8b1afe030dfef4e50a00e8d4719b
2019-07-24 11:18:36,129 botocore.auth [DEBUG] Signature:
4f43e5ae317d55d46b0460799ce2b4c5037358833a345cbe80bd46510a3b8976
2019-07-24 11:18:36,129 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://iam.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111836Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/us-east-1/iam/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=4f43e5ae317d55d46b0460799ce2b4c5037358833a345cbe80bd46510a3b8976', 'Content-Length': '58'}>
2019-07-24 11:18:36,130 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:36,131 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): iam.amazonaws.com:443
2019-07-24 11:18:37,111 urllib3.connectionpool [DEBUG] https://iam.amazonaws.com:443 "POST / HTTP/1.1" 200 818
2019-07-24 11:18:37,111 botocore.parsers [DEBUG] Response headers: {'x-amzn-RequestId': 'c7f4c4e2-ae04-11e9-ab9c-d128b4bdd396', 'Content-Type': 'text/xml', 'Content-Length': '818', 'Date': 'Wed, 24 Jul 2019 11:18:36 GMT'}
2019-07-24 11:18:37,112 botocore.parsers [DEBUG] Response body:
b'<GetRoleResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">\n  <GetRoleResult>\n    <Role>\n      <Path>/</Path>\n      <AssumeRolePolicyDocument>%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Sid%22%3A%22%22%2C%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%22lambda.amazonaws.com%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D</AssumeRolePolicyDocument>\n      <MaxSessionDuration>3600</MaxSessionDuration>\n      <RoleId>AROAUN6G6IAHYXCG5ICKJ</RoleId>\n      <RoleName>auth-custom-dev</RoleName>\n      <Arn>arn:aws:iam::304823025679:role/auth-custom-dev</Arn>\n      <CreateDate>2019-07-24T10:44:57Z</CreateDate>\n    </Role>\n  </GetRoleResult>\n  <ResponseMetadata>\n    <RequestId>c7f4c4e2-ae04-11e9-ab9c-d128b4bdd396</RequestId>\n  </ResponseMetadata>\n</GetRoleResponse>\n'
2019-07-24 11:18:37,113 botocore.hooks [DEBUG] Event needs-retry.iam.GetRole: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ed6e1d0>
2019-07-24 11:18:37,113 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:37,114 botocore.hooks [DEBUG] Event after-call.iam.GetRole: calling handler <function json_decode_policies at 0x7f672fd8ce18>
2019-07-24 11:18:37,114 botocore.hooks [DEBUG] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f673121cae8>
2019-07-24 11:18:37,115 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.6/dist-packages/botocore/data/lambda/2015-03-31/service-2.json
2019-07-24 11:18:37,120 botocore.hooks [DEBUG] Event creating-client-class.lambda: calling handler <function add_generate_presigned_url at 0x7f673125b0d0>
2019-07-24 11:18:37,120 botocore.args [DEBUG] The s3 config key is not a dictionary type, ignoring its value of: None
2019-07-24 11:18:37,121 botocore.endpoint [DEBUG] Setting lambda timeout as (60, 60)
2019-07-24 11:18:37,122 botocore.client [DEBUG] Registering retry handlers for service: lambda
2019-07-24 11:18:37,123 botocore.hooks [DEBUG] Event before-parameter-build.lambda.GetFunction: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:37,123 botocore.hooks [DEBUG] Event before-call.lambda.GetFunction: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:37,123 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetFunction) with params: {'url_path': '/2015-03-31/functions/auth-custom-dev', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'', 'url': 'https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:37,124 botocore.hooks [DEBUG] Event request-created.lambda.GetFunction: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:37,124 botocore.hooks [DEBUG] Event choose-signer.lambda.GetFunction: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:37,124 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:37,124 botocore.auth [DEBUG] CanonicalRequest:
GET
/2015-03-31/functions/auth-custom-dev

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111837Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:37,125 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111837Z
20190724/ap-south-1/lambda/aws4_request
a5f20d1670b6059d9753970fcbbb5b0efac8ea753a13f841012eae73cec51a06
2019-07-24 11:18:37,125 botocore.auth [DEBUG] Signature:
7102819f195d74e7b539621dd2a1f8e79c057ca8d92be26f965938ed00ccedbd
2019-07-24 11:18:37,125 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111837Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=7102819f195d74e7b539621dd2a1f8e79c057ca8d92be26f965938ed00ccedbd'}>
2019-07-24 11:18:37,126 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:37,126 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): lambda.ap-south-1.amazonaws.com:443
2019-07-24 11:18:37,429 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "GET /2015-03-31/functions/auth-custom-dev HTTP/1.1" 200 2391
2019-07-24 11:18:37,429 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:37 GMT', 'Content-Type': 'application/json', 'Content-Length': '2391', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'f5bb457e-8e74-48a4-abcc-7e13b683e288'}
2019-07-24 11:18:37,430 botocore.parsers [DEBUG] Response body:
b'{"Configuration":{"Description":"","TracingConfig":{"Mode":"PassThrough"},"VpcConfig":{"VpcId":"","SecurityGroupIds":[],"SubnetIds":[]},"RevisionId":"d591e39d-0948-4239-a3af-29cdcf195055","LastModified":"2019-07-24T11:02:22.994+0000","FunctionName":"auth-custom-dev","Runtime":"python3.6","Version":"$LATEST","Layers":[],"FunctionArn":"arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev","KMSKeyArn":null,"MemorySize":128,"DeadLetterConfig":null,"Timeout":60,"Handler":"app.app","CodeSha256":"5UEDAOGSXz/eIYM6AIgmE1ef9qkNFsGNmBsU9JOk/Zg=","Role":"arn:aws:iam::304823025679:role/auth-custom-dev","MasterArn":null,"CodeSize":12632,"Environment":null},"Concurrency":null,"Code":{"RepositoryType":"S3","Location":"https://awslambda-ap-s-1-tasks.s3.ap-south-1.amazonaws.com/snapshots/304823025679/auth-custom-dev-bddf51d2-4839-4c89-a5af-569f7a14995e?versionId=lzA6R9ecvUzTlAksjpD9oCB4YVdJaNZ3&X-Amz-Security-Token=AgoJb3JpZ2luX2VjEIL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiAyeh9p1cTHFyK5Q03ulgFI21VfTSmpTKnUKwibFtkDCQIhAP3hdmXKbDpTdE9LaHT7CrfT4yvz%2FI1FQ11r%2Bl1shoStKuUDCOv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMNTQ1MjU1MjAxMzA3IgzMaIiKCVPd7QczqUUquQPsqmonWea%2FVgny9nsjsUA0nXDQl554IBJXbzpvYvO4bE1VPmd9FcakEQfplvaMC0pkz%2FKFqBn8N3UTSaVI375XAy3%2BmrXpAo5VGbcQfGNSw%2FOrVMf2ckt6ZIIno24f%2BEJ2r9rGxtCuEcbrqEScNOW4w0juryMgLo9k9ciENRoi%2FtQ3XiDh1ms0pPrnIGPw%2FIdASJ6564VZt5BfYfQaVofd4itq6aNIcaY9uhcZU2lry9Q0L4AuyO8K4lByxwSJ3UOlCmnwzIVQHyZ%2F9%2FgxgUrrTYydxAxy9NjX6hX%2BaHHIecoBnUKnQpEHrSrQwa5sMaHgKbfMQ9KeRJK04hZtX0c2PXnv%2BVo59LfdJNjrOphEcDkxYTgyPKZMKIj10JhFFszKXqfL%2B8QU7pP9RmVn2zGRUDtCmvf8iRj6NZ3ALMMkco6SVp2U42pQ1fnG11z1gll8bBDAbpeIDUazX%2FMCzJmWm2baoBKWQ%2B14O1z%2FxXXZXkTuJFXEahl5PRVyoP5LHkBPHjXp9OOtBavx9suUr6h2FRnmOJBmqAoh1LgFuM8Z79TaAkeAtMFQJzcN1QwE2AhMdyjo21uJt%2FEwytbg6QU6tAESAf1mRzYrlRLek%2FAwZ7Yo7P837O2XtUajCp4Mdxi%2FU1ylxKNZqFOnWrOSExgfLPb3%2BtlpaJ5G1jnyDTQU2DLIacTu3K6i7QxaSkyxTuqcAjphh8qafFWRynlCPVYpykXKYoSwz1kcyigMAQwAsdLWGSLwix5p6Py9keQqAEqoDgIq7yDxX5UOgKjvOtFOh6BQbYWoM43cUO3c2psMp4HN7sGcur0BSeRVlz4Np%2B7FlU9oKI0%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190724T111837Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=ASIAX5456DIN5XSV7TPA%2F20190724%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=e6ac477c6f3391be10156526ad3a466421f5c42f7b385dbb5c04a78acdbd1918"},"Tags":{"aws-chalice":"version=1.9.0:stage=dev:app=auth-custom"}}'
2019-07-24 11:18:37,430 botocore.hooks [DEBUG] Event needs-retry.lambda.GetFunction: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:37,431 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:37,431 botocore.hooks [DEBUG] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f673121cae8>
2019-07-24 11:18:37,432 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.6/dist-packages/botocore/data/apigateway/2015-07-09/service-2.json
2019-07-24 11:18:37,440 botocore.hooks [DEBUG] Event creating-client-class.api-gateway: calling handler <function add_generate_presigned_url at 0x7f673125b0d0>
2019-07-24 11:18:37,440 botocore.args [DEBUG] The s3 config key is not a dictionary type, ignoring its value of: None
2019-07-24 11:18:37,441 botocore.endpoint [DEBUG] Setting apigateway timeout as (60, 60)
2019-07-24 11:18:37,442 botocore.client [DEBUG] Registering retry handlers for service: apigateway
2019-07-24 11:18:37,443 botocore.hooks [DEBUG] Event before-parameter-build.api-gateway.GetRestApi: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:37,443 botocore.hooks [DEBUG] Event before-call.api-gateway.GetRestApi: calling handler <function add_accept_header at 0x7f672fd8d378>
2019-07-24 11:18:37,444 botocore.hooks [DEBUG] Event before-call.api-gateway.GetRestApi: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:37,444 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetRestApi) with params: {'url_path': '/restapis/0ievnv2eq1', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': 'application/json'}, 'body': b'', 'url': 'https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672e35eda0>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:37,444 botocore.hooks [DEBUG] Event request-created.api-gateway.GetRestApi: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672e35ed68>>
2019-07-24 11:18:37,444 botocore.hooks [DEBUG] Event choose-signer.api-gateway.GetRestApi: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:37,445 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:37,445 botocore.auth [DEBUG] CanonicalRequest:
GET
/restapis/0ievnv2eq1

accept:application/json
host:apigateway.ap-south-1.amazonaws.com
x-amz-date:20190724T111837Z

accept;host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:37,445 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111837Z
20190724/ap-south-1/apigateway/aws4_request
c6fe4150ed81d32f11b6366f33f654a318ea896cff5ca31fc017a2743fc5ac33
2019-07-24 11:18:37,445 botocore.auth [DEBUG] Signature:
2cd3e8b73846e3d858c90bf3b45ad60e06653bbf4ca395f5a58a0c03c275432f
2019-07-24 11:18:37,446 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': b'application/json', 'X-Amz-Date': b'20190724T111837Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/apigateway/aws4_request, SignedHeaders=accept;host;x-amz-date, Signature=2cd3e8b73846e3d858c90bf3b45ad60e06653bbf4ca395f5a58a0c03c275432f'}>
2019-07-24 11:18:37,446 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:37,447 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): apigateway.ap-south-1.amazonaws.com:443
2019-07-24 11:18:37,808 urllib3.connectionpool [DEBUG] https://apigateway.ap-south-1.amazonaws.com:443 "GET /restapis/0ievnv2eq1 HTTP/1.1" 200 421
2019-07-24 11:18:37,809 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:37 GMT', 'Content-Type': 'application/json', 'Content-Length': '421', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'b41a5b3f-15ff-4d7a-b781-a174c7e51a6b', 'x-amz-apigw-id': 'dU62IKN6hcwEchw='}
2019-07-24 11:18:37,809 botocore.parsers [DEBUG] Response body:
b'{"apiKeySource":"HEADER","binaryMediaTypes":["application/octet-stream","application/x-tar","application/zip","audio/basic","audio/ogg","audio/mp4","audio/mpeg","audio/wav","audio/webm","image/png","image/jpg","image/jpeg","image/gif","video/ogg","video/mpeg","video/webm"],"createdDate":1563965318,"endpointConfiguration":{"ipv6":false,"types":["EDGE"]},"id":"0ievnv2eq1","name":"auth-custom","tags":{},"version":"1.0"}\n'
2019-07-24 11:18:37,810 botocore.hooks [DEBUG] Event needs-retry.api-gateway.GetRestApi: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672e387128>
2019-07-24 11:18:37,810 botocore.retryhandler [DEBUG] No retry needed.
Updating policy for IAM role: auth-custom-dev
2019-07-24 11:18:37,811 botocore.hooks [DEBUG] Event before-parameter-build.iam.PutRolePolicy: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:37,811 botocore.hooks [DEBUG] Event before-call.iam.PutRolePolicy: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:37,811 botocore.endpoint [DEBUG] Making request for OperationModel(name=PutRolePolicy) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': {'Action': 'PutRolePolicy', 'Version': '2010-05-08', 'RoleName': 'auth-custom-dev', 'PolicyName': 'auth-custom-dev', 'PolicyDocument': '{\n  "Version": "2012-10-17",\n  "Statement": [\n    {\n      "Effect": "Allow",\n      "Action": [\n        "logs:CreateLogGroup",\n        "logs:CreateLogStream",\n        "logs:PutLogEvents"\n      ],\n      "Resource": "arn:aws:logs:*:*:*"\n    }\n  ]\n}'}, 'url': 'https://iam.amazonaws.com/', 'context': {'client_region': 'aws-global', 'client_config': <botocore.config.Config object at 0x7f672ec80e10>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:37,811 botocore.hooks [DEBUG] Event request-created.iam.PutRolePolicy: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec80da0>>
2019-07-24 11:18:37,812 botocore.hooks [DEBUG] Event choose-signer.iam.PutRolePolicy: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:37,812 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:37,812 botocore.auth [DEBUG] CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:iam.amazonaws.com
x-amz-date:20190724T111837Z

content-type;host;x-amz-date
d71eb900a6f6ec5f26cae61f70506d30866a6f75eb3741ce3a21e17cb7e60a8e
2019-07-24 11:18:37,813 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111837Z
20190724/us-east-1/iam/aws4_request
9109f0cf0e0cc123e8e9af0f9b507fe82e6dd44739e4553161db5989afdbcda7
2019-07-24 11:18:37,813 botocore.auth [DEBUG] Signature:
981afc3b2f950c95fa63666878475f958d3e4ced0856284a4a1a18946916499d
2019-07-24 11:18:37,813 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://iam.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111837Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/us-east-1/iam/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=981afc3b2f950c95fa63666878475f958d3e4ced0856284a4a1a18946916499d', 'Content-Length': '480'}>
2019-07-24 11:18:37,814 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,147 urllib3.connectionpool [DEBUG] https://iam.amazonaws.com:443 "POST / HTTP/1.1" 200 206
2019-07-24 11:18:38,147 botocore.parsers [DEBUG] Response headers: {'x-amzn-RequestId': 'c890900c-ae04-11e9-ab9c-d128b4bdd396', 'Content-Type': 'text/xml', 'Content-Length': '206', 'Date': 'Wed, 24 Jul 2019 11:18:37 GMT'}
2019-07-24 11:18:38,147 botocore.parsers [DEBUG] Response body:
b'<PutRolePolicyResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">\n  <ResponseMetadata>\n    <RequestId>c890900c-ae04-11e9-ab9c-d128b4bdd396</RequestId>\n  </ResponseMetadata>\n</PutRolePolicyResponse>\n'
2019-07-24 11:18:38,148 botocore.hooks [DEBUG] Event needs-retry.iam.PutRolePolicy: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ed6e1d0>
2019-07-24 11:18:38,148 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:38,148 botocore.hooks [DEBUG] Event after-call.iam.PutRolePolicy: calling handler <function json_decode_policies at 0x7f672fd8ce18>
Updating lambda function: auth-custom-dev
2019-07-24 11:18:38,149 botocore.hooks [DEBUG] Event before-parameter-build.lambda.UpdateFunctionCode: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,150 botocore.hooks [DEBUG] Event before-call.lambda.UpdateFunctionCode: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,150 botocore.endpoint [DEBUG] Making request for OperationModel(name=UpdateFunctionCode) with params: (... omitted from logs due to size ...)
2019-07-24 11:18:38,150 botocore.hooks [DEBUG] Event request-created.lambda.UpdateFunctionCode: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:38,151 botocore.hooks [DEBUG] Event choose-signer.lambda.UpdateFunctionCode: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,151 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,151 botocore.auth [DEBUG] CanonicalRequest:
PUT
/2015-03-31/functions/auth-custom-dev/code

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

host;x-amz-date
b1fb589e0748cb94575a807f7cab5257035fbba50fc42ecfe94d60e42070088a
2019-07-24 11:18:38,152 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/lambda/aws4_request
c38b74144fc8102b8571bb07bf740da5b9e68aeffd54b733edfa9ba9e2331a85
2019-07-24 11:18:38,152 botocore.auth [DEBUG] Signature:
df9ca39f5f0d1513b3d7ae2a48b08c5d20da16dcebac02d45f06eee02f93fe47
2019-07-24 11:18:38,152 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/code, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=df9ca39f5f0d1513b3d7ae2a48b08c5d20da16dcebac02d45f06eee02f93fe47', 'Content-Length': '16859'}>
2019-07-24 11:18:38,153 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,345 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "PUT /2015-03-31/functions/auth-custom-dev/code HTTP/1.1" 200 644
2019-07-24 11:18:38,345 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:38 GMT', 'Content-Type': 'application/json', 'Content-Length': '644', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'bfe12823-c149-430d-872e-64d2f1f08d4e'}
2019-07-24 11:18:38,346 botocore.parsers [DEBUG] Response body:
b'{"Description":"","TracingConfig":{"Mode":"PassThrough"},"VpcConfig":{"VpcId":"","SecurityGroupIds":[],"SubnetIds":[]},"RevisionId":"2e468e28-6dcf-4116-851b-73df593759b7","LastModified":"2019-07-24T11:18:38.262+0000","FunctionName":"auth-custom-dev","Runtime":"python3.6","Version":"$LATEST","Layers":[],"FunctionArn":"arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev","KMSKeyArn":null,"MemorySize":128,"DeadLetterConfig":null,"Timeout":60,"Handler":"app.app","CodeSha256":"5UEDAOGSXz/eIYM6AIgmE1ef9qkNFsGNmBsU9JOk/Zg=","Role":"arn:aws:iam::304823025679:role/auth-custom-dev","MasterArn":null,"CodeSize":12632,"Environment":null}'
2019-07-24 11:18:38,346 botocore.hooks [DEBUG] Event needs-retry.lambda.UpdateFunctionCode: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:38,347 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:38,348 botocore.hooks [DEBUG] Event before-parameter-build.lambda.UpdateFunctionConfiguration: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,349 botocore.hooks [DEBUG] Event before-call.lambda.UpdateFunctionConfiguration: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,349 botocore.endpoint [DEBUG] Making request for OperationModel(name=UpdateFunctionConfiguration) with params: {'url_path': '/2015-03-31/functions/auth-custom-dev/configuration', 'query_string': {}, 'method': 'PUT', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'{"Environment": {"Variables": {}}, "Runtime": "python3.6", "Timeout": 60, "MemorySize": 128, "Role": "arn:aws:iam::304823025679:role/auth-custom-dev", "VpcConfig": {"SubnetIds": [], "SecurityGroupIds": []}, "Layers": []}', 'url': 'https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/configuration', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:38,349 botocore.hooks [DEBUG] Event request-created.lambda.UpdateFunctionConfiguration: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:38,350 botocore.hooks [DEBUG] Event choose-signer.lambda.UpdateFunctionConfiguration: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,350 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,350 botocore.auth [DEBUG] CanonicalRequest:
PUT
/2015-03-31/functions/auth-custom-dev/configuration

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

host;x-amz-date
19e8f03eb8b0ea6fdf2765d3d0f9f62b43a11b4ad084830f0662ed80c84a3d26
2019-07-24 11:18:38,351 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/lambda/aws4_request
60282ce188e611ffa44697a589638151e66f6b7fcf1f54826d7883a56138fa12
2019-07-24 11:18:38,351 botocore.auth [DEBUG] Signature:
8a847a4ea4fff338f2da70df6a8e9901eb5726c365480e38a749a12429217b83
2019-07-24 11:18:38,351 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/configuration, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=8a847a4ea4fff338f2da70df6a8e9901eb5726c365480e38a749a12429217b83', 'Content-Length': '220'}>
2019-07-24 11:18:38,352 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,452 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "PUT /2015-03-31/functions/auth-custom-dev/configuration HTTP/1.1" 200 644
2019-07-24 11:18:38,453 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:38 GMT', 'Content-Type': 'application/json', 'Content-Length': '644', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'bf4ae09c-a02b-4453-ae57-ca04111bbea8'}
2019-07-24 11:18:38,453 botocore.parsers [DEBUG] Response body:
b'{"Description":"","TracingConfig":{"Mode":"PassThrough"},"VpcConfig":{"VpcId":"","SecurityGroupIds":[],"SubnetIds":[]},"RevisionId":"b2641aac-5f29-4c30-97a7-2881c4a9e8fa","LastModified":"2019-07-24T11:18:38.364+0000","FunctionName":"auth-custom-dev","Runtime":"python3.6","Version":"$LATEST","Layers":[],"FunctionArn":"arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev","KMSKeyArn":null,"MemorySize":128,"DeadLetterConfig":null,"Timeout":60,"Handler":"app.app","CodeSha256":"5UEDAOGSXz/eIYM6AIgmE1ef9qkNFsGNmBsU9JOk/Zg=","Role":"arn:aws:iam::304823025679:role/auth-custom-dev","MasterArn":null,"CodeSize":12632,"Environment":null}'
2019-07-24 11:18:38,453 botocore.hooks [DEBUG] Event needs-retry.lambda.UpdateFunctionConfiguration: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:38,454 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:38,454 botocore.hooks [DEBUG] Event before-parameter-build.lambda.ListTags: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,454 botocore.hooks [DEBUG] Event before-call.lambda.ListTags: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,455 botocore.endpoint [DEBUG] Making request for OperationModel(name=ListTags) with params: {'url_path': '/2017-03-31/tags/arn%3Aaws%3Alambda%3Aap-south-1%3A304823025679%3Afunction%3Aauth-custom-dev', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'', 'url': 'https://lambda.ap-south-1.amazonaws.com/2017-03-31/tags/arn%3Aaws%3Alambda%3Aap-south-1%3A304823025679%3Afunction%3Aauth-custom-dev', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:38,455 botocore.hooks [DEBUG] Event request-created.lambda.ListTags: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:38,455 botocore.hooks [DEBUG] Event choose-signer.lambda.ListTags: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,456 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,456 botocore.auth [DEBUG] CanonicalRequest:
GET
/2017-03-31/tags/arn%253Aaws%253Alambda%253Aap-south-1%253A304823025679%253Afunction%253Aauth-custom-dev

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:38,456 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/lambda/aws4_request
3bdb1e7964f446425e3bdfd102a03dcf47176a90c75420a06d1b8554f2792e29
2019-07-24 11:18:38,457 botocore.auth [DEBUG] Signature:
92a88fbee3e7f82c21f4066e3f77dcbc0c3bb393351d3ccda63da7cd20c40823
2019-07-24 11:18:38,457 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://lambda.ap-south-1.amazonaws.com/2017-03-31/tags/arn%3Aaws%3Alambda%3Aap-south-1%3A304823025679%3Afunction%3Aauth-custom-dev, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=92a88fbee3e7f82c21f4066e3f77dcbc0c3bb393351d3ccda63da7cd20c40823'}>
2019-07-24 11:18:38,458 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,530 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "GET /2017-03-31/tags/arn%3Aaws%3Alambda%3Aap-south-1%3A304823025679%3Afunction%3Aauth-custom-dev HTTP/1.1" 200 66
2019-07-24 11:18:38,531 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:38 GMT', 'Content-Type': 'application/json', 'Content-Length': '66', 'Connection': 'keep-alive', 'x-amzn-RequestId': '7d884934-91a0-405c-901c-39c03c44f371'}
2019-07-24 11:18:38,531 botocore.parsers [DEBUG] Response body:
b'{"Tags":{"aws-chalice":"version=1.9.0:stage=dev:app=auth-custom"}}'
2019-07-24 11:18:38,532 botocore.hooks [DEBUG] Event needs-retry.lambda.ListTags: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:38,532 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:38,533 botocore.hooks [DEBUG] Event before-parameter-build.lambda.DeleteFunctionConcurrency: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,533 botocore.hooks [DEBUG] Event before-call.lambda.DeleteFunctionConcurrency: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,533 botocore.endpoint [DEBUG] Making request for OperationModel(name=DeleteFunctionConcurrency) with params: {'url_path': '/2017-10-31/functions/auth-custom-dev/concurrency', 'query_string': {}, 'method': 'DELETE', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'', 'url': 'https://lambda.ap-south-1.amazonaws.com/2017-10-31/functions/auth-custom-dev/concurrency', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:38,533 botocore.hooks [DEBUG] Event request-created.lambda.DeleteFunctionConcurrency: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:38,534 botocore.hooks [DEBUG] Event choose-signer.lambda.DeleteFunctionConcurrency: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,534 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,534 botocore.auth [DEBUG] CanonicalRequest:
DELETE
/2017-10-31/functions/auth-custom-dev/concurrency

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:38,535 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/lambda/aws4_request
dd72fd143e2842500fd793cd434f77479da57ca71ca5b8066dddcdabfc7be6c2
2019-07-24 11:18:38,535 botocore.auth [DEBUG] Signature:
fd4b1002db6018e9635723b3bbe6dd8cd34bab60169c97fc014e3314a44de076
2019-07-24 11:18:38,535 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=DELETE, url=https://lambda.ap-south-1.amazonaws.com/2017-10-31/functions/auth-custom-dev/concurrency, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=fd4b1002db6018e9635723b3bbe6dd8cd34bab60169c97fc014e3314a44de076', 'Content-Length': '0'}>
2019-07-24 11:18:38,536 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,606 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "DELETE /2017-10-31/functions/auth-custom-dev/concurrency HTTP/1.1" 204 0
2019-07-24 11:18:38,606 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:38 GMT', 'Content-Type': 'application/json', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'cdc8b820-e338-4e2a-807d-30c07b620b77'}
2019-07-24 11:18:38,606 botocore.parsers [DEBUG] Response body:
b''
2019-07-24 11:18:38,607 botocore.hooks [DEBUG] Event needs-retry.lambda.DeleteFunctionConcurrency: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:38,607 botocore.retryhandler [DEBUG] No retry needed.
Updating rest API
2019-07-24 11:18:38,608 botocore.hooks [DEBUG] Event before-parameter-build.api-gateway.PutRestApi: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,609 botocore.hooks [DEBUG] Event before-call.api-gateway.PutRestApi: calling handler <function add_accept_header at 0x7f672fd8d378>
2019-07-24 11:18:38,609 botocore.hooks [DEBUG] Event before-call.api-gateway.PutRestApi: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,609 botocore.endpoint [DEBUG] Making request for OperationModel(name=PutRestApi) with params: {'url_path': '/restapis/0ievnv2eq1', 'query_string': {'mode': 'overwrite'}, 'method': 'PUT', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': 'application/json'}, 'body': b'{\n  "swagger": "2.0",\n  "info": {\n    "version": "1.0",\n    "title": "auth-custom"\n  },\n  "schemes": [\n    "https"\n  ],\n  "paths": {\n    "/": {\n      "get": {\n        "consumes": [\n          "application/json"\n        ],\n        "produces": [\n          "application/json"\n        ],\n        "responses": {\n          "200": {\n            "description": "200 response",\n            "schema": {\n              "$ref": "#/definitions/Empty"\n            }\n          }\n        },\n        "x-amazon-apigateway-integration": {\n          "responses": {\n            "default": {\n              "statusCode": "200"\n            }\n          },\n          "uri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev/invocations",\n          "passthroughBehavior": "when_no_match",\n          "httpMethod": "POST",\n          "contentHandling": "CONVERT_TO_TEXT",\n          "type": "aws_proxy"\n        }\n      }\n    },\n    "/poc/create_tenant": {\n      "get": {\n        "consumes": [\n          "application/json"\n        ],\n        "produces": [\n          "application/json"\n        ],\n        "responses": {\n          "200": {\n            "description": "200 response",\n            "schema": {\n              "$ref": "#/definitions/Empty"\n            }\n          }\n        },\n        "x-amazon-apigateway-integration": {\n          "responses": {\n            "default": {\n              "statusCode": "200"\n            }\n          },\n          "uri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev/invocations",\n          "passthroughBehavior": "when_no_match",\n          "httpMethod": "POST",\n          "contentHandling": "CONVERT_TO_TEXT",\n          "type": "aws_proxy"\n        },\n        "security": [\n          {\n            "MyCustomAuth": []\n          }\n        ]\n      }\n    }\n  },\n  "definitions": {\n    "Empty": {\n      "type": "object",\n      "title": "Empty Schema"\n    }\n  },\n  "x-amazon-apigateway-binary-media-types": [\n    "application/octet-stream",\n    "application/x-tar",\n    "application/zip",\n    "audio/basic",\n    "audio/ogg",\n    "audio/mp4",\n    "audio/mpeg",\n    "audio/wav",\n    "audio/webm",\n    "image/png",\n    "image/jpg",\n    "image/jpeg",\n    "image/gif",\n    "video/ogg",\n    "video/mpeg",\n    "video/webm"\n  ],\n  "securityDefinitions": {\n    "MyCustomAuth": {\n      "in": "header",\n      "type": "apiKey",\n      "name": "Authorization",\n      "x-amazon-apigateway-authtype": "custom",\n      "x-amazon-apigateway-authorizer": {\n        "type": "token",\n        "authorizerUri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:304823025679:function:acc-authorizer-py-dev-validate-user/invocations",\n        "authorizerResultTtlInSeconds": 300\n      }\n    }\n  }\n}', 'url': 'https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1?mode=overwrite', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672e35eda0>, 'has_streaming_input': True, 'auth_type': None}}
2019-07-24 11:18:38,609 botocore.hooks [DEBUG] Event request-created.api-gateway.PutRestApi: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672e35ed68>>
2019-07-24 11:18:38,610 botocore.hooks [DEBUG] Event choose-signer.api-gateway.PutRestApi: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,610 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,610 botocore.auth [DEBUG] CanonicalRequest:
PUT
/restapis/0ievnv2eq1
mode=overwrite
accept:application/json
host:apigateway.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

accept;host;x-amz-date
566e57aa18a2ee6b49197c5fa514207053955a0de18287e8c2b5780c129ee0ca
2019-07-24 11:18:38,611 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/apigateway/aws4_request
15f07ea373f1f54df67aec8a1359eb8f08bb918edf400c7a0ef2f1ef7aad8830
2019-07-24 11:18:38,611 botocore.auth [DEBUG] Signature:
998f30af7fa565cff36a40bbdacbf4f44a1263d16f3f3935e82fa92245d56f46
2019-07-24 11:18:38,611 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1?mode=overwrite, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': b'application/json', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/apigateway/aws4_request, SignedHeaders=accept;host;x-amz-date, Signature=998f30af7fa565cff36a40bbdacbf4f44a1263d16f3f3935e82fa92245d56f46', 'Content-Length': '2870'}>
2019-07-24 11:18:38,612 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:38,888 urllib3.connectionpool [DEBUG] https://apigateway.ap-south-1.amazonaws.com:443 "PUT /restapis/0ievnv2eq1?mode=overwrite HTTP/1.1" 200 421
2019-07-24 11:18:38,888 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:38 GMT', 'Content-Type': 'application/json', 'Content-Length': '421', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'e6d16eaa-1ac7-4b9e-84ee-22cd4a70c86e', 'x-amz-apigw-id': 'dU62SKCLhcwEcMw='}
2019-07-24 11:18:38,888 botocore.parsers [DEBUG] Response body:
b'{"apiKeySource":"HEADER","binaryMediaTypes":["application/octet-stream","application/x-tar","application/zip","audio/basic","audio/ogg","audio/mp4","audio/mpeg","audio/wav","audio/webm","image/png","image/jpg","image/jpeg","image/gif","video/ogg","video/mpeg","video/webm"],"createdDate":1563965318,"endpointConfiguration":{"ipv6":false,"types":["EDGE"]},"id":"0ievnv2eq1","name":"auth-custom","tags":{},"version":"1.0"}\n'
2019-07-24 11:18:38,889 botocore.hooks [DEBUG] Event needs-retry.api-gateway.PutRestApi: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672e387128>
2019-07-24 11:18:38,889 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:38,890 botocore.hooks [DEBUG] Event before-parameter-build.api-gateway.CreateDeployment: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:38,890 botocore.hooks [DEBUG] Event before-call.api-gateway.CreateDeployment: calling handler <function add_accept_header at 0x7f672fd8d378>
2019-07-24 11:18:38,890 botocore.hooks [DEBUG] Event before-call.api-gateway.CreateDeployment: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:38,891 botocore.endpoint [DEBUG] Making request for OperationModel(name=CreateDeployment) with params: {'url_path': '/restapis/0ievnv2eq1/deployments', 'query_string': {}, 'method': 'POST', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': 'application/json'}, 'body': b'{"stageName": "api"}', 'url': 'https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1/deployments', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672e35eda0>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:38,891 botocore.hooks [DEBUG] Event request-created.api-gateway.CreateDeployment: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672e35ed68>>
2019-07-24 11:18:38,891 botocore.hooks [DEBUG] Event choose-signer.api-gateway.CreateDeployment: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:38,892 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:38,892 botocore.auth [DEBUG] CanonicalRequest:
POST
/restapis/0ievnv2eq1/deployments

accept:application/json
host:apigateway.ap-south-1.amazonaws.com
x-amz-date:20190724T111838Z

accept;host;x-amz-date
70b00a6553fdee33351245eea62532ec087683006e54db68cfa1d27400e31f77
2019-07-24 11:18:38,892 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111838Z
20190724/ap-south-1/apigateway/aws4_request
80ad820dc60eadc108e362aa5610b3e0595c736c7e41b69a2b3f84aebef0ad1e
2019-07-24 11:18:38,893 botocore.auth [DEBUG] Signature:
d2979a72472c737a3c4e1226e3d07d8b07a5230c2b224bdd50e4ae1e8b7d3448
2019-07-24 11:18:38,893 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1/deployments, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': b'application/json', 'X-Amz-Date': b'20190724T111838Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/apigateway/aws4_request, SignedHeaders=accept;host;x-amz-date, Signature=d2979a72472c737a3c4e1226e3d07d8b07a5230c2b224bdd50e4ae1e8b7d3448', 'Content-Length': '20'}>
2019-07-24 11:18:38,894 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:39,271 urllib3.connectionpool [DEBUG] https://apigateway.ap-south-1.amazonaws.com:443 "POST /restapis/0ievnv2eq1/deployments HTTP/1.1" 201 41
2019-07-24 11:18:39,272 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:39 GMT', 'Content-Type': 'application/json', 'Content-Length': '41', 'Connection': 'keep-alive', 'x-amzn-RequestId': '2847b938-6aec-43fd-a55d-400a509e1c41', 'x-amz-apigw-id': 'dU62UKs_BcwEcRw='}
2019-07-24 11:18:39,272 botocore.parsers [DEBUG] Response body:
b'{"createdDate":1563967119,"id":"bluwnb"}\n'
2019-07-24 11:18:39,273 botocore.hooks [DEBUG] Event needs-retry.api-gateway.CreateDeployment: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672e387128>
2019-07-24 11:18:39,273 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:39,273 botocore.hooks [DEBUG] Event before-parameter-build.lambda.GetPolicy: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:39,274 botocore.hooks [DEBUG] Event before-call.lambda.GetPolicy: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:39,274 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetPolicy) with params: {'url_path': '/2015-03-31/functions/auth-custom-dev/policy', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'', 'url': 'https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/policy', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:39,274 botocore.hooks [DEBUG] Event request-created.lambda.GetPolicy: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:39,275 botocore.hooks [DEBUG] Event choose-signer.lambda.GetPolicy: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:39,275 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:39,275 botocore.auth [DEBUG] CanonicalRequest:
GET
/2015-03-31/functions/auth-custom-dev/policy

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111839Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:39,276 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111839Z
20190724/ap-south-1/lambda/aws4_request
551cd6e7e21d801f745493b7c5c7ccad0b6c8e03e4d5582252c953f6d4e2f8fc
2019-07-24 11:18:39,276 botocore.auth [DEBUG] Signature:
da1b326c9f1f4c824b86b8611b8c0a8319e4ecbc9682c828b03a382f7ec37c8d
2019-07-24 11:18:39,276 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/policy, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111839Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=da1b326c9f1f4c824b86b8611b8c0a8319e4ecbc9682c828b03a382f7ec37c8d'}>
2019-07-24 11:18:39,277 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:39,347 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "GET /2015-03-31/functions/auth-custom-dev/policy HTTP/1.1" 200 484
2019-07-24 11:18:39,348 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:39 GMT', 'Content-Type': 'application/json', 'Content-Length': '484', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'fa0129e4-bfc6-42a8-bfc8-251d1ff98e9c'}
2019-07-24 11:18:39,348 botocore.parsers [DEBUG] Response body:
b'{"Policy":"{\\"Version\\":\\"2012-10-17\\",\\"Id\\":\\"default\\",\\"Statement\\":[{\\"Sid\\":\\"fb3bb4e1-2168-432a-932a-522516667b00\\",\\"Effect\\":\\"Allow\\",\\"Principal\\":{\\"Service\\":\\"apigateway.amazonaws.com\\"},\\"Action\\":\\"lambda:InvokeFunction\\",\\"Resource\\":\\"arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev\\",\\"Condition\\":{\\"ArnLike\\":{\\"AWS:SourceArn\\":\\"arn:aws:execute-api:ap-south-1:304823025679:0ievnv2eq1/*\\"}}}]}","RevisionId":"b2641aac-5f29-4c30-97a7-2881c4a9e8fa"}'
2019-07-24 11:18:39,348 botocore.hooks [DEBUG] Event needs-retry.lambda.GetPolicy: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:39,348 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:39,349 botocore.hooks [DEBUG] Event before-parameter-build.api-gateway.UpdateRestApi: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:39,349 botocore.hooks [DEBUG] Event before-call.api-gateway.UpdateRestApi: calling handler <function add_accept_header at 0x7f672fd8d378>
2019-07-24 11:18:39,350 botocore.hooks [DEBUG] Event before-call.api-gateway.UpdateRestApi: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:39,350 botocore.endpoint [DEBUG] Making request for OperationModel(name=UpdateRestApi) with params: {'url_path': '/restapis/0ievnv2eq1', 'query_string': {}, 'method': 'PATCH', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': 'application/json'}, 'body': b'{"patchOperations": [{"op": "replace", "path": "/minimumCompressionSize", "value": ""}]}', 'url': 'https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672e35eda0>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:39,350 botocore.hooks [DEBUG] Event request-created.api-gateway.UpdateRestApi: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672e35ed68>>
2019-07-24 11:18:39,350 botocore.hooks [DEBUG] Event choose-signer.api-gateway.UpdateRestApi: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:39,351 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:39,351 botocore.auth [DEBUG] CanonicalRequest:
PATCH
/restapis/0ievnv2eq1

accept:application/json
host:apigateway.ap-south-1.amazonaws.com
x-amz-date:20190724T111839Z

accept;host;x-amz-date
89b2c3fb226e16c9f730435b64130b3a32511d6a92c36deb6d0a646d9cb5783d
2019-07-24 11:18:39,351 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111839Z
20190724/ap-south-1/apigateway/aws4_request
e74c1ae8fcbf7e9a4bccfd50f3d1d545682acd12f549cd96d3d7b81bd26faecc
2019-07-24 11:18:39,351 botocore.auth [DEBUG] Signature:
6dfcca75e9f33b9e87fad2e5b0deb7ba7eedc75d7a6e9a9d675a4ce1c9b62841
2019-07-24 11:18:39,351 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=PATCH, url=https://apigateway.ap-south-1.amazonaws.com/restapis/0ievnv2eq1, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'Accept': b'application/json', 'X-Amz-Date': b'20190724T111839Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/apigateway/aws4_request, SignedHeaders=accept;host;x-amz-date, Signature=6dfcca75e9f33b9e87fad2e5b0deb7ba7eedc75d7a6e9a9d675a4ce1c9b62841', 'Content-Length': '88'}>
2019-07-24 11:18:39,352 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:39,480 urllib3.connectionpool [DEBUG] https://apigateway.ap-south-1.amazonaws.com:443 "PATCH /restapis/0ievnv2eq1 HTTP/1.1" 200 421
2019-07-24 11:18:39,481 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:39 GMT', 'Content-Type': 'application/json', 'Content-Length': '421', 'Connection': 'keep-alive', 'x-amzn-RequestId': '48a551fe-0f70-49c5-b4c4-bbfeb45dea5e', 'x-amz-apigw-id': 'dU62ZKODhcwEchw='}
2019-07-24 11:18:39,481 botocore.parsers [DEBUG] Response body:
b'{"apiKeySource":"HEADER","binaryMediaTypes":["application/octet-stream","application/x-tar","application/zip","audio/basic","audio/ogg","audio/mp4","audio/mpeg","audio/wav","audio/webm","image/png","image/jpg","image/jpeg","image/gif","video/ogg","video/mpeg","video/webm"],"createdDate":1563965318,"endpointConfiguration":{"ipv6":false,"types":["EDGE"]},"id":"0ievnv2eq1","name":"auth-custom","tags":{},"version":"1.0"}\n'
2019-07-24 11:18:39,482 botocore.hooks [DEBUG] Event needs-retry.api-gateway.UpdateRestApi: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672e387128>
2019-07-24 11:18:39,482 botocore.retryhandler [DEBUG] No retry needed.
2019-07-24 11:18:39,482 botocore.hooks [DEBUG] Event before-parameter-build.lambda.GetPolicy: calling handler <function generate_idempotent_uuid at 0x7f672fd8c158>
2019-07-24 11:18:39,483 botocore.hooks [DEBUG] Event before-call.lambda.GetPolicy: calling handler <function inject_api_version_header_if_needed at 0x7f672fd8da60>
2019-07-24 11:18:39,483 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetPolicy) with params: {'url_path': '/2015-03-31/functions/auth-custom-dev/policy', 'query_string': {}, 'method': 'GET', 'headers': {'User-Agent': 'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183'}, 'body': b'', 'url': 'https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/policy', 'context': {'client_region': 'ap-south-1', 'client_config': <botocore.config.Config object at 0x7f672ec21828>, 'has_streaming_input': False, 'auth_type': None}}
2019-07-24 11:18:39,483 botocore.hooks [DEBUG] Event request-created.lambda.GetPolicy: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f672ec217f0>>
2019-07-24 11:18:39,484 botocore.hooks [DEBUG] Event choose-signer.lambda.GetPolicy: calling handler <function set_operation_specific_signer at 0x7f672fd8c048>
2019-07-24 11:18:39,484 botocore.auth [DEBUG] Calculating signature using v4 auth.
2019-07-24 11:18:39,484 botocore.auth [DEBUG] CanonicalRequest:
GET
/2015-03-31/functions/auth-custom-dev/policy

host:lambda.ap-south-1.amazonaws.com
x-amz-date:20190724T111839Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-07-24 11:18:39,485 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20190724T111839Z
20190724/ap-south-1/lambda/aws4_request
551cd6e7e21d801f745493b7c5c7ccad0b6c8e03e4d5582252c953f6d4e2f8fc
2019-07-24 11:18:39,485 botocore.auth [DEBUG] Signature:
da1b326c9f1f4c824b86b8611b8c0a8319e4ecbc9682c828b03a382f7ec37c8d
2019-07-24 11:18:39,485 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://lambda.ap-south-1.amazonaws.com/2015-03-31/functions/auth-custom-dev/policy, headers={'User-Agent': b'aws-chalice/1.9.0 Python/3.6.8 Linux/4.15.0-1044-aws exec-env/AWS_Lambda aws-chalice/1.9.0 Botocore/1.12.183', 'X-Amz-Date': b'20190724T111839Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUN6G6IAHWPNARBGS/20190724/ap-south-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=da1b326c9f1f4c824b86b8611b8c0a8319e4ecbc9682c828b03a382f7ec37c8d'}>
2019-07-24 11:18:39,486 urllib3.util.retry [DEBUG] Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None)
2019-07-24 11:18:39,556 urllib3.connectionpool [DEBUG] https://lambda.ap-south-1.amazonaws.com:443 "GET /2015-03-31/functions/auth-custom-dev/policy HTTP/1.1" 200 484
2019-07-24 11:18:39,557 botocore.parsers [DEBUG] Response headers: {'Date': 'Wed, 24 Jul 2019 11:18:39 GMT', 'Content-Type': 'application/json', 'Content-Length': '484', 'Connection': 'keep-alive', 'x-amzn-RequestId': '34b8b5c9-c8e6-4e6b-b375-94fa4f91e6ee'}
2019-07-24 11:18:39,557 botocore.parsers [DEBUG] Response body:
b'{"Policy":"{\\"Version\\":\\"2012-10-17\\",\\"Id\\":\\"default\\",\\"Statement\\":[{\\"Sid\\":\\"fb3bb4e1-2168-432a-932a-522516667b00\\",\\"Effect\\":\\"Allow\\",\\"Principal\\":{\\"Service\\":\\"apigateway.amazonaws.com\\"},\\"Action\\":\\"lambda:InvokeFunction\\",\\"Resource\\":\\"arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev\\",\\"Condition\\":{\\"ArnLike\\":{\\"AWS:SourceArn\\":\\"arn:aws:execute-api:ap-south-1:304823025679:0ievnv2eq1/*\\"}}}]}","RevisionId":"b2641aac-5f29-4c30-97a7-2881c4a9e8fa"}'
2019-07-24 11:18:39,557 botocore.hooks [DEBUG] Event needs-retry.lambda.GetPolicy: calling handler <botocore.retryhandler.RetryHandler object at 0x7f672ec21be0>
2019-07-24 11:18:39,557 botocore.retryhandler [DEBUG] No retry needed.
Resources deployed:
  - Lambda ARN: arn:aws:lambda:ap-south-1:304823025679:function:auth-custom-dev
  - Rest API URL: https://0ievnv2eq1.execute-api.ap-south-1.amazonaws.com/api/
root@ip-172-31-23-193:/home/auth-custom#