[Batch] [ECS] [request]: Allow ECS Anywhere clusters to be used with Batch
- 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**
What do you want us to build?
I'd like to be able to use ECS Anywhere clusters in unmanaged Batch compute environments
**Which service(s) is this request for?**
AWS Batch and ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Coupling the AWS Batch control plane with on-premises ECS Anywhere instances is a very intriguing model for hybrid cloud and dev/test batch processing workloads. It is currently possible to create an unmanaged compute environment linked to an ECS cluster with external instances, but there's no way to tell the Batch control plane to run tasks on the external instances. It can be seen from CloudTrail logs that Batch invokes the RunTask operation using the setting `"launchType": "EC2"`:
```jsonc
{
"eventName": "RunTask",
"sourceIPAddress": "batch.amazonaws.com",
"userAgent": "batch.amazonaws.com",
"requestParameters": {
"launchType": "EC2" // <-------
},
"responseElements": {
"tasks": [],
"failures": [
{
"arn": "arn:aws:ecs:us-east-1:123456789012:container-instance/3e0ef3abc8b54a5b94fff48ece354d60",
"reason": "AGENT"
}
]
},
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"eventCategory": "Management"
}
```
My understanding is that this needs to be `"launchType": "EXTERNAL"` in order for the task to run on ECS Anywhere instances. It would be desirable to be able to configure Batch compute environments to use the `EXTERNAL` launch type.
**Are you currently working around this issue?**
I do not currently have a workaround for this issue.
**Additional context**
N/A
**Attachments**
N/A
Contributor guide
Research direction
Start with the issue's CloudTrail RunTask example and the AWS Batch and ECS service context. Confirm how unmanaged compute environments select a launch type and whether EXTERNAL is supported for ECS Anywhere. Done means Batch can run tasks on ECS Anywhere instances through a configured unmanaged compute environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100