paws.compute (version 0.1.0)

lambda_update_function_code: Updates a Lambda function's code

Description

Updates a Lambda function's code.

Usage

lambda_update_function_code(FunctionName, ZipFile, S3Bucket, S3Key,
  S3ObjectVersion, Publish, DryRun, RevisionId)

Arguments

FunctionName

[required] The name of the Lambda function.

Name formats

  • Function name - my-function.

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.

  • Partial ARN - 123456789012:function:my-function.

The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

ZipFile

The base64-encoded contents of the deployment package. AWS SDK and AWS CLI clients handle the encoding for you.

S3Bucket

An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.

S3Key

The Amazon S3 key of the deployment package.

S3ObjectVersion

For versioned objects, the version of the deployment package object to use.

Publish

Set to true to publish a new version of the function after updating the code. This has the same effect as calling PublishVersion separately.

DryRun

Set to true to validate the request parameters and access permissions without modifying the function code.

RevisionId

Only update the function if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.

Request syntax

svc$update_function_code(
  FunctionName = "string",
  ZipFile = raw,
  S3Bucket = "string",
  S3Key = "string",
  S3ObjectVersion = "string",
  Publish = TRUE|FALSE,
  DryRun = TRUE|FALSE,
  RevisionId = "string"
)

Details

The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.

Examples

Run this code
# NOT RUN {
# This operation updates a Lambda function's code
# }
# NOT RUN {
svc$update_function_code(
  FunctionName = "myFunction",
  Publish = TRUE,
  S3Bucket = "myBucket",
  S3Key = "myKey",
  S3ObjectVersion = "1",
  ZipFile = "fileb://file-path/file.zip"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab