AWS Notes
5.09K subscribers
237 photos
33 videos
10 files
2.44K links
AWS Notes — Amazon Web Services Educational and Information Channel

Chat: https://t.me/aws_notes_chat

Contacts: @apple_rom, https://www.linkedin.com/in/roman-siewko/
Download Telegram
DaC - Diagram as Code

Если вы не любите рисовать диаграммы (а нужно) и любите питон (и правильно), то у меня для вас есть выход:

https://diagrams.mingrammer.com/docs/examples

Он же вход, подход и переход.

https://github.com/mingrammer/diagrams

Согласитесь, ведь проще написать:

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Web Service", show=False):
ELB("lb") >> EC2("web") >> RDS("userdb")


...чем рисовать эти дурацкие квадратики и стрелочки (на картинке ниже).

В общем, для тех, кто предпочитает кодить - отличный способ кодить в том числе диаграммы для своих отчётов и презентаций!

#info #python
​​Python-библиотека для переключения в нужную IAM роль:

https://github.com/benkehoe/aws-assume-role-lib

Удобно использовать, когда нужно сделать что-то в многих аккаунтах Organizations. Пример использования:

https://gist.github.com/benkehoe/52fdbe425fcfc2675cd0ec2bb996257d

#IAM #Python
​​Статья про то, как автор пытался получить список удалённых секретов, однако полезна описанием работы 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