← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 200
  1. Application configuration in AWS Systems Manager Parameter Store often mixes plain values with SecureString ones.

  2. Applications which use presigned S3 URLs can be awkward to test.

  3. A lot of bugs in real systems are related to time.

  4. Simulated AWS services in Yulin take their timestamps from a clock which belongs to the simulation rather than to the process running it.

  5. 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…

  6. Most TypeScript packages publish only their build output from the dist/ directory.

  7. 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.

  8. A build script that downloads a zip archive often only needs one or two files out of it.

  9. Here’s a Bash script to dump a project into a flat file structure in a single directory.

  10. 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…

  11. AWS CDK has a bucket deployment feature which automatically copies files from a local filesystem directory to an S3 Bucket during CDK deployment.

  12. CloudFront Functions can be slightly inconvenient to test and iterate on, because the CFF JS2 syntax is idiosyncratic and does not support module exports.

  13. 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.

  14. 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.

  15. 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.

  16. In TypeScript projects it’s common to have separate tsconfig files covering the entire project and separate build contexts which exclude test files.

  17. 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.

  18. @kensio/yulin npm package

    The @kensio/yulin library is an open source TypeScript package for simulating AWS for local dev and isolated unit testing.

  19. AWS CloudFront Functions (CFF) use a special subset of JavaScript called JS2.

  20. @kensio/smartass npm package

    The @kensio/smartass library is an open source TypeScript package that provides type narrowing assertion functions.

  21. Fanalysis

    In June 2025 I was the second employee to join Fanalysis, as Staff Software Engineer.

  22. The cdk synth command can be pretty slow, even when running for a single small stack.

  23. 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.

  24. 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

  25. 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.

  26. 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/' \ '{*}'…

  27. 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 = "",

  28. HOA Mailers

    I helped HOA Mailers with their AWS infrastructure, backend systems and frontend software.

  29. 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.

  30. 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:…

  31. 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…

  32. 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…

  33. 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.

  34. 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.

  35. 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.

  36. Here’s a Github Action that finds and removes PR comments based on a string identifier.

  37. 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.

  38. Here’s a Github Action to get the URL to the current job and specific step in the job to open.

  39. 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='...

  40. Here’s a utility function that safely ensures an event loop is running in a Python asyncio application.

  41. Doozy

    I’ve been helping to build Doozy’s product as a freelance Software Engineer, using GCP, Firebase and TypeScript.

  42. ElseWhen

    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.

  43. Omnipresent

    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.

  44. It’s quite likely that you’ll let other organisations know about the Elastic IPs that you have configured in your AWS VPC.

  45. 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.

  46. 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…

  47. 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

  48. 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.

  49. KrakenFlex

    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.

  50. It’s surprisingly difficult to use AWS SSM Parameter secure strings in CloudFormation templates.