Skip to content

Instantly share code, notes, and snippets.

@michele-comitini
Created April 20, 2021 12:25
Show Gist options
  • Save michele-comitini/fecc94e6fc87f071106aae79b66f0aa0 to your computer and use it in GitHub Desktop.
Save michele-comitini/fecc94e6fc87f071106aae79b66f0aa0 to your computer and use it in GitHub Desktop.
2021-04-20 14:23:12,501 botocore.hooks [DEBUG] Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
2021-04-20 14:23:12,503 botocore.hooks [DEBUG] Changing event name from before-call.apigateway to before-call.api-gateway
2021-04-20 14:23:12,504 botocore.hooks [DEBUG] Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2021-04-20 14:23:12,506 botocore.hooks [DEBUG] Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2021-04-20 14:23:12,506 botocore.hooks [DEBUG] Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2021-04-20 14:23:12,507 botocore.hooks [DEBUG] Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2021-04-20 14:23:12,507 botocore.hooks [DEBUG] Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
2021-04-20 14:23:12,510 botocore.hooks [DEBUG] Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
2021-04-20 14:23:12,510 botocore.hooks [DEBUG] Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
2021-04-20 14:23:12,510 botocore.hooks [DEBUG] Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
2021-04-20 14:23:12,511 botocore.hooks [DEBUG] Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
2021-04-20 14:23:12,518 botocore.utils [DEBUG] IMDS ENDPOINT: http://169.254.169.254/
2021-04-20 14:23:12,520 botocore.credentials [DEBUG] Looking for credentials via: env
2021-04-20 14:23:12,520 botocore.credentials [DEBUG] Looking for credentials via: assume-role
2021-04-20 14:23:12,520 botocore.credentials [DEBUG] Looking for credentials via: assume-role-with-web-identity
2021-04-20 14:23:12,520 botocore.credentials [DEBUG] Looking for credentials via: sso
2021-04-20 14:23:12,520 botocore.credentials [DEBUG] Looking for credentials via: shared-credentials-file
2021-04-20 14:23:12,521 botocore.credentials [INFO] Found credentials in shared credentials file: ~/.aws/credentials
2021-04-20 14:23:12,522 botocore.loaders [DEBUG] Loading JSON file: /data1/venv/lib/python3.8/site-packages/botocore/data/endpoints.json
2021-04-20 14:23:12,527 botocore.hooks [DEBUG] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7fa0baeacc10>
2021-04-20 14:23:12,541 botocore.loaders [DEBUG] Loading JSON file: /data1/venv/lib/python3.8/site-packages/botocore/data/s3/2006-03-01/service-2.json
2021-04-20 14:23:12,550 botocore.hooks [DEBUG] Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x7fa0baf5ab80>
2021-04-20 14:23:12,550 botocore.hooks [DEBUG] Event creating-client-class.s3: calling handler <function lazy_call.<locals>._handler at 0x7fa0bae46dc0>
2021-04-20 14:23:12,577 botocore.hooks [DEBUG] Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x7fa0baf5a940>
2021-04-20 14:23:12,579 botocore.endpoint [DEBUG] Setting s3 timeout as (60, 60)
2021-04-20 14:23:12,580 botocore.loaders [DEBUG] Loading JSON file: /data1/venv/lib/python3.8/site-packages/botocore/data/_retry.json
2021-04-20 14:23:12,581 botocore.client [DEBUG] Registering retry handlers for service: s3
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <function validate_ascii_metadata at 0x7fa0baedbb80>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <function sse_md5 at 0x7fa0baed9f70>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <function convert_body_to_file_like_object at 0x7fa0baedf4c0>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <function validate_bucket_name at 0x7fa0baed9ee0>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <bound method S3RegionRedirector.redirect_from_cache of <botocore.utils.S3RegionRedirector object at 0x7fa0ba80dbe0>>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <bound method S3ArnParamHandler.handle_arn of <botocore.utils.S3ArnParamHandler object at 0x7fa0ba80dca0>>
2021-04-20 14:23:12,583 botocore.hooks [DEBUG] Event before-parameter-build.s3.PutObject: calling handler <function generate_idempotent_uuid at 0x7fa0baed9d30>
2021-04-20 14:23:12,585 botocore.hooks [DEBUG] Event choose-signer.s3.PutObject: calling handler <function set_operation_specific_signer at 0x7fa0baed9c10>
2021-04-20 14:23:12,585 botocore.hooks [DEBUG] Event before-sign.s3.PutObject: calling handler <bound method S3EndpointSetter.set_endpoint of <botocore.utils.S3EndpointSetter object at 0x7fa0ba80dd30>>
2021-04-20 14:23:12,585 botocore.utils [DEBUG] Defaulting to S3 virtual host style addressing with path style addressing fallback.
2021-04-20 14:23:12,585 botocore.utils [DEBUG] Checking for DNS compatible bucket for: https://s3.eu-south-1.amazonaws.com/<bucket.name>/gatto.jpg
2021-04-20 14:23:12,585 botocore.utils [DEBUG] Not changing URI, bucket is not DNS compatible: <bucket.name>
2021-04-20 14:23:12,586 botocore.auth [DEBUG] Calculating signature using v4 auth.
2021-04-20 14:23:12,586 botocore.auth [DEBUG] CanonicalRequest:
PUT
/<bucket.name>/gatto.jpg
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIxxxxxxxxxxxxxxxxx%2F20210420%2Feu-south-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T122312Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-type%3Bexpires%3Bhost%3Bx-amz-acl
content-type:image/jpeg
expires:Thu, 01 Jan 1970 00:05:00 GMT
host:s3.eu-south-1.amazonaws.com
x-amz-acl:public-read
content-type;expires;host;x-amz-acl
UNSIGNED-PAYLOAD
2021-04-20 14:23:12,586 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20210420T122312Z
20210420/eu-south-1/s3/aws4_request
a4aea39d07cc8d8c683284399f10a8da83423f3d1e05cbcb9c9c6d5d65e22c1a
2021-04-20 14:23:12,586 botocore.auth [DEBUG] Signature:
4c8f00400a55085d8fb6bae9d60a768cc07a1dd14ab16985f49cba4b5e59f8a2
2021-04-20 14:23:12,590 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): s3.eu-south-1.amazonaws.com:443
2021-04-20 14:23:15,872 urllib3.connectionpool [DEBUG] https://s3.eu-south-1.amazonaws.com:443 "PUT /<bucket.name>/gatto.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIxxxxxxxxxxxxxxxxx%2F20210420%2Feu-south-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T122312Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-type%3Bexpires%3Bhost%3Bx-amz-acl&X-Amz-Signature=4c8f00400a55085d8fb6bae9d60a768cc07a1dd14ab16985f49cba4b5e59f8a2 HTTP/1.1" 403 None
boto3 version: 1.17.54
botocore version: 1.20.54
https://s3.eu-south-1.amazonaws.com/<bucket.name>/gatto.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIxxxxxxxxxxxxxxxxx%2F20210420%2Feu-south-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T122312Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-type%3Bexpires%3Bhost%3Bx-amz-acl&X-Amz-Signature=4c8f00400a55085d8fb6bae9d60a768cc07a1dd14ab16985f49cba4b5e59f8a2
b'<?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIxxxxxxxxxxxxxxxxx</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256\n20210420T122312Z\n20210420/eu-south-1/s3/aws4_request\n50f3ca600370223dd1f1e3c05ab9b331a2878743d8871f3e00b4f09eb66b33b6</StringToSign><SignatureProvided>4c8f00400a55085d8fb6bae9d60a768cc07a1dd14ab16985f49cba4b5e59f8a2</SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 31 30 34 32 30 54 31 32 32 33 31 32 5a 0a 32 30 32 31 30 34 32 30 2f 65 75 2d 73 6f 75 74 68 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 35 30 66 33 63 61 36 30 30 33 37 30 32 32 33 64 64 31 66 31 65 33 63 30 35 61 62 39 62 33 33 31 61 32 38 37 38 37 34 33 64 38 38 37 31 66 33 65 30 30 62 34 66 30 39 65 62 36 36 62 33 33 62 36</StringToSignBytes><CanonicalRequest>PUT\n/<bucket.name>/gatto.jpg\nX-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIxxxxxxxxxxxxxxxxx%2F20210420%2Feu-south-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20210420T122312Z&amp;X-Amz-Expires=3600&amp;X-Amz-SignedHeaders=content-type%3Bexpires%3Bhost%3Bx-amz-acl\ncontent-type:image/jpeg\nexpires:\nhost:s3.eu-south-1.amazonaws.com\nx-amz-acl:\n\ncontent-type;expires;host;x-amz-acl\nUNSIGNED-PAYLOAD</CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 67 61 74 74 69 2e 6d 69 6c 61 6e 6f 2e 69 6d 61 67 65 73 2f 67 61 74 74 6f 2e 6a 70 67 0a 58 2d 41 6d 7a 2d 41 6c 67 6f 72 69 74 68 6d 3d 41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 26 58 2d 41 6d 7a 2d 43 72 65 64 65 6e 74 69 61 6c 3d 41 4b 49 41 59 34 51 32 56 33 4e 5a 36 4c 5a 4e 51 43 4f 4a 25 32 46 32 30 32 31 30 34 32 30 25 32 46 65 75 2d 73 6f 75 74 68 2d 31 25 32 46 73 33 25 32 46 61 77 73 34 5f 72 65 71 75 65 73 74 26 58 2d 41 6d 7a 2d 44 61 74 65 3d 32 30 32 31 30 34 32 30 54 31 32 32 33 31 32 5a 26 58 2d 41 6d 7a 2d 45 78 70 69 72 65 73 3d 33 36 30 30 26 58 2d 41 6d 7a 2d 53 69 67 6e 65 64 48 65 61 64 65 72 73 3d 63 6f 6e 74 65 6e 74 2d 74 79 70 65 25 33 42 65 78 70 69 72 65 73 25 33 42 68 6f 73 74 25 33 42 78 2d 61 6d 7a 2d 61 63 6c 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 69 6d 61 67 65 2f 6a 70 65 67 0a 65 78 70 69 72 65 73 3a 0a 68 6f 73 74 3a 73 33 2e 65 75 2d 73 6f 75 74 68 2d 31 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 0a 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3b 65 78 70 69 72 65 73 3b 68 6f 73 74 3b 78 2d 61 6d 7a 2d 61 63 6c 0a 55 4e 53 49 47 4e 45 44 2d 50 41 59 4c 4f 41 44</CanonicalRequestBytes><RequestId>G598Q1R7A16J219X</RequestId><HostId>Sucdx9NixR6SQ2BpRm7BJr9luhPt22QonNEmiAZA6lS5dkU12SSW0JBBQPOdSKaCvO2VF8PIbcg=</HostId></Error>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment