This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sam build --parallel | |
| SAM CLI now collects telemetry to better understand customer needs. | |
| You can OPT OUT and disable telemetry collection by setting the | |
| environment variable SAM_CLI_TELEMETRY=0 in your shell. | |
| Thanks for your help! | |
| Learn More: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-telemetry.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "additionalEventData": { | |
| "bytesTransferredIn": 0, | |
| "bytesTransferredOut": 339117, | |
| "x-amz-id-2": "Plk5qxp4LoJpRJEteWviQ6J7sEr+Fvx5sn0fUbvBq6cUIexQbZm6lSzeW5e5TNss1l/5cxDmUDPXeKJu12KTmg==" | |
| }, | |
| "awsRegion": "us-east-1", | |
| "eventCategory": "Data", | |
| "eventID": "8d96391c-83f4-3491-bb84-4b389122ffb9", | |
| "eventName": "GetObject", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const furlDomain = "lf4rhhulpamois3oz5z4i3anpe0loidx.lambda-url.us-east-2.on.aws"; | |
| async function handleRequest(request) { | |
| const url = new URL(request.url); | |
| url.hostname = furlDomain; | |
| const newRequest = new Request(url, request); | |
| newRequest.headers.set('Host', furlDomain); | |
| return await fetch(newRequest); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Transform: AWS::Serverless-2016-10-31 | |
| Resources: | |
| Function: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Runtime: python3.9 | |
| Handler: index.handler | |
| InlineCode: | | |
| import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Resources: | |
| Bus: | |
| Type: AWS::Events::EventBus | |
| BusPolicy: | |
| Type: AWS::Events::EventBusPolicy | |
| Properties: | |
| EventBusName: !Ref Bus | |
| StatementId: AllowOrg | |
| Statement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Transform: AWS::Serverless-2016-10-31 | |
| Resources: | |
| Function: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Runtime: python3.8 | |
| Handler: index.handler | |
| InlineCode: | | |
| def handler(a, b): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Parameters: | |
| SecurityGroupIds: | |
| Type: List<AWS::EC2::SecurityGroup::Id> | |
| SubnetIds: | |
| Type: List<AWS::EC2::Subnet::Id> | |
| Resources: | |
| Api: | |
| Type: AWS::ApiGatewayV2::Api | |
| Properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| generation process: | |
| * go to https://crt.sh/?q=%25.amazonaws.com | |
| * dump into a text document | |
| * de-dupe regions by replacing us-east-1, ap-southeast-2, etc with "region" | |
| * de-dupe ec2 by replacing ec2-123-45-67-89 with ec2-xx-xx-xx-xx | |
| * also check out https://gist.github.com/phils/eefcc8b1dcbaf9e5cec4fb98b9413c7b for an even more digestible version | |
| *.?.?.?.amazonaws.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -euxo pipefail | |
| service docker stop | |
| vgextend docker /dev/nvme0n1 | |
| lvremove -f /dev/docker/docker-pool | |
| vgreduce docker /dev/sdcz1 | |
| lvcreate -T docker -n docker-pool -L 200G | |
| lvcreate docker -n scratch -L 200G | |
| mkfs.ext4 -E nodiscard /dev/docker/scratch | |
| mkdir /mnt/scratch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import boto3 | |
| import json | |
| import sys | |
| import os | |
| import itertools | |
| def chunks(l, n): | |
| for i in range(0, len(l), n): | |
| yield l[i:i + n] |
NewerOlder