Skip to content

taskresource/volume: add nos3readcache S3 Files mount option - #5062

Open
rsu206 wants to merge 1 commit into
aws:devfrom
rsu206:nos3readcache
Open

taskresource/volume: add nos3readcache S3 Files mount option#5062
rsu206 wants to merge 1 commit into
aws:devfrom
rsu206:nos3readcache

Conversation

@rsu206

@rsu206 rsu206 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the nos3readcache mount option to S3 Files volume mounts. This option
prevents efs-utils from using application memory as an in-memory read cache,
so that customer requested task memory is not taken away by the cache.

This brings the EC2 agent's S3 Files mount behavior in line with ECS/Fargate.

Implementation details

  • agent/taskresource/volume/dockervolume_s3files.go:
    GetVolumePluginDriverOptions now appends nos3readcache to the mount
    options (o) passed to the ECS volume plugin, after the existing
    tls/tlsport/iam/awscredsuri/accesspoint options. The plugin's
    ECSVolumeDriver passes the option string through to the mount command
    unchanged, so no ecs-init changes are required.

Testing

  • go build ./... in the agent module
  • go test -tags unit ./taskresource/volume/... ./api/task/... — all pass
  • gofmt clean

New tests cover the changes: yes
(TestGetVolumePluginDriverOptions_Basic now asserts nos3readcache is
present in the driver options.)

Description for the changelog

Enhancement - Add nos3readcache mount option to S3 Files volumes

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No.

Does this PR include the addition of new environment variables in the README?

No.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Append the nos3readcache option when building S3 Files volume mount
options so efs-utils does not use application memory as an in-memory
read cache, keeping customer requested task memory available to the
task. This matches the S3 Files mount behavior of the Fargate agent.
@rsu206
rsu206 requested a review from a team as a code owner July 25, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants