AWS
S3, Lambda, AppSync, Cognito, CDK and SST: AWS as managed services instead of a server of my own.
Cloud & DevOpsUsing since 2020 · Featured project: Hollywood Budgets / TPH Global (in the Code & Pepper team)
- Category
- Cloud & DevOps
- Using since
- 2020
- Featured project
- Hollywood Budgets / TPH Globalin the Code & Pepper team
In practice
I pick AWS when an app should use ready-made services instead of a server of its own: files in S3, functions in Lambda, sign-in in Cognito. The backend of Little Birdie runs on AWS, and SST describes the infrastructure of TPH Global. When one server is enough, I skip the cloud.
What is AWS?
AWS is the cloud of Amazon: managed services you rent instead of running servers of your own. Amazon S3 is object storage, with files in buckets. AWS Lambda runs code without you managing servers. Amazon Cognito keeps a directory of users and handles their sign-in, and AWS AppSync exposes a GraphQL API.
Infrastructure can be described in code. AWS CDK is an open-source framework where you define resources in TypeScript and CloudFormation deploys them. SST describes the whole app, buckets and queues included, in one sst.config.ts file. Terraform does not belong to one cloud.
How I work with AWS
I start from what the app has to do and who will run it, not from a list of services. I add a service only when it replaces something I would rather not write or operate myself.
Services matched to the job
Files go to S3, logic that reacts to events goes to Lambda, users go to Cognito. When a mobile app should ask for data through one endpoint, I consider AppSync, as in Little Birdie.
Infrastructure in the repository
I do not click resources together in the console. I describe them in code, so a change goes through review. On Little Birdie that is AWS CDK, on TPH Global it is SST.
Permissions and the account
Every function and user gets only the access it needs, and the AWS account is created by the project owner, not by me.
When it fits, and when it doesn't
AWS makes sense when a project should use ready-made services, not just a machine to run the app on.
A good fit when
- A mobile app with a backend and no servers of its own: API, functions and sign-in as services.
- User files that should live outside the app server, in S3 for example.
- A client project that already has an AWS account and people who know it.
Not a fit when
- A simple company site that is fine on ordinary hosting.
- A single app with a database on a VPS of your own, where Docker is enough.
- A project where nobody will watch permissions and the bill.
When a project already runs on Google Cloud, I do not move it to AWS just because I know AWS better.
AWS or Google Cloud?
Both clouds offer a similar set of services, so I compare them only where I have met them in projects. I leave prices out.
| Criterion | AWS | Google Cloud |
|---|---|---|
| Files | Amazon S3: objects in buckets | Cloud Storage: objects in buckets |
| Code without servers | Lambda: event and API functions | Cloud Run: HTTP and event functions |
| User sign-in | Cognito: directory and OAuth 2.0 tokens | Identity Platform: sign-in services and SDKs |
| Infrastructure as code | AWS CDK, deployed through CloudFormation | Infrastructure Manager, Terraform configurations |
| Terraform support | AWS provider in the Terraform registry | Google provider in the Terraform registry |
Choose AWS when
the project already runs on it or should use several services together, such as S3 and Lambda. You pay with time spent on permissions and the bill.
Choose Google Cloud when
the team or the client already uses it and the app should stay close to its services. Moving costs more than the difference between the clouds.
AWS is in the stack of Little Birdie and TPH Global, and GCP in Gaia Lens and CAS Marketplace.
Frequently asked questions
Not sure this is an AWS project?
Write what data and users the app has and who will look after it after launch. I will answer which services make sense here.