Skip to content

Latest commit

 

History

History

AWS SDK for Ruby code examples for AWS Lambda

Purpose

This folder contains code examples that demonstrate how to use the AWS SDK for Ruby to automate AWS Lambda.

With AWS Lambda, you can run code without provisioning or managing servers.

Code examples

API examples

Important

  • As an AWS best practice, grant this code least privilege, or only the permissions required to perform a task. For more information, see Grant least privilege in the AWS Identity and Access Management User Guide.
  • This code has not been tested in all AWS Regions. Some AWS services are available only in specific AWS Regions. For more information, see the AWS Regional Services List on the AWS website.
  • Running this code might result in charges to your AWS account.

Running the code

Prerequisites

  • An AWS account. To create an account, see How do I create and activate a new AWS account on the AWS Premium Support website.
  • AWS credentials or an AWS Security Token Service (AWS STS) access token. For details, see Configuring the AWS SDK for Ruby in the AWS SDK for Ruby Developer Guide.
  • To run the code examples, Ruby version 1.9 or later. For Ruby download and installation instructions, see Download Ruby on the Ruby Progamming Language website.
  • To test the code examples, RSpec 3.9 or later. For RSpec download and installation instructions, see the rspec/rspec repository in GitHub.
  • The AWS SDK for Ruby. For AWS SDK for Ruby download and installation instructions, see Install the AWS SDK for Ruby in the AWS SDK for Ruby Developer Guide.

Most of these code example files can be run with very little to no modification. For example, to use Ruby to run the aws-ruby-sdk-lambda-example-configure-function-for-notification.rb file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example:

ruby aws-ruby-sdk-lambda-example-configure-function-for-notification.rb

Additional information


Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0