bulky-author-98775
02/27/2023, 8:11 AMmetaflow configure aws, copying and pasting all the values i see in the outputs to what was asked in the terminal.
Still, I'm having this issue. Any help would be greatly appreciated 🙂:
honson@Aisan:~/metaflow$ python3 flow.py run
Metaflow 2.8.0 executing HelloFlow for user:honson
Validating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
Metaflow service error:
Metadata request (/flows/HelloFlow) failed (code 403): {"message":"Forbidden"}
Note: I believe the resolution was this thread was a VPN issue. I'm doing this for more of a personal learning experience, so there shouldn't be any networking or work perm related stuff causing these errors I believe.average-beach-28850
02/27/2023, 7:08 PMcurl command from that thread? that should help debugaverage-beach-28850
02/27/2023, 7:08 PMbulky-author-98775
02/28/2023, 2:22 AMcurl command:
https://outerbounds-community.slack.com/archives/C02116BBNTU/p1632414121331100?thread_ts=1632408385.327700&cid=C02116BBNTU
This was what was returned to me, with the URL and api key redacted:
honson@Aisan:~/metaflow$ curl -v -H 'x-api-key: <REDACTED>' <METAFLOW_SERVICE_URL>/flows/HelloWorld
* Trying 52.85.61.86:443...
* Connected to <METAFLOW_SERVICE_URL> (52.85.61.86) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.<http://execute-api.us-east-1.amazonaws.com|execute-api.us-east-1.amazonaws.com>
* start date: Jan 25 00:00:00 2023 GMT
* expire date: Feb 23 23:59:59 2024 GMT
* subjectAltName: host "<METAFLOW_SERVICE_URL>" matched cert's "*.<http://execute-api.us-east-1.amazonaws.com|execute-api.us-east-1.amazonaws.com>"
* issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* Using Stream ID: 1 (easy handle 0x560f6bea7e80)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET /api/flows/HelloWorld HTTP/2
> Host: <METAFLOW_SERVICE_URL>
> user-agent: curl/7.81.0
> accept: */*
> x-api-key: <REDACTED>
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 403
< content-type: application/json
< content-length: 23
< date: Tue, 28 Feb 2023 02:19:11 GMT
< x-amzn-requestid: 6221948e-c7f9-4448-a55d-971d655336e8
< x-amzn-errortype: ForbiddenException
< x-amz-apigw-id: <READCTED>
< x-cache: Error from cloudfront
< via: 1.1 <http://3f65d34f6010e326e59d2f311de6e202.cloudfront.net|3f65d34f6010e326e59d2f311de6e202.cloudfront.net> (CloudFront)
< x-amz-cf-pop: EWR53-P1
< x-amz-cf-id: jaM4v91IhjHdM1rXVdr8f0_DFVGu_oauyp61nQ_E3siw1YitQl2NCg==
<
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection #0 to host <METAFLOW_SERVICE_URL> left intactaverage-beach-28850
02/28/2023, 2:27 AMaverage-beach-28850
02/28/2023, 2:27 AMbulky-author-98775
02/28/2023, 2:29 AMI think you forgot to redact one instance of api key there.redacted, thanks
bulky-author-98775
02/28/2023, 2:30 AMBut it looks like its not the actual api key, its api key ID (if it looks like 10 random characters)Strange, but when I go to
outputs in the CloudFormation dashboard, the only value I get from ApiKeyId is 10 random chacters. I punched this in and it led to the stack trace above.average-beach-28850
02/28/2023, 2:31 AMaverage-beach-28850
02/28/2023, 2:31 AMbulky-author-98775
02/28/2023, 2:31 AMaverage-beach-28850
02/28/2023, 2:32 AMaverage-beach-28850
02/28/2023, 2:32 AMaverage-beach-28850
02/28/2023, 2:33 AMbulky-author-98775
02/28/2023, 2:33 AMbulky-author-98775
02/28/2023, 2:34 AMaverage-beach-28850
02/28/2023, 2:34 AMaverage-beach-28850
02/28/2023, 2:36 AMbulky-author-98775
02/28/2023, 2:36 AMaverage-beach-28850
02/28/2023, 2:37 AMbulky-author-98775
02/28/2023, 2:37 AMoutputs on CloudFormation right?
i.e., [METAFLOW_BATCH_JOB_QUEUE] ,[METAFLOW_ECS_S3_ACCESS_IAM_ROLE]average-beach-28850
02/28/2023, 2:37 AMbulky-author-98775
02/28/2023, 2:38 AMyes those are metaflow config variable namesGotcha, I was confused because every other config was following this schema, but this API key had this nuance to it.
average-beach-28850
02/28/2023, 2:39 AMbulky-author-98775
02/28/2023, 2:40 AMResource Groups & Tag Editor, I don't seem to have the same layout as you to access my API key. I was able to access it via the CLI command, but I was trying to find the "AWS Console" equivalent. Any ideas? I left the CloudFormation yaml the same, without any chances. Perhaps this API was automatically generated for me?average-beach-28850
02/28/2023, 2:42 AMbulky-author-98775
02/28/2023, 2:43 AM