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.
Total results: 443
- category
-
Serverless
UpdatedComputeInvoke a Lambda function from an…
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…
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…
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 | 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…
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 | 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 | 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…
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 | 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…
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 | 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
UpdatedDatabasesCreate a web application to track DynamoDB data
Amazon SES | DynamoDB
Learn how to create a web application that tracks work items in an Amazon DynamoDB table and uses Amazon Simple Email Service (Amazon SES) (Amazon SES) to send reports.
.NET (v3) | Java (v2) | Kotlin | Python (v3)
-
Scenario
UpdatedGenerative AIInvoke multiple foundation models on…
Amazon Bedrock Runtime
Learn how to prepare and send a prompt to a variety of large-language models (LLMs) on Amazon Bedrock
-
Scenario
UpdatedApplication IntegrationCreate and publish to a FIFO topic
Amazon SNS | Amazon SQS
Learn how to create and publish to a FIFO Amazon SNS topic.