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
resolvers: | |
Mutation.doSomething: | |
kind: UNIT | |
request: resolvers/sendMessage.request.vtl | |
response: resolvers/sendMessage.response.vtl | |
substitutions: | |
topicArn: !GetAtt MyTopic.TopicArn | |
dataSource: | |
type: HTTP | |
config: |
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: | |
GitHubOrg: | |
Type: String | |
RepositoryName: | |
Type: String | |
OIDCProviderArn: | |
Description: Arn for the GitHub OIDC Provider. | |
Default: "" | |
Type: String |
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
aws ssm get-parameters-by-path --path '/path/to/prams' --recursive \ | |
| jq .Parameters[].Name \ | |
| xargs -L1 -I'{}' aws ssm delete-parameter --name {} |
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($expression = "#PK = :PK") | |
#set($expressionNames = {"#PK": "PK", "#SK": "SK"}) | |
#set($expressionValues = {":PK": $util.dynamodb.toString("ACCOUNT#${ctx.args.accountId}")}) | |
#if(!$util.isNull($ctx.args.fromDate) && $util.isNull($ctx.args.toDate)) | |
#set($expression = "${expression} and #SK >= :fromDate") | |
$util.qr($expressionValues.put(":fromDate", $util.dynamodb.toString("TX#${ctx.args.fromDate}"))) | |
#elseif($util.isNull($ctx.args.fromDate) && !$util.isNull($ctx.args.toDate)) | |
#set($expression = "${expression} and #SK <= :toDate") | |
$util.qr($expressionValues.put(":toDate", $util.dynamodb.toString("TX#${ctx.args.toDate}"))) | |
#elseif(!$util.isNull($ctx.args.fromDate) && !$util.isNull($ctx.args.toDate)) |
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: | |
MyTable: | |
Type: AWS::DynamoDB::Table | |
DeletionPolicy: Retain | |
Properties: | |
TableName: mytable |
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
//read.js | |
const AWS = require('aws-sdk'); | |
const { gunzipSync } = require('zlib'); | |
AWS.config.update({ region: 'eu-west-1' }); | |
const dynamoDbClient = new AWS.DynamoDB(); | |
dynamoDbClient.getItem({ | |
"TableName": "blog", | |
"ReturnConsumedCapacity": "TOTAL", | |
"Key": { | |
"author": { |
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
declare module 'chunk-promise' { | |
type PromiseArray<T> = (() => Promise<T>)[]; | |
type PromiseFlavor = 'PromiseAll' | 'PromiseAllSettled'; | |
type Options<T, F extends PromiseFlavor> = { | |
concurrent?: number; | |
sleepMs?: number; | |
callback?: ( | |
chunkResults: F extends 'PromiseAllSettled' | |
? PromiseSettledResult<T>[] | |
: T[], |
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
aws stepfunctions list-executions \ | |
--state-machine-arn [sf-arn] \ | |
--status-filter RUNNING \ | |
--query "executions[*].{executionArn:executionArn}" \ | |
--output text | \ | |
xargs -I {} aws stepfunctions stop-execution \ | |
--execution-arn {} |
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 AWS = require('aws-sdk'); | |
const { gunzipSync } = require('zlib'); | |
AWS.config.update({ region: 'eu-west-1' }); | |
const dynamoDbClient = new AWS.DynamoDB(); | |
dynamoDbClient.getItem({ | |
"TableName": "blog", | |
"ReturnConsumedCapacity": "TOTAL", | |
"Key": { |
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
mappingTemplates: | |
- type: Query | |
field: wikipedia | |
kind: PIPELINE | |
functions: | |
- fetchFromCache | |
- fetchWikipedia | |
- saveToCache | |
dataSources: |
NewerOlder