deploy a local lambda image to AWS Lambda
Arguments
- tag
The tag of an existing local image tagged with ECR repo (see `build_lambda`)
- policy_arns
character vector of IAM policy ARNs to attach to the Lambda execution role, besides `AWSLambdaBasicExecutionRole`. Use it to let the function call other AWS services, for example `"arn:aws:iam::aws:policy/AmazonS3FullAccess"`. Inside the function, `paws` clients then pick up the role's temporary credentials automatically.
- role_arn
ARN of an existing IAM role for the function to run as. When given, no role is created, and `policy_arns` can't be used. The role must trust `lambda.amazonaws.com`.
- ...
Arguments passed onto `paws::lambda()$create_function()`, for example `Timeout`, `MemorySize` or `Environment`. `Architectures` is set from the image's architecture.
Examples
if (FALSE) { # \dontrun{
runtime_function <- "parity"
runtime_path <- system.file("parity.R", package = "r2lambda")
dependencies <- NULL
build_lambda(
tag = "myrepo52",
runtime_function = runtime_function,
runtime_path = runtime_path,
dependencies = dependencies
)
deploy_lambda(tag = "myrepo52")
invoke_lambda(
function_name = "myrepo52",
payload = list(number = 3),
invocation_type = "RequestResponse"
)
} # }