

# Infrastructure security in AWS Amplify

**Welcome to the new AWS Amplify**  
Amplify now puts hosting, a Postgres database, and sign-in in one AWS account. Deploy from your terminal or from Git, check every change in a preview first, and roll back in one step if something breaks.  
Looking for Amplify Hosting? See the [Amplify Hosting User Guide](https://docs.aws.amazon.com/amplify/hosting/userguide/welcome.html).

As a managed service, AWS Amplify is protected by the AWS global network security procedures that are described in the [Amazon Web Services: Overview of Security Processes](https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Whitepaper.pdf) whitepaper.

You use AWS published API calls to access AWS Amplify through the network. Clients must support Transport Layer Security (TLS) 1.0 or later. We recommend TLS 1.2 or later. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes.

Additionally, requests must be signed using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the [AWS Security Token Service](https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html) (AWS STS) to generate temporary security credentials to sign requests.

## Network isolation for Amplify backends
<a name="infrastructure-security-backend"></a>

Amplify backend endpoints are **internet-reachable by design and cannot currently be confined to a VPC.** Specifically:
+ A backend’s data API is a public HTTPS endpoint, protected by the credentials described under [The backend data-plane credentials](security_iam_backend.md#security_iam_backend_credentials), not by network reachability.
+ Amplify’s control-plane API is a public AWS API endpoint, authenticated with Signature Version 4.
+  AWS PrivateLink (VPC endpoints) is **not** available for Amplify backends today. You cannot restrict backend API access to a specific VPC or subnet through an endpoint policy.

Because network reachability is not the control, protect your backend by protecting its credentials and by writing restrictive row-level security policies. See [Backend security best practices](security_iam_backend.md#security_iam_backend_best_practices).

The TLS 1.0 minimum earlier on this page doesn’t apply to backends. A backend’s data API accepts only HTTPS with TLS 1.2 or TLS 1.3, and the Amplify API that manages backends requires TLS 1.2 or later. Your backend’s PostgreSQL endpoint is reachable from the internet too, and it refuses any connection that doesn’t start TLS. For the client settings that also verify its certificate, see [Data protection in AWS Amplify](data-protection.md).

### Request limits on a backend’s data API
<a name="infrastructure-security-backend-limits"></a>

A backend’s data API applies two kinds of limit:

 **Request rate** – A backend’s data API limits the request rate of each branch and of your account, not of each caller. Every request to a branch counts toward its limit, whatever key or signature it carries, so a caller holding your publishable key can use up a branch’s budget for every user of it. A request over a limit gets HTTP 429 with a `Retry-After` header and a JSON body whose `code` is `THROTTLED`.

A branch’s limit grows with its database’s maximum capacity. For the limit values, see [Quotas](quotas-chapter.md).

 **Request body size** – A backend’s data API limits the size of a request body: 10 MiB on the data API (`/rest`) and 1 MiB on authentication (`/auth`) and every other path, and 1 MiB for a request signed with Signature Version 4. A larger request gets HTTP 413 with a JSON body whose `code` is `PAYLOAD_TOO_LARGE` and whose message names the limit. A request that declares its length (`Content-Length`), and any signed request, is refused before it reaches your database or your authentication server. A body sent without a declared length is cut off once it passes the limit. Split a larger insert into batches. A client still sending the body when the 413 arrives can see the connection close instead; most HTTP clients read the response. The local development stack applies the same limits, including the one on a signed request.

### Multi-tenancy and backend isolation
<a name="infrastructure-security-backend-isolation"></a>

Amplify is a multi-tenant service. Isolation between customers rests on several independent mechanisms:
+  **Compute** – Each branch of a backend runs in its **own dedicated virtual machine**, isolated at the hypervisor level. The backend’s runtime does not share a process, a container, or an operating system with another customer’s.
+  **Database** – Each branch of a backend has its own dedicated Amazon Aurora cluster, which holds only that branch’s database. No other branch, and no other customer, shares it.
+  **Rows** – Within a database, PostgreSQL row-level security mediates access, using the role that your credential maps to.
+  **Metadata** – Amplify partitions its metadata by AWS account, and an API caller can reach only the backends owned by the account that signed the request.