AWS Batch support - MIME Multipart Userdata format compatibility
Description
I'm trying to use the official ECS-optimized Bottlerocket AMI with AWS Batch but encountering compatibility issues that prevent instances from joining the ECS cluster.
Environment
- AMI:
bottlerocket-aws-ecs-2-aarch64-v1.49.0-713f44ce - Service: AWS Batch
- Architecture: aarch64
Problem
When using Bottlerocket AMI with AWS Batch the instances fail to join the ECS cluster, preventing tasks from running.
Root Cause
AWS Batch expects user data in MIME Multipart format, while Bottlerocket uses TOML configuration format. This incompatibility causes the Bottlerocket startup script to fail during initialization, preventing the instance from successfully joining the ECS cluster.
Expected Behavior
Bottlerocket instances should be able to process MIME Multipart user data format for enhanced configuration abilities
Proposed Solution
Add support for parsing and handling MIME Multipart user data format alongside the existing TOML configuration format, or provide a compatibility layer that can extract and process Bottlerocket-specific configuration from MIME Multipart user data.
Use Case
This would enable Bottlerocket to be used with AWS Batch for security and performance
Can you provide more details on your use case? Are you trying to use a single user-data document to provision either Amazon Linux or Bottlerocket?
Seems like there's a standard MIME type for TOML now, application/toml.
The idea is to use Bottlerocket as the default AMI for AWS Batch Workloads to enable faster scaling / start of the container.
Yes I tried to launch a AWS Batch task with a MIME for tomel user script without success. The init of the bottlerocket image failed when reading the MIME format of the userdata.