|
| 1 | +/* |
| 2 | + * Copyright 2017-2020 original authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +package com.amazonaws.services.lambda.runtime.api.client; |
| 17 | + |
| 18 | +/** |
| 19 | + * Lambda runtimes set several environment variables during initialization. |
| 20 | + * Most of the environment variables provide information about the function or runtime. |
| 21 | + * The keys for these environment variables are reserved and cannot be set in your function configuration. |
| 22 | + * @see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime">Using AWS Lambda Environment Variables</a> |
| 23 | + * |
| 24 | + * NOTICE: This class is forked from io.micronaut.function.aws.runtime.ReservedRuntimeEnvironments found at https://github.com/micronaut-projects/micronaut-aws |
| 25 | + * |
| 26 | + */ |
| 27 | +public interface ReservedRuntimeEnvironmentVariables { |
| 28 | + |
| 29 | + /** |
| 30 | + * The handler location configured on the function. |
| 31 | + */ |
| 32 | + String HANDLER = "_HANDLER"; |
| 33 | + |
| 34 | + /** |
| 35 | + * The AWS Region where the Lambda function is executed. |
| 36 | + */ |
| 37 | + String AWS_REGION = "AWS_REGION"; |
| 38 | + |
| 39 | + /** |
| 40 | + * The runtime identifier, prefixed by AWS_Lambda_—for example, AWS_Lambda_java8. |
| 41 | + */ |
| 42 | + String AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; |
| 43 | + |
| 44 | + /** |
| 45 | + * The name of the function. |
| 46 | + */ |
| 47 | + String AWS_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; |
| 48 | + |
| 49 | + /** |
| 50 | + * The amount of memory available to the function in MB. |
| 51 | + */ |
| 52 | + String AWS_LAMBDA_FUNCTION_MEMORY_SIZE = "AWS_LAMBDA_FUNCTION_MEMORY_SIZE"; |
| 53 | + |
| 54 | + /** |
| 55 | + * The version of the function being executed. |
| 56 | + */ |
| 57 | + String AWS_LAMBDA_FUNCTION_VERSION = "AWS_LAMBDA_FUNCTION_VERSION"; |
| 58 | + |
| 59 | + /** |
| 60 | + * The name of the Amazon CloudWatch Logs group for the function. |
| 61 | + */ |
| 62 | + String AWS_LAMBDA_LOG_GROUP_NAME = "AWS_LAMBDA_LOG_GROUP_NAME"; |
| 63 | + |
| 64 | + /** |
| 65 | + * The name of the Amazon CloudWatch stream for the function. |
| 66 | + */ |
| 67 | + String AWS_LAMBDA_LOG_STREAM_NAME = "AWS_LAMBDA_LOG_STREAM_NAME"; |
| 68 | + |
| 69 | + /** |
| 70 | + * Access key id obtained from the function's execution role. |
| 71 | + */ |
| 72 | + String AWS_ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID"; |
| 73 | + |
| 74 | + /** |
| 75 | + * secret access key obtained from the function's execution role. |
| 76 | + */ |
| 77 | + String AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"; |
| 78 | + |
| 79 | + /** |
| 80 | + * |
| 81 | + * The access keys obtained from the function's execution role. |
| 82 | + */ |
| 83 | + String AWS_SESSION_TOKEN = "AWS_SESSION_TOKEN"; |
| 84 | + |
| 85 | + /** |
| 86 | + * (Custom runtime) The host and port of the runtime API. |
| 87 | + */ |
| 88 | + String AWS_LAMBDA_RUNTIME_API = "AWS_LAMBDA_RUNTIME_API"; |
| 89 | + |
| 90 | + /** |
| 91 | + * The path to your Lambda function code. |
| 92 | + */ |
| 93 | + String LAMBDA_TASK_ROOT = "LAMBDA_TASK_ROOT"; |
| 94 | + |
| 95 | + /** |
| 96 | + * The path to runtime libraries. |
| 97 | + */ |
| 98 | + String LAMBDA_RUNTIME_DIR = "LAMBDA_RUNTIME_DIR"; |
| 99 | + |
| 100 | + /** |
| 101 | + * The environment's time zone (UTC). The execution environment uses NTP to synchronize the system clock. |
| 102 | + */ |
| 103 | + String TZ = "TZ"; |
| 104 | +} |
0 commit comments