I treat your data very seriously.
We do not store any data.
We will delete it even before you ask -- but if you ask, we'll delete it again.
I treat your data very seriously.
We do not store any data.
We will delete it even before you ask -- but if you ask, we'll delete it again.
import boto3 | |
iam = boto3.resource('iam') | |
def list_users() -> list: | |
""" | |
List all users in an account | |
:return: list of usernames | |
""" |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent | |
let g:indentLine_color_term = 100 |
import boto3 | |
# Create your own session | |
my_session = boto3.session.Session(region_name="regionA", profile_name="profileA") | |
client = my_session.client('dynamodb') | |
paginator = client.get_paginator('scan') | |
# Option 1, paginate through paginator, a bit clunky, but possibly better performance | |
response_iterator = paginator.paginate( | |
TableName="kl.Klayers-prodp38.db" |
https://s3-ap-southeast-1.amazonaws.com/govscan.info/cypress.zip |
import requests | |
import json | |
import csv | |
base_url = "https://aws.amazon.com/api/dirs/items/search" | |
params = { | |
"item.directoryId": "this-is-my-architecture", | |
"sort_by": "item.additionalFields.airDate", | |
"sort_order": "desc", |
from aws_lambda_powertools.logging import Logger | |
logger = Logger() | |
@logger.inject_lambda_context | |
def handler(event, context): | |
important_list = [1,2,3] | |
import logging | |
import json | |
class FormatterJSON(logging.Formatter): | |
def format(self, record): | |
record.message = record.getMessage() | |
if self.usesTime(): | |
record.asctime = self.formatTime(record, self.datefmt) |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
logger.handlers[0].setFormatter(logging.Formatter('{"level": "%(levelname)s", "message": "%(message)s", "time": "%(asctime)s", "name": "%(name)s"}', | |
"%Y-%m-%dT%H:%M:%S")) | |
logger.info("Hello") |