This question has been already answered here https://serverfault.com/questions/1035465/why-would-aws-fargate-task-containers-report-wildly-incorrect-memory-limits
Fargate set a CommitLimit
to the one desidered to you. It is visible directly from cat /proc/meminfo