Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
Application configuration in AWS Systems Manager Parameter Store often mixes plain values with SecureString ones.
-
Applications which use presigned S3 URLs can be awkward to test.
-
A lot of bugs in real systems are related to time.
-
Simulated AWS services in Yulin take their timestamps from a clock which belongs to the simulation rather than to the process running it.
-
Here’s a minimal CDK app with a Lambda function that reads an Object from an S3 Bucket: import * as cdk from "aws-cdk-lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import * as s3 from "aws-cdk-lib/aws-s3"; const app = new cdk.App(); const stack…
-
Most TypeScript packages publish only their build output from the dist/ directory.
-
If you want to check locally that your IAM policies allow and deny what you think they do, you can use the simulated IAM service in Yulin.
-
A build script that downloads a zip archive often only needs one or two files out of it.
-
Here’s a Bash script to dump a project into a flat file structure in a single directory.
-
Here’s a minimal CDK app that deploys a CloudFront Function: import * as cdk from "aws-cdk-lib"; import * as s3 from "aws-cdk-lib/aws-s3"; import * as cloudfront from "aws-cdk-lib/aws-cloudfront"; const app = new cdk.App(); const stack = new cdk.Stack(ap…
-
AWS CDK has a bucket deployment feature which automatically copies files from a local filesystem directory to an S3 Bucket during CDK deployment.
-
CloudFront Functions can be slightly inconvenient to test and iterate on, because the CFF JS2 syntax is idiosyncratic and does not support module exports.
-
In the last post I wrote about how TypeScript assertion signatures are more useful when they can incorporate existing type information from the calling scope.
-
TypeScript has a useful feature called assertion signatures that allows you to write functions that can be used to narrow the type of a value.
-
A lot of tests use the expect().toMatchObject() assertion in Jest or Vitest, because we’re most often dealing with object structures returned from the subject of the test.
-
In TypeScript projects it’s common to have separate tsconfig files covering the entire project and separate build contexts which exclude test files.
-
If you’re using S3 to host a static website and want to test and develop it locally, you can use the @kensio/yulin package.
-
The @kensio/yulin library is an open source TypeScript package for simulating AWS for local dev and isolated unit testing.
-
AWS CloudFront Functions (CFF) use a special subset of JavaScript called JS2.
-
The @kensio/smartass library is an open source TypeScript package that provides type narrowing assertion functions.
-
In June 2025 I was the second employee to join Fanalysis, as Staff Software Engineer.
-
The cdk synth command can be pretty slow, even when running for a single small stack.
-
TLDR: SAM local drops headers that contain an underscore, due to using Flask and WSGI internally, which differs from the behaviour of a deployed API Gateway.
-
Here’s a reusable GitHub Action definition that caches a public Docker image: --- name: Docker public image cache description: Pull and cache a public Docker image for reuse inputs: image_name_tag: description: Docker image name and tag to pull and cache
-
It’s best if a linter is applied from the beginning of a project, and with default linting rules, as that way the project benefits from the linting with the minimum possible effort.
-
Here’s a bash command to split a text file into multiple separate files by section delimited by a regex pattern matching titled sections in the source file: csplit \ -z \ -f section_ \ -b "%02d.txt" \ document.txt \ '/\nSection [0-9]\+\n/' \ '{*}'…
-
Here’s a Python testing utility function for asserting on an expected Exception type from within an ExceptionGroup: from contextlib import contextmanager @contextmanager def raises_in_group( expected_exception: type[Exception], match_message: str = "",
-
I helped HOA Mailers with their AWS infrastructure, backend systems and frontend software.
-
Here’s an AWS CloudFormation template and deployment script to set up Organizational Units and Accounts for Prod and Dev for a new project or department.
-
If you’re using Coverage.py or pytest-cov in your Python project, you probably end up with # pragma: no cover comments all over the place to prevent odd lines from being marked as missing coverage, like this: class Foobar: def do_something(): # pragma:…
-
Here’s a Github Action that posts a notification message to a Telegram chat, without using any dependencies. --- name: Post to Telegram description: Post a message to a Telegram channel inputs: telegram_bot_token: description: Auth token of the Telegram…
-
With branch coverage enabled in Coverage.py or pytest-coverage, you might see it report missing coverage on a compound boolean condition, like this: def foobar() -> bool: return ( condition_1() and condition_2() and condition_3() and condition_4() a…
-
Here’s a recursive utility function in Python that allows overriding nested paths through objects that can be mutable mappings, mutable sequences or dataclass instances.
-
Here’s a Github Action job that runs pytest coverage and then posts a summary of the coverage report as a PR comment with Markdown formatting.
-
Here’s a Github Action that runs a given bash command, captures the stdout and strderr output, and posts a comment with the output back to the PR if the command has a non-zero exit status.
-
Here’s a Github Action that finds and removes PR comments based on a string identifier.
-
You can capture output from a Github Action by echoing a variable name to the file specified by the "$GITHUB_OUTPUT" variable: echo "foobar='here is some data'" | tee -a "$GITHUB_OUTPUT" This is a bit trickier with multiline output.
-
Here’s a Github Action to get the URL to the current job and specific step in the job to open.
-
I noticed a ResourceWarning like this when using aiofiles to iterate lines of a file in an async context manager from aiofiles.open: ResourceWarning: unclosed file <_io.TextIOWrapper name='...
-
Here’s a utility function that safely ensures an event loop is running in a Python asyncio application.
-
I’ve been helping to build Doozy’s product as a freelance Software Engineer, using GCP, Firebase and TypeScript.
-
I worked as a Software Engineer on a contract basis for ElseWhen, using asyncio, CloudBuild, CloudRun, GCP, Gemini, Google Cloud Functions, LangChain, LLMs, OpenAI, PostgreSQL, Python, SQL, Terraform and other technologies.
-
I worked as a Software Engineer on a contract basis for Omnipresent via YLD, using asyncio, AWS, AWS Lambda, AWS SAM, Docker, ECS, FastAPI, PostgreSQL, Python, SNS, SQL, SQS, Terraform and other technologies.
-
It’s quite likely that you’ll let other organisations know about the Elastic IPs that you have configured in your AWS VPC.
-
Here’s a small CDK stack to set up an EC2 instance as a bastion host inside a VPC, sharing a fixed Elastic IP with other services in the VPC via the NAT Gateway.
-
Here’s a Bash one-liner to minify JSON in the current contents of the clipboard and replace the clipboard contents with the minified JSON: xclip -selection clipboard -o | python3 -c "import sys;import json;print(json.dumps(json.loads(sys.stdin.read()),sep…
-
Here’s a Bash one-liner to JSON-encode the current contents of the clipboard and replace the clipboard contents with the JSON-encoded output: xclip -o | python -c 'import sys;import json;print(json.dumps(sys.stdin.read().strip()))' | tee >(xclip -selection
-
Here’s a small bash script to identify an EC2 instance as a bastion host, and then use SSM Session Manager to forward multiple ports through the bastion on to other hosts.
-
I worked as a Software Engineer on a contract basis for KrakenFlex, using asyncio, AWS, AWS Lambda, AWS SAM, CloudFormation, DynamoDB, Python, SNS, SQS and other technologies.
-
It’s surprisingly difficult to use AWS SSM Parameter secure strings in CloudFormation templates.