---
title: "POST /2021-10-31/functions/{FunctionName}/url"
method: POST
path: "/2021-10-31/functions/{FunctionName}/url"
---

# POST /2021-10-31/functions/{FunctionName}/url

`POST /2021-10-31/functions/{FunctionName}/url`

Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.

## Path parameters

- `FunctionName` string, required

## Query parameters

- `Qualifier` string

## Request body

- object
  - `AuthType` 'NONE' | 'AWS_IAM', required — The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html">Security and auth model for Lambda function URLs</a>.
  - `Cors` object — The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">cross-origin resource sharing (CORS)</a> settings for your Lambda function URL. Use CORS to grant access to your function URL from any origin. You can also use CORS to control access for specific HTTP headers and methods in requests to your function URL.
    - `AllowCredentials` boolean — Whether to allow cookies or other credentials in requests to your function URL. The default is <code>false</code>.
    - `AllowHeaders` Header[] — The HTTP headers that origins can include in requests to your function URL. For example: <code>Date</code>, <code>Keep-Alive</code>, <code>X-Custom-Header</code>.
    - `AllowMethods` Method[] — The HTTP methods that are allowed when calling your function URL. For example: <code>GET</code>, <code>POST</code>, <code>DELETE</code>, or the wildcard character (<code>*</code>).
    - `AllowOrigins` Origin[] — <p>The origins that can access your function URL. You can list any number of specific origins, separated by a comma. For example: <code>https://www.example.com</code>, <code>http://localhost:60905</code>.</p> <p>Alternatively, you can grant access to all origins using the wildcard character (<code>*</code>).</p>
    - `ExposeHeaders` Header[] — The HTTP headers in your function response that you want to expose to origins that call your function URL. For example: <code>Date</code>, <code>Keep-Alive</code>, <code>X-Custom-Header</code>.
    - `MaxAge` integer — The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to <code>0</code>, which means that the browser doesn't cache results.
  - `InvokeMode` 'BUFFERED' | 'RESPONSE_STREAM' — <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 20 MB, however, you can <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">request a quota increase</a>.</p> </li> </ul>

## Response `201`

Success

- CreateFunctionUrlConfigResponse
  - `FunctionUrl` string, required — The HTTP URL endpoint for your function.
  - `FunctionArn` string, required — The Amazon Resource Name (ARN) of your function.
  - `AuthType` 'NONE' | 'AWS_IAM', required — The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html">Security and auth model for Lambda function URLs</a>.
  - `Cors` object — The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">cross-origin resource sharing (CORS)</a> settings for your function URL.
    - `AllowCredentials` boolean — Whether to allow cookies or other credentials in requests to your function URL. The default is <code>false</code>.
    - `AllowHeaders` Header[] — The HTTP headers that origins can include in requests to your function URL. For example: <code>Date</code>, <code>Keep-Alive</code>, <code>X-Custom-Header</code>.
    - `AllowMethods` Method[] — The HTTP methods that are allowed when calling your function URL. For example: <code>GET</code>, <code>POST</code>, <code>DELETE</code>, or the wildcard character (<code>*</code>).
    - `AllowOrigins` Origin[] — <p>The origins that can access your function URL. You can list any number of specific origins, separated by a comma. For example: <code>https://www.example.com</code>, <code>http://localhost:60905</code>.</p> <p>Alternatively, you can grant access to all origins using the wildcard character (<code>*</code>).</p>
    - `ExposeHeaders` Header[] — The HTTP headers in your function response that you want to expose to origins that call your function URL. For example: <code>Date</code>, <code>Keep-Alive</code>, <code>X-Custom-Header</code>.
    - `MaxAge` integer — The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to <code>0</code>, which means that the browser doesn't cache results.
  - `CreationTime` string, required — When the function URL was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).
  - `InvokeMode` 'BUFFERED' | 'RESPONSE_STREAM' — <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 20 MB, however, you can <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">request a quota increase</a>.</p> </li> </ul>

## Other responses

- `480` — ResourceConflictException
- `481` — ResourceNotFoundException
- `482` — InvalidParameterValueException
- `483` — ServiceException
- `484` — TooManyRequestsException

---

[API](https://skmtc.net/aws/apis/lambda.md) · [All operations](https://skmtc.net/aws/apis/lambda/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lambda/versions/2d9fde023ce9/schema)
