2015-12-01 15:03:31 +01:00
|
|
|
---
|
|
|
|
layout: "aws"
|
|
|
|
page_title: "AWS: aws_lambda_alias"
|
2016-03-06 15:51:25 +01:00
|
|
|
sidebar_current: "docs-aws-resource-lambda-alias"
|
2015-12-01 15:03:31 +01:00
|
|
|
description: |-
|
|
|
|
Creates a Lambda function alias.
|
|
|
|
---
|
|
|
|
|
|
|
|
# aws\_lambda\_alias
|
|
|
|
|
|
|
|
Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.
|
|
|
|
|
|
|
|
For information about Lambda and how to use it, see [What is AWS Lambda?][1]
|
|
|
|
For information about function aliases, see [CreateAlias][2] in the API docs.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "aws_lambda_alias" "test_alias" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "testalias"
|
|
|
|
description = "a sample description"
|
|
|
|
function_name = "${aws_lambda_function.lambda_function_test.arn}"
|
|
|
|
function_version = "$LATEST"
|
2015-12-01 15:03:31 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
* `name` - (Required) Name for the alias you are creating. Pattern: `(?!^[0-9]+$)([a-zA-Z0-9-_]+)`
|
|
|
|
* `description` - (Optional) Description of the alias.
|
|
|
|
* `function_name` - (Required) The function ARN of the Lambda function for which you want to create an alias.
|
|
|
|
* `function_version` - (Required) Lambda function version for which you are creating the alias. Pattern: `(\$LATEST|[0-9]+)`.
|
|
|
|
|
2016-10-16 14:43:44 +02:00
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
* `arn` - The Amazon Resource Name (ARN) identifying your Lambda function alias.
|
|
|
|
|
2015-12-01 15:03:31 +01:00
|
|
|
[1]: http://docs.aws.amazon.com/lambda/latest/dg/welcome.html
|
|
|
|
[2]: http://docs.aws.amazon.com/lambda/latest/dg/API_CreateAlias.html
|