In a Multi-container Docker environment in Elasticbeanstalk, defining the memory is mandatory in the Dockerrun.aws.json and I would like to know what are the best practices to to deal with the hardcoded values of the memory.
Especially when we need to adjust the instance type we need to adjust the memory values as well.
Is there a way to specify a sort of percentage instead of exact numbers ?? Maybe a suggestion for @aws
This is a Dockerrun.aws template example:
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "container-1",
"image": "image-1.com/image-xxxxxx",
"memory": 512
},
{
"name": "container-2",
"image": "image-2.com/image-xxxxxx",
"memory": 256
},
{
"name": "container-3",
"image": "image-3.com/image-xxxxxx",
"memory": 256
}
]
}
I am not an AWS internal, but we used AWS Elastic Beanstalk as well as more advanced deployment strategies (e.g. custom CloudFormation templates) for our application. Here are a few notes from my personal experience as a DevOps engineer using these services:
[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html
[2] https://stackoverflow.com/a/44764770/10473469
[3] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html
[4] https://aws.amazon.com/de/blogs/containers/how-amazon-ecs-manages-cpu-and-memory-resources/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With