Description Usage Arguments Details Value References See Also Examples
View source: R/create_function.R
Create, update, and version AWS Lambda functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | create_function(
name,
func,
handler,
role,
runtime = c("nodejs12.x", "nodejs10.x", "java11", "java8", "python3.8", "python3.7",
"python3.6", "python2.7", "dotnetcore3.1", "dotnetcore2.1", "go1.x", "ruby2.7",
"ruby2.5", "provided"),
timeout = 3L,
description,
layers,
memory_size = 128L,
...
)
update_function_code(name, func, ...)
update_function_config(
name,
description,
handler,
role,
runtime = c("nodejs12.x", "nodejs10.x", "java11", "java8", "python3.8", "python3.7",
"python3.6", "python2.7", "dotnetcore3.1", "dotnetcore2.1", "go1.x", "ruby2.7",
"ruby2.5", "provided"),
timeout = 3L,
...
)
update_function(
name,
func,
description,
handler,
role,
runtime = c("nodejs12.x", "nodejs10.x", "java11", "java8", "python3.8", "python3.7",
"python3.6", "python2.7", "dotnetcore3.1", "dotnetcore2.1", "go1.x", "ruby2.7",
"ruby2.5", "provided"),
timeout = 3L,
...
)
publish_function_version(name, description, ...)
make_function_version(name, description, ...)
|
name |
A character string specifying the function name (either a full ARN or a max 64-character string). For functions other than |
func |
Either (1) a character string containing a url-style AWS S3
bucket and object key (e.g., |
handler |
A character string specifying the function within your code that Lambda calls to begin execution. |
role |
A character string containing an IAM role or an object of class “iam_role”. This is the role that is used when the function is invoked, so it must have permissions over any AWS resources needed by the function. |
runtime |
A character string specifying the runtime environment for the function. |
timeout |
An integer specifying the timeout for the function, in seconds. |
description |
Optionally, a max 256-character description of the function for your own use. |
layers |
A character vector of pre-built layers to be used by your function
when runtime is |
memory_size |
An integer specifying the amount of RAM that's allocated to the function. Unenforced minimum value of 128, maximum value of 3008 (will be enforced on the API side). |
... |
Additional arguments passed to |
create_function
creates a new function from a deployment
package. update_function_code
updates the code within a function.
update_function_config
updates the configuration settings of a
function. publish_function_version
records a function version (see
list_function_versions
; changes made between versioning are
not recorded.
A list of class “aws_lambda_function”.
API Reference: CreateFunction API Reference: UpdateFunctionCode API Reference: PublishVersion
invoke_function
, create_function_alias
,
list_functions
, delete_function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
# 'hello world!' example code
hello <- system.file("templates", "helloworld.js", package = "aws.lambda")
# get IAM role for Lambda execution
library("aws.iam")
id <- get_caller_identity()[["Account"]]
# Note: This role may not work. We recommend copying the ARN of a
# Lambda-capable role from the console once until we're able to more
# smoothly integrate with aws.iam.
role <- paste0("arn:aws:iam::", id, ":role/lambda_basic_execution")
lambda_func <- create_function("helloworld",
func = hello,
handler = "helloworld.handler",
role = role
)
# invoke function
invoke_function(lambda_func)
# delete function
delete_function(lambda_func)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.