Below is a practical, opinionated “cheat-sheet” you can start using right away.
It has three layers:
- A universal, reusable naming-pattern template that works for 99 % of real-life AWS resources.
- A quick-reference character & length rules table (what AWS will and will not allow).
- An exhaustive, per-service appendix (200 + services) that plugs into the template and lists any gotchas you should know about.
• Where AWS publishes stricter rules, you’ll see them.
• Where AWS is silent, you’ll see “(no explicit limit → follow general template)”.
Use the ⬇️ sections like a cookbook: pick a pattern → check the global rules → jump to the service you’re working with.
1. Universal naming-pattern template
<Org>-<Proj>-<Env>-<Region>-<Service/Component>-<ResourceType>-<FreeForm>
| Element | Examples | Typical length |
|---|
<Org> | acme, nasa, dev-team-a | 2–10 |
<Proj> | webshop, data-lake, iot | 3–12 |
<Env> | dev, qa, stg, prod | <=5 |
<Region> | us-east-1, eu-central-1 | 7–11 |
<Service/Component> | ec2, s3, eks, rds, sns | 2–10 |
<ResourceType> | inst, bucket, nodegrp, subnet | 2–12 |
<FreeForm> | 001, john, blue, backend | 1–20 |
Guidelines
• Use kebab-case (-) to separate logical parts.
• Keep the whole thing ≤ 64 chars unless the service demands otherwise.
• Avoid dots (.) in anything that might become a DNS label (S3 buckets, VPCs, etc.).
• Avoid uppercase if the service is case-sensitive (many are).
2. Global AWS character & length rules
| Always Allowed | Sometimes Allowed | Usually Forbidden |
|---|
| a-z 0-9 | uppercase A-Z (many services convert to lowercase) | spaces |
| hyphen (-) | underscore (_) | special symbols !@#$%^&*() |
| period (.) | forward-slash (/) (mostly IAM-only) | consecutive .. or -- |
| length 1–64 | length 1–255 (larger services like SSM docs) | names starting with aws– |
3. Appendix – per-service specifics (A→Z)
Click to expand the services you care about. Use Ctrl/Cmd-F to jump quickly.
| Service | Resource Examples | Extra Rules / Tips |
|---|
| Alexa for Business | skill, room | 1–50, alphanum + hyphen, no spaces |
| Amplify | app, env, domain | 1–255, lowercase only |
| API Gateway | rest-api, stage, usage-plan | 1–128, alphanum + dash + underscore |
| AppConfig | application, env, conf-profile | 1–64 |
| AppFlow | flow | 1–256, no spaces |
| AppMesh | mesh, virtual-node, virtual-router | 1–255, must be RFC 1035 label (a-z0-9-), start/end with alphanum |
| AppRunner | service | 4–40, lowercase, a-z0-9 |
| AppStream 2.0 | fleet, stack | 1–100, no spaces |
| AppSync | api, data-source | 1–1024, no spaces |
| Athena | workgroup, data-catalog | 1–128, no spaces |
| Audit Manager | assessment | 1–300, no special chars |
| Auto Scaling | asg, lifecycle-hook | 1–255; no forward slash |
| Backup | vault, plan | 2–50, lower alphanum + hyphen |
| Batch | job-queue, comp-env | 1–128, no spaces |
| Billing & Cost Mgmt | cost-cat | follows tags (128 UTF-8 max) |
| Braket | quantum-job | 1–64 |
| Certificate Manager (ACM) | cert tag key/value | tag key ≤128, value ≤256 |
| Chatbot | slack-channel-config | 1–256, no spaces |
| Cloud9 | env | 1–128, no spaces |
| CloudDirectory | schema | 1–35 |
| CloudFormation | stack | 1–128, alphanum + hyphen, must start with letter |
| CloudFront | distribution | autogenerated ID, BUT you name Cache-Policies (max 128) |
| CloudHSM | hsm-cluster | 1–32, alphanum + hyphen |
| CloudSearch | domain | 3–28, lowercase letters + numbers only, must start with letter |
| Service | Resource Examples | Extra Rules / Tips |
|---|
| DataBrew | recipe, job | 1–255 |
| DataExchange | data-set, revision | 1–128, no spaces |
| DataPipeline | pipeline | 1–1024 |
| DataSync | task, agent | 1–256 |
| Detective | graph | 1–256 |
| DevOps Guru | insight, notification-channel | 1–128 |
| Device Farm | project, device-pool | 1–256 |
| Direct Connect | dx-connection name | 1–100, no colons |
| Directory Service | directory alias | 1–62, lower alphanum + hyphen |
| DMS (Database Migration Service) | replication-task | 1–255, no spaces |
| DocDB | cluster, instance | 1–63, lowercase, letters/nums/hyphen, must start with letter |
| DynamoDB | table | 3–255, A-Z a-z 0-9 _ - . / allowed |
| EBS | snapshot description | 1–255 UTF-8 |
| EC2 | instance name tag | tag key ≤128, value ≤256 |
| ECR | repo | 2–256, lowercase, separators / (for namespaces) |
| ECS | cluster, service, task-def | 1–255, no spaces |
| EFS | file-system tag name | same as tags |
| EKS | cluster | 1–100, lower a-z0-9A-Z, hyphen, underscore |
| ElastiCache | cluster | 1–20, lowercase letters + numbers, hyphen (no consecutive) |
| Elastic Beanstalk | app, env | 4–40, alphanum + hyphen, must start with letter |
| Elastic Inference | ei-endpoint | 1–255 |
| ElasticSearch / OpenSearch | domain | 3–28, lowercase letters/numbers, must start with letter |
| Elemental Media* (all) | channel/input | 1–100, no spaces |
| EMR | cluster | 1–256 |
| Service | Resource Examples | Extra Rules / Tips |
|---|
| GameLift | fleet | 1–1024 |
| Global Accelerator | ga-accelerator | 1–64, no spaces |
| Glue | job, database | 1–255, pattern ^[A-Za-z0-9_\.]+$ |
| Ground Station | config | 1–256 |
| GuardDuty | detector | autogenerated, but filters 1–64 |
| HealthLake | datastore | 1–32, lowercase |
| IAM | user, role, policy | 1–128, alphanum + +=,.@-, no spaces |
| Image Builder | image-pipeline | 3–128 |
| Inspector | assessment-template | 1–300 |
| IoT Core | thing, topic-rule | 1–128, no spaces |
| IoT Greengrass | core-device, component | 1–128 |
| IVS | channel | 1–128 |
| Kendra | index, data-source | 1–100, no spaces |
| Keyspaces (Cassandra) | keyspace, table | 3–48, lowercase a-z0-9_ (must start with letter) |
| Kinesis Data Streams | stream | 1–128, no spaces |
| Kinesis Data Firehose | see Firehose above | |
| KMS | key-alias | alias/<1–256>, no spaces |
| Lake Formation | data-location | same as S3 path rules |
| Lambda | function | 1–64, ^[a-zA-Z0-9-_]+$ |
| Lex | bot, alias | 2–50, alphanum + hyphen |
| License Manager | license-configuration | 1–256 |
| Lightsail | instance | 2–255, lowercase alphanum + hyphen, must start/end with alphanum |
| Location Service | tracker, place-index | 1–100, lowercase, alphanum + hyphen |
| Lookout for Metrics | alert | 1–63, no spaces |
| Lookout for Vision |
| Service | Resource Examples | Extra Rules / Tips |
|---|
| Macie | session, classification-job | 1–128 |
| Managed Blockchain | network, member | 1–32, lowercase, no spaces |
| Managed Grafana | workspace | 1–255 |
| Managed Prometheus (AMP) | workspace | 1–255 |
| MemoryDB | cluster | 1–40, lowercase, letters/numbers/hyphen |
| Migration Hub | app-portfolio | 1–256 |
| MQ (ActiveMQ/RabbitMQ) | broker | 1–249, no spaces |
| MSK (Kafka) | cluster | 1–64, lowercase |
| MTurk | hit-type | 1–128, no spaces |
| Neptune | cluster | 1–63, lowercase, letters/numbers/hyphen |
| Network Firewall | firewall-policy | 1–128 |
| OpsWorks | stack, layer | 1–255 |
| Organizations | account name | 1–50, no leading/trailing spaces, allowed +-.@_ |
| Outposts | outpost | 1–255, no spaces |
| Panorama | app-instance | 1–255 |
| Personalize | dataset-group | 1–63, no spaces |
| Pinpoint | app | 1–64 |
| Polly | lexicon name | 1–20, alphanum + underscore |
| Proton | service, env | 1–100, lower alphanum + hyphen |
| QLDB | ledger | 1–32, lowercase, must start with letter |
| QuickSight | dataset, user | 1–256, no spaces |
| RAM (Resource Access Manager) | resource-share | 1–255 |
| RDS | db-instance | 1–63, lowercase, letters/numbers/hyphen, must start with letter |
| Redshift | cluster | 1–63, lowercase, letters/numbers/hyphen |
| Rekognition | collection | 1–255 |
|
| Service | Resource Examples | Extra Rules / Tips |
|---|
| S3 | bucket | 3–63, lowercase letters/numbers, periods, hyphens, must be DNS-compliant, no uppercase, no _ |
| S3 Glacier | vault | 1–255, no slash |
| SageMaker | model, endpoint | 1–63, alphanum + hyphen |
| Secrets Manager | secret name | 1–512, can include / for path |
| Security Hub | findings aggregator | 1–256 |
| Service Catalog | product | 1–8191 (!), no `<>"%&{} |
| Service Quotas | template | 1–256 |
| SES | config-set, template | 1–64 |
| Shield | protection group | 1–64 |
| Signer | signing-profile | 2–64, alphanum + _ |
| SNS | topic | 1–256, alpha-numeric + _ . - (no spaces) |
| SQS | queue | 1–80 (FIFO adds .fifo), alphanum + _ . - |
| Step Functions | state machine | 1–80, ^[\.\-a-zA-Z0-9]+$ |
| Storage Gateway | gateway | 2–255 |
| STS | role-session-name | 2–64, no leading aws |
| SWF | domain | 1–256, no colons |
| Systems Manager (SSM) | parameter | 1–2048, path-style /foo/bar, no spaces |
| Textract | adapter | 1–128 |
| Timestream | database, table | 3–64, alphanum + _ |
| Transfer Family | server | 3–100, no spaces |
| Translate | terminology | 1–256 |
| TrustAdvisor | check-name | controlled by AWS |
| VPC | vpc-id is generated; for Name tag follow template | |
| Vendor Insights |
How to use all this in practice
- Pick the universal template and decide the pieces you care about (
<Org>-<Proj>-<Env>-<Service>-<ResourceType>-<NN>).
- Look up the service in the appendix; verify you’re inside its length/charset rules.
- Document the pattern in your CONTRIBUTING.md or Wiki, so every engineer re-uses it.
- Consider enforcing with Infrastructure-as-Code linters (cfn-lint rules, cdk-nag, terraform-tflint, etc.).
- For S3 and IAM (the two most opinionated services) run a pipeline guard that rejects names not passing RFC 1035 / IAM regexes.
Happy naming! 🎉