AWS SDK for the Rust Programming Language
Questions tagged [aws-sdk-rust]
22 questions
6
votes
1 answer
How to serialize http::HeaderMap into JSON?
What is the proper way of serializing HTTP request headers (http::HeaderMap) into JSON in Rust?
I am implementing an AWS Lambda function and I would like to have a simple echo function for debugging.
use lambda_http::{lambda, IntoResponse,…

Istvan
- 7,500
- 9
- 59
- 109
2
votes
1 answer
AWS Rust - convert DynamoDB result JSON to (web) JSON
Currently I have a S3 static website with a javascript request that hits a Lambda which returns an Item from my dynamodb database. I think I am very close to success on this. It seems like all I need to do is convert the DynamoDB version of JSON to…

DoubleDouble
- 328
- 2
- 12
2
votes
0 answers
Read Parquet file from AWS S3 in Rust
I am trying to read parquet files from S3. This is what I have so far,
use std::fs::File;
use std::path::Path;
use parquet::file::reader::{FileReader, SerializedFileReader};
use parquet::record::RowAccessor;
pub fn read_file() {
let response =…

navarro
- 21
- 2
2
votes
1 answer
How to write idiomatic Rust error handling using AWS Rust SDK for DynamoDb?
I'm new to Rust with a background in Java, Groovy, and C. At this point in my Rust journey, I don't even know how to phrase the question in Google yet.
My question is, can someone give me an example of idiomatic Rust to replace my ugly code snippet…

Hash
- 29
- 3
1
vote
0 answers
AWS s3 in Rust: Get and store a file - Invalid file header when opening
What I want to do: Download an S3 file (pdf) in a lambda and extract its text, using Rust.
The Error:
ERROR PDF error: Invalid file header
I checked the pdf file in the bucket, downloaded it from the console and everything looks correct, so…

superfuzzy
- 346
- 2
- 13
1
vote
1 answer
How to append elements to a list in DynamoDB using Rust
I'm struggling using list_append programmatically in Rust.
I have a table called Humidities:
{
"id": 177,
"Measurements": [
49
]
}
and I want to add elements. For example:
{
"id": 177,
"Measurements": [
49,
53
]
}
This is a working…

rherrmannr
- 88
- 6
1
vote
0 answers
AWS Kinesis Rust SDK is not compatible with Tokio Runtime
I am trying to bridging the async functionality of the SDK with sync code. I need this to create a tokio_stream (a struct with Stream trait implemented.) The problem is quite suprising,
#[cfg(test)]
mod tests {
use…

Metehan Yıldırım
- 352
- 2
- 10
1
vote
1 answer
How to query a specific set of attributes from dynamoDB using rust language?
I am new to Rust and this question may come off as silly. I am trying to develop a lambda that reads a single item from dynamoDB given a key. The returned item needs to be shared back as result to the calling lambda.
I want the response to be in…

snipedown21
- 105
- 8
1
vote
1 answer
Error matching with downcasting the struct error types in AWS SDK
I have this code in Go:
_, err := kms.ScheduleKeyDeletion(...
ev, ok := err.(awserr.Error)
deleted := false
if ok {
switch ev.Code() {
case "KMSInvalidStateException":
deleted = strings.Contains(aerr.Message(), "pending…
0
votes
0 answers
Can we use rust-aws-sdk-amplify to call graphQL endpoints hosted on Appsync?
I am trying to use Rust aws-sdk to consume graphQL endpoint hosted on Appsync. I am looking for query, mutation as well as subscription.
Is it possible to establish the connection with Appsync server using rust amplify sdk?
Following is the react…

p_b
- 11
- 1
- 7
0
votes
1 answer
Store HashMap in DynamoDB database with aws-sdk-rust in compact code?
I'm new to Rust, and I'm trying to store a HashMap in a DynamoDB using aws-sdk-rust.
Here is my code, copied more or less verbatim from here but adapted to try to insert a whole Hashmap in one statement, rather than manually adding multiple .item()…

Richard
- 62,943
- 126
- 334
- 542
0
votes
1 answer
Passing credentials from aws-sdk-sts' assume_role to aws_config in Rust
I am trying to get information on CodePipeline via the Rust aws-sdk-codepipeline.
When using my default environment, everything work like a charm:
use aws_sdk_codepipeline as codepipeline;
main() {
let config =…

Devin Stewart
- 3,006
- 1
- 16
- 22
0
votes
1 answer
Serialize rusoto_dynamodbstream::AttributeValue to JSON
I'm creating a Rust script that get from event the DynamoDB Streams data and save it to a S3 Bucket.
After retrieving the data from the event body, I cannot convert the data to JSON because AttributeValue is not Serializable.
How can I do it?
Here…

Jerry Palmiotto
- 97
- 1
- 1
- 8
0
votes
0 answers
Upload AsyncRead to s3 rust
I am try to upload AsyncRead trait to s3, but I can not figure out how to convert the AsyncRead object to ByteStream which the library (aws-sdk-s3) know how to work with.
The signature of my function is like this:
async fn upload(&self, key:…

amit
- 177
- 1
- 13
0
votes
1 answer
Testing and mocking applications built with the AWS Rust Lambda Runtime and the AWS Rust SDK
I'm currently trying to build a simple Lambda that connects to Dynamo DB with AWS Rust Lambda Runtime and the AWS Rust SDK. My basic example works on AWS, but I'm keen to be able to perform manual tests and unit tests offline.
The main problem I can…

Charlie
- 4,197
- 5
- 42
- 59