AWS Builder Center

The AWS Prerequisite Map

Nobody tells you that Lambda has two completely different permission models depending on who invokes it. Here's the dependency map I wish I'd had — and the six hidden prerequisites that break people.

Last month I wrote that AWS learning content has a sequencing problem: thousands of workshops organized by topic and level, none of which tell you what to learn first. A few people agreed. Nobody could use it, because I described a map without publishing one.
So here it is. This is the actual file, cleaned up. Nine chains, plus the cross-chain dependencies that are the real reason people get stuck.
Read it as: A → B means do A before B, or B will not make sense.



The nine chains

1. Identity — everything else sits on top of this
Users, groups, roles
→ Identity-based policies (the JSON, Allow/Deny/Action/Resource)
→ Resource-based policies (bucket policies, Lambda permissions)
→ Trust policies + sts:AssumeRole
→ Cross-account role assumption
→ Permission boundaries, SCPs

2. Networking
VPC + CIDR blocks
→ Subnets (and what actually makes one "public")
→ Route tables
→ Internet Gateway → NAT Gateway
→ Security groups vs NACLs (stateful vs stateless)
→ VPC endpoints (gateway vs interface)
→ Peering → Transit Gateway → PrivateLink

3. Compute
EC2: AMIs, instance types, key pairs
→ EBS volumes and snapshots
→ User data + instance profiles
→ Launch templates → Auto Scaling groups
→ ALB / NLB → target groups → health checks

4. Serverless
Lambda: handler, runtime, event object, context
→ Execution role
→ Invocation permissions (different thing — see below)
→ Sync vs async vs poll-based invocation
→ API Gateway integration
→ Lambda inside a VPC
→ Step Functions → Step Functions cross-account

5. Storage and events
S3: buckets, keys, prefixes (there are no folders)
→ Bucket policies + Block Public Access
→ S3 event notifications
→ SNS / SQS / EventBridge — and when each one is right
→ Event-driven pipelines
→ DLQs, retries, idempotency

6. Containers
Docker fundamentals (not AWS, but non-negotiable)
→ ECR: repos, auth tokens, lifecycle policies
→ ECS task definitions
→ Fargate + awsvpc networking mode
→ ECS services behind an ALB
→ EKS

7. Data
RDS: engines, instance classes
→ DB subnet groups → parameter groups
→ Multi-AZ vs read replicas (these are not the same feature)
→ DynamoDB: partition + sort keys
→ LSI vs GSI
→ Streams → single-table design

8. Observability
CloudWatch Logs: groups, streams, retention
→ Metrics + dimensions → alarms
→ Logs Insights
→ X-Ray traces
→ CloudTrail (audit, not monitoring — different job)

9. Infrastructure as code
CloudFormation: template anatomy, parameters, outputs
→ Change sets and drift
→ Nested stacks / cross-stack references
→ SAM or CDK or Terraform




The part that actually costs you a weekend

The chains above are the easy half. Almost everyone eventually stumbles onto the right order within a single service. What breaks people is when a step in one chain silently requires a step from another chain.
These are the six that cost me the most time.

1. Push invocations and pull invocations use opposite permission models

This is the single biggest source of confused Lambda debugging, and I have never seen it stated plainly in a tutorial.
When something pushes to your Lambda — API Gateway, S3, EventBridge, SNS — the caller needs permission to invoke you. That lives in a resource-based policy on the Lambda function ( AWS::Lambda::Permission ). Your execution role is irrelevant here.
When your Lambda pulls from a source — SQS, Kinesis, DynamoDB Streams — Lambda itself does the polling. So the permission lives in the execution role ( sqs:ReceiveMessage ,  sqs:DeleteMessage ,  sqs:GetQueueAttributes ). There is no resource policy involved.
Same service, same-looking wiring in the console, opposite direction of trust. And the console hides it: click "Add trigger" and it writes the resource policy for you silently. Then you move to CloudFormation, the policy isn't there, and you get a 500 from API Gateway with nothing in your Lambda logs — because your function was never invoked at all.
Prerequisite: Chain 1 through resource-based policies, before Chain 4 past "hello world".

2. A Lambda in a VPC has no internet

Put a function in a VPC and it loses public internet access. Not "sometimes." Always. It has no public IP and nothing will assign one.
The instinctive fix — move it to a public subnet — does nothing, because "public subnet" means a route to an Internet Gateway, and an IGW only routes traffic for resources that already have public IPs. Your options are a NAT Gateway in a private subnet, or VPC endpoints for the specific AWS services you're calling.
That means: before you can put a Lambda in a VPC, you need route tables, the IGW/NAT distinction, and gateway vs interface endpoints. Three steps deep into a chain most serverless tutorials never mention.
Prerequisite: Chain 2 through VPC endpoints, before "Lambda in a VPC."

3. Cross-account access needs a grant on both sides

One  Allow  is never enough across an account boundary. The resource's policy has to permit your principal, and your principal's identity policy has to permit the action. Either one missing is a deny.
People spend hours widening the bucket policy when the actual problem is that their own role never had  s3:GetObject  in the first place. The error message doesn't distinguish.
Prerequisite: Chain 1 complete, before any cross-account anything.

4. Fargate tasks in a private subnet can't pull their own image

An  awsvpc -mode task gets its own ENI in your subnet. Fine. But pulling from ECR is a network call to a public endpoint. In a private subnet with no NAT, the task fails at pull time — before your container ever runs, so there is nothing in your application logs to look at.
Working around it without a NAT Gateway takes four endpoints:  ecr.api ,  ecr.dkr , the S3 gateway endpoint (ECR layers live in S3), and  logs  if you want CloudWatch output.
Prerequisite: Chain 2 through interface endpoints, before Chain 6 past ECR.

5. LSIs can only be created with the table

Global secondary indexes can be added to a DynamoDB table whenever you like. Local secondary indexes cannot — they exist only if you declared them at creation time. Get your access patterns wrong and the fix is a new table and a migration.
Prerequisite: know your query patterns before Chain 7's index step. Which means Chain 7 is the one chain where you genuinely cannot learn by iterating.

6. Security groups forgive you, NACLs don't

Security groups are stateful: allow inbound 443, and the response gets out automatically. NACLs are stateless: you must also allow the outbound ephemeral port range (1024–65535), or the response is silently dropped.
Connections that hang rather than refuse are almost always this.



How to use this

Find the thing you're stuck on. Walk backwards up its chain until you hit something you can explain without looking it up. Start there.
That's it. That's the whole method, and it turned a folder of bookmarks into a path for me.



Where I'm probably wrong

I built this from my own order of getting confused, which is not the same thing as a correct dependency graph. Some of it is definitely off.
Two I'm actively unsure about:
  • Does IaC belong at the end? I put CloudFormation in Chain 9 because I learned it last. But every hidden prerequisite above became visible the moment I moved to IaC — the console had been papering over them. There's a real argument it belongs at position three.
  • Is Docker really a hard prerequisite for ECS? Or can you get useful work done from a task definition and a prebuilt image, and backfill the Docker knowledge later?
If you've hit a dependency that isn't here — especially a cross-chain one — put it in the comments and I'll fold it in and credit you. The version of this map that's actually useful is the one that has everyone's scars in it, not just mine.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article