Terraform
Provision the S3 bucket, file system, mount targets, IAM roles, and security groups — plus the compute resource — in a single terraform apply using the terraform-aws-s3-files modules. These pages complement the CLI walkthroughs for EC2 and Lambda, and add ECS Fargate and ECS on EC2 examples that are Terraform-only.
EC2 Launch an Amazon Linux 2023 instance, install amazon-efs-utils, and mount the file system at /mnt/s3files. Access via SSM Session Manager — no SSH key pair required.
ECS Fargate Register an ECS task definition with native s3files_volume_configuration and run it on an existing Fargate cluster. Verify the mount via CloudWatch Logs.
ECS on EC2 Create a new ECS cluster and one ECS-optimized container instance, then run an EC2 launch type task with a native s3files_volume_configuration.
Lambda Deploy a VPC-attached Lambda function that mounts the file system via an access point. Invoke the function and verify the /mnt/s3files listing in the response.