Step 1: Prepare
In this section, you do the following:
Sign up for an AWS account and set up the AWS CLI.
Create two buckets (
bucket) with a sample .jpg object (
HappyFace.jpg) in the source bucket. For instructions, see the following procedure.
Step 1.1: Sign Up for AWS and Set Up the AWS CLI
Make sure you have completed the following steps:
Signed up for an AWS account and created an administrator user in the account (called adminuser).
Installed and set up the AWS CLI.
For instructions, see Step 1: Set Up an AWS Account and the AWS CLI.
Step 1.2: Create Buckets and Upload a Sample Object
Follow the steps to create buckets and upload an object.
Both the source bucket and your Lambda function must be in the same AWS region.
In addition, the example code used for the Lambda function also assumes that both of the
buckets are in the same region. In this tutorial, we use the
Using the IAM User Sign-In URL, sign in to the Amazon S3 console as adminuser.
Create two buckets. The target bucket name must be
sourceis the name of the bucket you want to use for the source. For example,
For instructions, see Create a Bucket in the Amazon Simple Storage Service Getting Started Guide.
In the source bucket, upload a .jpg object,
When you invoke the Lambda function manually before you connect to Amazon S3, you pass sample event data to the function that specifies the source bucket and
HappyFace.jpgas the newly created object so you need to create this sample object first.