Skip to content

Instantly share code, notes, and snippets.

# Check admin privileges
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "Run as Administrator required." -ForegroundColor Red
exit 1
}
Write-Host "Installing WinGet on new system..." -ForegroundColor Green
try {
# Create temp directory
//! AWS Lambda function that forwards Kinesis wrapped OTLP records to OpenTelemetry collectors.
//!
//! This Lambda function:
//! 1. Receives Kinesis events containing otlp-stdout format records
//! 2. Decodes and decompresses the data
//! 3. Converts records to TelemetryData with binary protobuf format
//! 4. Compacts multiple records into a single payload
//! 5. Forwards the data to collectors
//!
//! The function supports:
//! AWS Lambda function that forwards Kinesis wrapped OTLP records to OpenTelemetry collectors.
//!
//! This Lambda function:
//! 1. Receives Kinesis events containing otlp-stdout format records
//! 2. Decodes and decompresses the data
//! 3. Converts records to TelemetryData with binary protobuf format
//! 4. Compacts multiple records into a single payload
//! 5. Forwards the data to collectors
//!
//! The function supports:
//! AWS Lambda function that forwards Kinesis wrapped OTLP records to OpenTelemetry collectors.
//!
//! This Lambda function:
//! 1. Receives Kinesis events containing otlp-stdout format records
//! 2. Decodes and decompresses the data
//! 3. Converts records to TelemetryData with binary protobuf format
//! 4. Compacts multiple records into a single payload
//! 5. Forwards the data to collectors
//!
//! The function supports:

PCComponentsData DynamoDB Table Structure

This document outlines the structure of the PCComponentsData DynamoDB table, including its primary key, sort key, Global Secondary Indexes (GSIs), and example items.

Table: PCComponentsData

PK (Partition Key) SK (Sort Key) Data Attribute (Example) GSI1PK (Type) GSI1SK (Brand#Model#ID) GSI2PK (Brand#Socket) GSI2SK (uArch#Model#ID) GSI3PK (SellerID) GSI3SK (Timestamp/Price) Item Type
COMP#CPU_AMD_R5_7600X METADATA Name: AMD Ryzen 5 7600X CPU

AppSync Events API Implementation Debug Log

Overview

We attempted to implement an AWS AppSync Events API with Lambda integration using AWS CDK and AWS Powertools for TypeScript. Despite following the documentation, we encountered several issues with event handling and response formatting.

Infrastructure Setup

The CDK stack (src/stacks/my-stack.ts) is correctly configured:

  • Lambda function with Node.js 22 runtime
  • AppSync Events API with API Key auth
  • Direct Lambda integration with REQUEST_RESPONSE invocation type
@garysassano
garysassano / aws-contributions-2024.md
Last active March 9, 2025 23:54
AWS Contributions 2024
import {
CfnOutput,
Duration,
RemovalPolicy,
Stack,
StackProps,
} from "aws-cdk-lib";
import * as ec2 from "aws-cdk-lib/aws-ec2";
import {
Cluster,
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" version="26.0.7">
<diagram name="Page-1" id="djHL5mm636rr6r_pgM0_">
<mxGraphModel grid="1" page="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="DdbccUahVdO5bLk03KSF-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="O5bRPiPwY5WvUBBcZ2e7-8" target="O5bRPiPwY5WvUBBcZ2e7-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="O5bRPiPwY5WvUBBcZ2e7-8" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,PHN2ZyB4bWxucz0iaHR0cDov