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: 49
- 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
UpdatedDatabasesQuery a table by using batches of PartiQL statements
DynamoDB
- Get a batch of items by running multiple SELECT statements.
- Add a batch of items by running multiple INSERT statements.
- Update a batch of items by running multiple UPDATE statements.
- Delete a batch of items by running multiple DELETE statements.
.NET (v3) | C++ | Go (v2) | Java (v2) | JavaScript (v3) | Kotlin | PHP (v3) | Python (v3) | Ruby (v3)
-
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
-
Scenario
UpdatedMachine Learning & AICreate an application to analyze customer feedback
Amazon Comprehend | Amazon Polly | Amazon Textract | Amazon Translate | Lambda
Learn how to create an application that analyzes customer comment cards, translates them from their original language, determines their sentiment, and generates an audio file from the translated text.
-
Scenario
UpdatedDatabasesQuery a table using PartiQL
DynamoDB
- Get an item by running a SELECT statement.
- Add an item by running an INSERT statement.
- Update an item by running an UPDATE statement.
- Delete an item by running a DELETE statement.
.NET (v3) | C++ | Go (v2) | Java (v2) | JavaScript (v3) | Kotlin | PHP (v3) | Python (v3) | Ruby (v3) | Rust
-
Hello AWS
UpdatedComputeHello Amazon EC2
Learn how to get started using Amazon EC2.
.NET (v3) | C++ | Java (v2) | JavaScript (v3) | Kotlin | Python (v3) | Ruby (v3) | Rust