Sub topic 4
How responsibility shifts across infrastructure, container, and abstracted services
This chapter assumes you know the basic split between security of the cloud and security in the cloud. It also assumes you have used EC2, S3, and IAM and can read a short AWS CLI command. The split is not the same for every service. How much you secure depends on how much of the stack AWS runs for you. This chapter explains that gradient and how to use it when you pick a service.
Why one rule does not fit every service
"AWS secures the cloud, you secure what you put in it" is accurate but too coarse to act on. Consider two services:
- With EC2, you choose the operating system image, install packages, and decide when to patch. A missed patch is your finding.
- With S3, you never see an operating system. There is nothing to patch, so patching is not your duty.
AWS groups its services into three categories to describe this. The categories are infrastructure, container, and abstracted. They are a teaching model, not an official label on every service page. When a service does not fit cleanly, read its documentation and its security chapter instead of guessing.
The three categories
Infrastructure services
Infrastructure services give you virtualized building blocks: compute, storage, and networking. Amazon EC2, Amazon EBS, and Amazon VPC are the standard examples. You get a machine or a network and decide what runs on it.
AWS runs the facilities, hardware, global network, and virtualization layer. You are responsible for:
- The guest operating system, including patches and hardening
- Any software you install, including runtimes and agents
- Host-level and network-level controls such as security groups and host firewalls
- Identity and access for the instance and its users
- Your data and its encryption
This category gives you the most control and the longest list of duties.
Container services
Container services run on instances or platforms that AWS manages, and you do not administer the underlying operating system. Amazon RDS, Amazon EMR, and AWS Elastic Beanstalk are the usual examples. The name refers to a managed application container, not necessarily Docker.
AWS takes on the operating system, the platform software, and usually the database engine patching mechanism. You still own:
- Your data and the decision to encrypt it
- IAM permissions for who can create, modify, or connect to the resource
- Network exposure, such as which security groups reach the database and whether it is publicly accessible
- Service-level settings, such as parameter groups, backup retention, and maintenance windows
For RDS, AWS applies patches in the maintenance window, but you choose that window and whether minor version upgrades happen automatically. The control exists on the AWS side and the decision remains yours.
Abstracted services
Abstracted services hide the platform and operating system. You interact only through an API. Amazon S3, Amazon DynamoDB, Amazon SQS, and Amazon SES are typical examples. AWS operates the infrastructure, the platform, and the service software. You do not log in to anything.
Your duties shrink to the parts only you can decide:
- Which data you store
- Who can call the API, through IAM policies, bucket policies, and resource policies
- Whether data is encrypted, and with which keys
- Whether the resource is public, logged, versioned, or replicated
The duty list is shorter, but the mistakes that remain tend to be severe. A public bucket exposes data the same way a public database would.
The shift at a glance
The following diagram shows where the boundary moves as you go from infrastructure to abstracted services.
The same information in a table:
| Layer | Infrastructure (EC2) | Container (RDS) | Abstracted (S3) |
|---|---|---|---|
| Physical facilities and hardware | AWS | AWS | AWS |
| Virtualization layer | AWS | AWS | AWS |
| Operating system | Customer | AWS | AWS |
| Platform or engine software | Customer | AWS (customer sets upgrade policy) | AWS |
| Network access rules | Customer | Customer | Customer (bucket and resource policies) |
| Identity and access | Customer | Customer | Customer |
| Data and encryption choices | Customer | Customer | Customer |
The last three rows do not change. No service category moves data classification, identity, or access decisions to AWS.
The same service can sit in different categories
Where you land depends on how you deploy, not only on the service name. Containers show this clearly:
- Amazon ECS on EC2. You manage the container instances, including the operating system, agent updates, and scaling of the capacity. AWS manages the ECS control plane.
- Amazon ECS on AWS Fargate. AWS manages the compute capacity and the host operating system. You manage the task definition, container image contents, task IAM role, and network rules.
- Amazon EKS. AWS runs the Kubernetes control plane. With self-managed nodes you patch the worker nodes. With managed node groups, AWS helps with node updates, but you still start and schedule the update. With Fargate, AWS runs the node capacity. In every case you own the workload, the images, the Kubernetes RBAC, and the pod network policy.
AWS Lambda gives you a runtime and no operating system access, so it behaves like an abstracted service for host patching. You still own your function code, its dependencies, its execution role, and its environment variables. If a dependency in your deployment package has a known vulnerability, that is your finding.
Checking your side with the CLI
The category tells you which checks you need. The following commands show how the duty differs for an EC2 instance and an RDS instance. Replace the identifiers with your own.
# Infrastructure service: you own patching. Check the patch state of an instance
# managed by AWS Systems Manager Patch Manager.
aws ssm describe-instance-patch-states \
--instance-ids i-0123456789abcdef0 \
--query 'InstancePatchStates[0].[InstanceId,MissingCount,FailedCount]'
# Container service: AWS applies the patch, but you control the policy.
# Check whether automatic minor upgrades, the maintenance window, and
# storage encryption are set the way you intend.
aws rds describe-db-instances \
--db-instance-identifier amzn-demo-db \
--query 'DBInstances[0].[AutoMinorVersionUpgrade,PreferredMaintenanceWindow,StorageEncrypted,PubliclyAccessible]'The first command only returns data for instances managed by Systems Manager that have a patch baseline applied. An empty result can mean the instance is not enrolled, which is itself a gap on your side. The second command shows four settings that are customer decisions even though AWS carries out the maintenance.
Using the model to choose a service
Responsibility is one input to service selection, along with cost, features, and performance. Consider these trade-offs:
- More managed means fewer duties and less control. You cannot install a custom kernel module on RDS or an agent on S3. If your compliance regime requires host-level tooling, an infrastructure service may be the only fit.
- More managed means you rely on AWS evidence. For the layers you do not operate, you cannot inspect the system yourself. You rely on audit reports and certifications. A later chapter covers where to find them in AWS Artifact.
- Fewer duties means fewer controls to forget. Teams that run databases on EC2 often fall behind on patching. Moving to RDS removes that class of failure, though you still need to manage backups, parameters, and network exposure.
- Staffing matters. A small team may secure an abstracted service better than an infrastructure service because it has fewer layers to maintain.
Common errors in applying the categories
- Assuming "managed" means "secure by default." RDS can be created with public access and an overly permissive security group. AWS operates the database, but you configured its exposure.
- Treating abstracted services as having no duties. S3 and DynamoDB still need access policies, encryption settings, and logging.
- Forgetting that patching responsibility depends on the deployment mode. The same container workload has different host-patching duties on EC2 and on Fargate.
- Mixing up control-plane and data-plane duties. AWS secures the service's control plane. You are accountable for who can call it and what happens to your data through it.
Exercise
Your team runs a PostgreSQL database on EC2 and plans to move it to Amazon RDS for PostgreSQL. Name two duties that move to AWS and two duties that stay with you.
Show answer
Moving to AWS: operating system patching and the database engine host platform, including the underlying instance maintenance. Staying with you: controlling network access to the database through security groups and the public accessibility setting, and managing IAM permissions and data encryption choices. Other correct answers for staying with you include backup retention settings, parameter group choices, and the minor version upgrade policy.
Exercise
A container workload moves from ECS on EC2 to ECS on Fargate. Does the customer still need to scan the container image for vulnerabilities? Explain.
Show answer
Yes. Fargate removes the duty to manage and patch the host operating system and the capacity, but the image contents (base image, libraries, and application code) belong to the customer in both deployment modes. The task IAM role and network rules also remain the customer's responsibility.