This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-27
Channels
- # announcements (2)
- # aws (17)
- # babashka (13)
- # beginners (84)
- # calva (46)
- # chlorine-clover (40)
- # cider (19)
- # clojure (27)
- # clojure-australia (1)
- # clojure-europe (84)
- # clojure-nl (2)
- # clojure-uk (49)
- # clojurescript (65)
- # core-async (6)
- # cryogen (1)
- # cursive (11)
- # datomic (13)
- # etaoin (3)
- # jackdaw (5)
- # jobs (2)
- # kaocha (34)
- # minimallist (6)
- # off-topic (17)
- # pathom (2)
- # pedestal (11)
- # re-frame (8)
- # reagent (5)
- # rewrite-clj (19)
- # shadow-cljs (30)
I have a task running on EC2 ECS and am using Cognitect's aws-api to make API calls. I am constructing a regular sts client (e.g., (aws/client {:api :sts})
) and issuing an :AssumeRole API call. That call is failing with an anomaly saying "No region found by any region provider." I have traced the call back to the cognitect.aws.ec2-metadata-utils
namespace. It is attempting to fetch the region from this endpoint "http://169.254.170.2/latest/dynamic/instance-identity/document". If I curl that endpoint from within my container, I get a 404. I can curl the credentials using curl
and get a successful response. Any idea why the former endpoint used for the region is returning a 404?
I can work around this by setting the AWS_REGION env var. Curious how default region identification is supposed to work in EC2 ECS though.
I see how to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html. Not seeing how to view the property from an already running instance though.
This seems relevant here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html#enable-metadata. Container metadata is disabled by default for ECS.