Hi all, I recently enabled API Gateway with basic...
# ask-metaflow
a
Hi all, I recently enabled API Gateway with basic auth in our infra and the flows seem to be stalling now. Not sure if it's the API Key that's causing the issue I tried checking if the metadata service is functional using
curl
and I get the following output:
1
Copy code
*   Trying 99.84.192.104:443...
* Connected to EXTERNAL_SERVICE (99.84.192.104) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.<http://execute-api.us-west-2.amazonaws.com|execute-api.us-west-2.amazonaws.com>
*  start date: Dec  4 00:00:00 2022 GMT
*  expire date: Jan  2 23:59:59 2024 GMT
*  subjectAltName: host "<http://zbpzaufk27.execute-api.us-west-2.amazonaws.com|zbpzaufk27.execute-api.us-west-2.amazonaws.com>" matched cert's "*.<http://execute-api.us-west-2.amazonaws.com|execute-api.us-west-2.amazonaws.com>"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* h2h3 [:method: GET]
* h2h3 [:path: /api/flows/]
* h2h3 [:scheme: https]
* h2h3 [:authority: EXTERNAL_SERVICE]
* h2h3 [user-agent: curl/7.86.0]
* h2h3 [accept: */*]
* h2h3 [x-api-key: MYKEY]
* Using Stream ID: 1 (easy handle 0x7f7ff400ce00)
> GET /api/flows/ HTTP/2
> Host: EXTERNAL_SERVICE
> user-agent: curl/7.86.0
> accept: */*
> x-api-key: MYKEY
> 
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200 
< content-type: text/plain; charset=utf-8
< content-length: 220
< date: Tue, 21 Feb 2023 23:49:37 GMT
< x-amzn-requestid: 5f931980-488e-4325-93c9-e08ce672dbd8
< x-amzn-remapped-content-length: 220
< x-amz-apigw-id: AtrGxHYaPHcFoyg=
< x-amzn-remapped-server: Python/3.7 aiohttp/3.8.1
< x-amzn-remapped-date: Tue, 21 Feb 2023 23:49:37 GMT
< metadata_service_version: 2.3.0
< x-cache: Miss from cloudfront
< via: 1.1 <http://bd41592b95ad3186fbc9028c3311be92.cloudfront.net|bd41592b95ad3186fbc9028c3311be92.cloudfront.net> (CloudFront)
< x-amz-cf-pop: LAX3-C3
< x-amz-cf-id: xwy6n_pIS3awLht9YH9Cag1myaP3v5NnzjnQFACyI4blY7vpHTnsDg==
< 
* Connection #0 to host EXTERNAL_SERVICE left intact
[{"flow_id": "HelloAWSFlow", "user_name": null, "ts_epoch": 1677006586503, "tags": null, "system_tags": null}, {"flow_id": "PlayListFlow", "user_name": null, "ts_epoch": 1677008723364, "tags": null, "system_tags": null}]%
a
when you say stalling, what is the exact behavior that you are observing?
a
When I run a flow, it does the linting, and that's it. It's almost like it's having a connection issue. I don't let it timeout, but it was already 10 minutes for a
HelloAWS
basic flow
Oh wait hold on - this could be a dumb dumb moment where I forgot to authenticate to AWS
a
Ah - we do an exponential backoff with s3 uploads with results in a rather long time before the flow exits. It is something on our todo list to fix.
a
Okay it's working now. It's just my aws session timing out and me needing to refresh the credentials because I was testing on my local machine. Sorry about this!!!
a
No worries - glad it was a quick resolution!