AWS Notes
5.6K subscribers
444 photos
42 videos
10 files
2.8K links
AWS Notes — Amazon Web Services Educational and Information Channel

Chat: https://xn--r1a.website/aws_notes_chat

Contacts: @apple_rom, https://www.linkedin.com/in/roman-siewko/
Download Telegram
Модульность в AWS SDK третьей версии:

https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/

То есть можно загрузить отдельный модуль, например, для S3 (а не весь пакет со всеми сервисами целиком):

const { S3 } = require("@aws-sdk/client-s3");
const s3Client = new S3({});
await s3Client.createBucket(params);

Можно добавить, что "прямо как в AWS CDK". Интересно отметить, что AWS SDK уходит от монорепы, в то время как CDK туда стремится. Демократия, однако.

#SDK
AWS SDK для Rust:

https://aws.amazon.com/blogs/developer/a-new-aws-sdk-for-rust-alpha-launch/

#[tokio::main]
async fn main() -> Result<(), aws_sdk_dynamodb::Error> {
let client = aws_sdk_dynamodb::Client::from_env();
let req = client.list_tables().limit(10);
let resp = req.send().await?;
println!("Current DynamoDB tables: {:?}", resp.table_names.unwrap_or_default());
Ok(())
}

#SDK #Rust
​​Статья про то, как автор пытался получить список удалённых секретов, однако полезна описанием работы AWS SDK:

https://alexwlchan.net/2021/07/listing-deleted-secrets/#how-the-language-specific-aws-sdks-work

How the language-specific AWS SDKs work
At time of writing, AWS has nine language-specific SDKs which have to support over 200 different services. Each SDK contains a client for each service, and the methods on those clients mirror the underlying HTTP APIs. It would be impractical to maintain those clients by hand – so they don’t.
Instead, AWS publish “service models” that describe each service. These models are JSON files that contain a complete description of the endpoints, the models, the documentation text, and so on. These models are used to autogenerate the service-specific clients in the SDKs, reducing the effort required to keep everything up-to-date. This approach has also allowed other people to write SDKs in languages that AWS don’t support, like Haskell and Clojure.

#SDK #Secrets #Python
👍1