Developer Center / Code Examples ...
Find code examples for the AWS SDKs
Explore and run code examples to manage your AWS resources
actions
Code excerpts that show you how to call individual service functions.
scenarios
Code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
cross-service
Sample applications that work across multiple AWS services.
Filter
Filter
Filter
Filter
Total results: 71
- category
-
Serverless
UpdatedComputeInvoke a Lambda function from an Amazon SNS trigger
Amazon SNS | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving messages from an SNS topic. The function retrieves the messages from the event parameter and logs the content of each message.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedAnalyticsReporting batch item failures for Lambda functions with a Kinesis trigger
Kinesis | Lambda
Learn how to implement partial batch response for Lambda functions that receive events from a Kinesis stream. The function reports the batch item failures in the response, signaling to Lambda to retry those messages later.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedDatabasesReporting batch item failures for Lambda functions with a DynamoDB trigger
DynamoDB | Lambda
Learn how to implement partial batch response for Lambda functions that receive events from a DynamoDB stream. The function reports the batch item failures in the response, signaling to Lambda to retry those messages later.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedInvoke a Lambda function from an Amazon MSK trigger
Amazon MSK | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving records from an Amazon MSK cluster. The function retrieves the MSK payload and logs the record contents.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedComputeConnecting to an Amazon RDS database in a Lambda function
Amazon RDS | Lambda
Learn how to implement a Lambda function that connects to an RDS database. The function makes a simple database request and returns the result.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedComputeInvoke a Lambda function from an Amazon S3 trigger
Amazon S3 | Lambda
Learn how to implement a Lambda function that receives an event triggered by uploading an object to an S3 bucket. The function retrieves the S3 bucket name and object key from the event parameter and calls the Amazon S3 API to retrieve and log the content type of the object.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedComputeInvoke a Lambda function from an Amazon SQS trigger
Amazon SQS | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving messages from an SQS queue. The function retrieves the messages from the event parameter and logs the content of each message.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedAnalyticsInvoke a Lambda function from a Kinesis trigger
Kinesis | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving records from a Kinesis stream. The function retrieves the Kinesis payload, decodes from Base64, and logs the record contents.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedDatabasesInvoke a Lambda function from a DynamoDB trigger
DynamoDB | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving records from a DynamoDB stream. The function retrieves the DynamoDB payload and logs the record contents.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedComputeReporting batch item failures for Lambda functions with an Amazon SQS trigger
Amazon SQS | Lambda
Learn how to implement partial batch response for Lambda functions that receive events from an SQS queue. The function reports the batch item failures in the response, signaling to Lambda to retry those messages later.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Serverless
UpdatedInvoke a Lambda function from a Amazon DocumentDB trigger
Amazon DocumentDB | Lambda
Learn how to implement a Lambda function that receives an event triggered by receiving records from a DocumentDB change stream. The function retrieves the DocumentDB payload and logs the record contents.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Scenario
UpdatedStorageUpload or download large files
Amazon S3
Learn how to upload or download large files to and from Amazon S3.
.NET (v3) | Go (v2) | Java (v2) | JavaScript (v3) | Python (v3) | Rust
-
Scenario
UpdatedStorageGet an object from a bucket if it has been modified
Amazon S3
Learn how to read data from an object in an S3 bucket, but only if that bucket has not been modified since the last retrieval time.
-
Scenario
UpdatedDatabasesConnect to a local instance
DynamoDB
Learn how to override an endpoint URL to connect to a local development deployment of DynamoDB and an AWS SDK.
-
Scenario
UpdatedMachine Learning & AIConvert text to speech and back to text
Amazon Polly | Amazon S3 | Amazon Transcribe
- Use Amazon Polly to synthesize a plain text (UTF-8) input file to an audio file.
- Upload the audio file to an Amazon S3 bucket.
- Use Amazon Transcribe to convert the audio file to text.
- Display the text.
-
Scenario
UpdatedStorageCreate a presigned URL
Amazon S3
Learn how to create a presigned URL for Amazon S3 and upload an object.
.NET (v3) | C++ | Go (v2) | Java (v2) | JavaScript (v3) | Kotlin | PHP (v3) | Python (v3) | Ruby (v3) | Rust