Security Cloud Courses About
imgs/hero.webp

Smithy

AWS Labs has a lot of open source code up on GitHub. In this post, we’re taking a look at AWS Data Wrangler. This project provides a smoother interface between pandas DataFrames and various AWS Cloud data services.

I call out a few more details in the Twitter thread below…

Tweet 1/11 ๐Ÿ‘‡ Next tweet

to wrap up the week, let's look a Smithy, https://github.com/awslabs/smithy from @awscloud Labs

this project “defines and generates clients, services, and documentation for any protocol” which is a big claim

let’s see what’s actually here…

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 2/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

read this thread unrolled at https://t.co/FICk4Hpn4p

the previous thread is up at https://markn.ca/2021/aws-data-wrangler/

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 3/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

the full docs site (https://awslabs.github.io/smithy/), clarifies the goal, "A language for defining services and SDKs"

ok, so this is DSL-type project. the 4 main features:

  • protocol-agnostic
  • codify & enforce API governance
  • designed to evolve
  • resource based

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 4/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

the FAQ calls out that this project has been used inside Amazon & @awscloud for over a decade (that's a good sign)

the project uses the term IDL or interface description language…so not quite a DSL

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 5/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

this is not a project that you are going to implement (most likely). but it is a fascinating project to learn from

AWS uses Smithy to describe their services, metadata, and capabilities in a programmatic way

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 6/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

describing these systems in a machine reading format opens up a host of new possibilities like automated policy enforcement, service validate, compatibility checking, and a lot more

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 7/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

this example description from the docs really drives the point home. look ๐Ÿ‘‡ at how much clearer the Smithy description is vs. a more common JSON structure

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 8/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

in Smithy, services have:
  • resources
  • operations
  • shapes

resources & operations are straightforward but the “shape” concept deserves a closer look

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 9/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

according to the docs, a "shape" is an instance of a type and it has "traits"

shapes can be simple, aggregate, or a service

https://awslabs.github.io/smithy/1.0/spec/core/model.html#shapes

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 10/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

using these constructs together, you can accurately describe your service in a clear and simple manner

here’s a complete example from the docs: https://awslabs.github.io/smithy/quickstart.html#complete-example

๐Ÿงตโ˜๏ธ #cloud #devops

Tweet 11/11 ๐Ÿ‘‡ Next tweet ๐Ÿ‘† Start

if you're building out a distributed system, the Smithy project is worth exploring. there's a lot of great ideas here and you might be able to leverage the project for your work

at the very least, you’ll learn a lot about IDLs from @awscloud’s experience

/๐Ÿงตโ˜๏ธ #cloud #devops