---
title: "POST /api/v1/auth/aws-auth/login"
method: POST
path: "/api/v1/auth/aws-auth/login"
tags: ["AWS Auth"]
---

# POST /api/v1/auth/aws-auth/login

`POST /api/v1/auth/aws-auth/login`

Login with AWS Auth for machine identity

## Request body

- object
  - `identityId` string, required — The ID of the machine identity to login.
  - `iamHttpRequestMethod` string — The HTTP request method used in the signed request.
  - `iamRequestBody` string, required — The base64-encoded body of the signed request. Most likely, the base64-encoding of Action=GetCallerIdentity&Version=2011-06-15.
  - `iamRequestHeaders` string, required — The base64-encoded headers of the sts:GetCallerIdentity signed request.
  - `organizationSlug` string — When set, this will scope the login session to the specified organization the machine identity has access to. If omitted, the session defaults to the organization where the machine identity was created in.

## Response `200`

Default Response

- object
  - `accessToken` string, required
  - `expiresIn` number, required
  - `accessTokenMaxTTL` number, required
  - `tokenType` 'Bearer', required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
