okigan / awscurl

curl-like access to AWS resources with AWS Signature Version 4 request signing.
MIT License
735 stars 91 forks source link

Request: Support for Container credentails #164

Closed misirlou-tg closed 1 year ago

misirlou-tg commented 1 year ago

ECS containers have different environment variables for their credentials. This is described in the following: Container credential provider

The link says that there is support for this in the AWS SDK for Python, I don't know how difficult this would be in implement in awscurl.

There is an easy way to see this in action, the CloudShell available in the AWS console has the environment variables described in the above link ($AWS_CONTAINER_AUTHORIZATION_TOKEN, $AWS_CONTAINER_CREDENTIALS_FULL_URI). Awscurl works in the CloudShell currently, I copy/paste my credential environment variables into it, but mine expire after 1hr, so using the container's credentials would help a lot.

Thanks for your work on this utility!

okigan commented 1 year ago

Try the latest release. Here is example when using Cloudshell.

misirlou-tg commented 1 year ago

Excellent, that fixed it! I updated to the 0.28 release and it is working in CloudShell with my credentials.