create_web_function_revision
¶
create_web_function_revision(
function_name: FunctionName,
build_config: BuildConfig,
service_config: ServiceConfig,
*,
config_overrides: Optional[LambdaWebClientConfig] = None,
description: Optional[Description] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
) -> CreateWebFunctionRevisionResponse
Creates an immutable revision for a web function. A revision represents a specific version of the function code and configuration.
To use this operation, you must have the CreateWebFunctionRevision permission on the web function, not on the revision being created.
Parameters:
-
function_name(FunctionName) –The web function.
You can specify either of the following:
-
The function name, for example
my-function. -
The function ARN.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
-
description(Optional[Description], default:None) –A description of the revision.
-
kms_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) key used to encrypt the revision's code and environment variables.
-
build_config(BuildConfig) –The build configuration for the revision, including code location and runtime settings.
-
service_config(ServiceConfig) –The service configuration for the revision, including execution role, timeout, and concurrency settings.
Raises:
-
AccessDeniedException–You don't have permission to perform this operation. Check the IAM policies for your identity and any resource-based policy on the web function.
-
ConflictException–The request conflicts with the current state of the resource. For example, the resource is being modified by another request, you tried to delete a revision that is serving traffic on an endpoint, or the policy revision ID that you specified doesn't match the current policy. Resolve the conflict and try again.
-
InternalServerException–The request failed because of an internal error in the service. Retry the request. If the error persists, open a support case.
-
ResourceNotFoundException–The specified web function, revision, endpoint, or resource-based policy doesn't exist. Verify the resource identifier and try again.
-
ServiceQuotaExceededException–The request would exceed a service quota, such as the maximum number of web functions in your account or the maximum number of revisions or endpoints per web function. Request a quota increase or reduce usage and try again.
-
ThrottlingException–The request was denied because it exceeded the request rate that Lambda allows for your account. Reduce the frequency of requests and retry with exponential backoff.
-
ValidationException–The request failed validation because a parameter was missing, malformed, or outside the allowed range. Check the request parameters and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lambda_web/_services/lambda_web.py
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | |