aws / aws/containers-roadmap

[ECS] [request]: Session tags for task roles

Open
#2,426 0 comments 32 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
Make it possible to provide session tags to use when assuming the task IAM role.

**Which service(s) is this request for?**
- ECS/Fargate
- EKS?

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
We're trying to build a multi-tenant system that involves running ECS tasks on behalf of tenants. Those tasks should only have access to S3 data of their tenant. Creating an IAM role per tenant is not feasible as it quickly runs into IAM quotas, so we'd like to use ABAC to control S3 access. However, it is not currently possible in ECS, because we can't provide session tags for ECS to use when assuming the task role.

**Are you currently working around this issue?**
Our "scheduler" assumes the task role before running an ECS task and passes the resulting credentials through environment variables. As a result, we also struggle with 1 hour hard limit on duration of chained sessions.

It would be much easier if there was a way to specify session tags on task definitions and/or in `RunTask` request, or at least a way to forward session tags from the principal that runs the task.
Similarly, it would be nice if IRSA in EKS supported specifying session tags through service account and/or pod annotations, for all the same reasons.

Finally, I believe it would also be useful in Lambda, although IIUC it's the wrong place to raise feature requests for Lambda.

**Additional context**
Looks like [this is possible](https://docs.aws.amazon.com/sagemaker/latest/dg/model-access-training-data-abac.html) in Sagemaker.

Contributor guide

Open the contributing guide

Research direction

The request covers ECS/Fargate task definitions and RunTask requests, with related EKS IRSA annotations; start by reviewing those service entry points and the linked SageMaker ABAC example. Done would mean a supported way to provide or forward session tags when assuming task roles, with the intended ECS and EKS scope clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
authorization, cloud, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.