Launch templates, instance profiles and access
From requirements to a launch plan
A launch template stores reusable instance settings, for example image ID, instance type, storage and security group configuration. It has versions; choosing a reviewed version makes changes easier to track. A template is not itself a running machine. Before launching, review the effective configuration and any overrides, because a template can omit settings or be combined with other launch parameters. Our offline goal is one small Linux report worker with no public IP and no inbound administrative rules.
Network access and identity are separate
An instance is connected to a subnet in a virtual network (VPC). A subnet is an address range within the network. A security group filters traffic to and from an associated network interface; it does not grant AWS API permissions. Public reachability also depends on routing and addressing. Use a private design and permit only necessary traffic. An instance profile associates an IAM role with EC2 so software can obtain temporary credentials instead of storing long-lived keys. The role permissions should match the workload; neither a profile nor a private IP automatically guarantees security.
Administrative connection and boot
Systems Manager Session Manager is one option for administration without inbound SSH. It needs a supported operating system, a working SSM Agent, managed-node permissions, authorized session users and connectivity to required service endpoints. Private endpoints or another approved outbound path may have charges. SSH is an alternative through controlled private access with host verification and safe key handling. User data supplies startup instructions; on typical Linux cloud-init configurations scripts run on initial boot by default, often with elevated privileges. Review scripts before use, never embed secrets, and check boot logs before assuming setup succeeded.
Worked plan: one private worker
This is a non-deployable worksheet, not an AWS API payload. The example commercial region is illustrative; actual offering and account eligibility are unverified. Record one worker, a compatible approved Linux AMI, a reviewed template version, an encrypted EBS root volume, no public IP, no inbound management ports, a narrowly scoped workload role, authorized Session Manager access, and required outbound endpoint connectivity. Require IMDSv2 and review the root volume deletion setting before any optional deployment. Leave user data empty until a reviewed boot script is required. Record owner, expiry and cleanup obligations.
Troubleshooting and practice
If a private worker is not visible in Session Manager, check the agent, permissions, region and endpoint connectivity. Do not open SSH to the Internet or grant administrator permissions as a shortcut. If the worker needs read access to a report prefix, identify the narrow IAM permission separately from networking. Practice: explain why a perfectly configured security group cannot repair a missing IAM grant. Network delivery and authorization are different decisions.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Launch templates, instance profiles and access — knowledge check
Apply EC2 concepts in fictional offline scenarios.
Why choose a reviewed launch template version?
A worker has network connectivity but lacks S3 permission. What is the appropriate correction?
A private instance is not visible to Session Manager. What should be checked first?
What is a suitable user-data practice?
Which plan meets the stated private-worker design?