-
Notifications
You must be signed in to change notification settings - Fork 1
Demo
⚠️ The blocks on this page require you to approve permissions for the Speedrun Prod Github App. These permissions enable Speedrun to authorize access to AWS roles based on your GitHub username, teams and organizations.
💡 Tip Click the Code tab on any block to see the underlying raw Markdown. Click the icon to copy the underlying Markdown to the clipboard.
As a side hustle, you landed a rover on the moon to collect moon rocks. The rover emits telemetry logs and metrics to CloudWatch and you want to see why it keeps throwing faults at the 55th minute of every hour and how many rocks you are missing out on. Click the Open AWS Console button go to the AWS Console all set up. Click Run query in the console to execute it. If you'd like change the region in the toolbar and then repeat the process in another account and region.
#CWLInsights
filter fault>0
| stats count(*), sum(rocks) by details, bin(1m)
Now you want to see what timestamps you got more than a certain number of rocks
#CWLInsights
filter fault<1 and rocks > ~~~Rocks Collected {type:'select',options:['10','20','50']}~~~ |
display @timestamp, rocks |
sort by rocks desc
Nina from accounts payable had an extra moment and wants to see the new sticker designs before the Bobs see them. You oblige with this link to go to the sticker bucket for the region.
#S3Bucket
But Nina has to transfer a call before you show her, so you improve the tool to go straight to the file.
#S3Object
~~~key=Sticker {type:'select', options: {'No Backspace Crew':'nobackspacecrew.svg','Speedrun':'speedrun.svg'}}~~~
Now you want someone to say "Hello" to you, but no one is in the office, so you get a Lambda to greet you instead.
#lambda {functionName:"HelloWorldService"}
{
"name": "~~~Name {default:'Samuel L. Jackson'}~~~"
}
This demo is sweet, but you're hungry. You go to the break room and use the Lambda powered warm nuts dispenser. Somehow it knows your GitHub login!
#lambda {functionUrl:"${lambdaFunctionUrl}"}
{
"warmed": ~~~Warm the nuts? {type: 'checkbox', default:true}~~~
}
Your boss wants to know how many occurrences of a word are in the Nickelback song Photograph. Luckily you have a database with the word frequency mirrored across two AWS accounts in separate regions for availability. You whip this together, slack him the link. He 😍's it and you get a raise.
#DDBItem {tableName:'nickleback-lyrics'}
~~~partitionKey=Lyric {transform:'value.toLowerCase().trim()', default:'photograph'}~~~
⚠️ Note To run this next command; first install and run srinit to authenticate your command line and install the AWS CLI (if you don't already have it). Feel free to skip to Deep link to a site if you'd rather do these steps later.
And because your Mom's Dec PDP-1 doesn't have a browser, and she already has everything in the JC Penny catalog, you make her a Nickelback lyric command line tool for Christmas:
#copy.withCreds
aws dynamodb get-item --table-name nickleback-lyrics \
--key $'{"word":{"S":"~~~partitionKey=Lyric {transform:'bashEscape(value.toLowerCase().trim())', default:'photograph'}~~~"}}' \
--query Item.occurences \
--output text
You want to tell everyone about when you demoed to the CEO of GitHub, but occasionally rick-roll the recipient.
#link
https://youtu.be/${Math.random() < (1.0/10)?'dQw4w9WgXcQ':'fu_MC0rujXw'}
But then you're like, why don't I just embed the video instead:
#!YouTube
fu_MC0rujXw
You can never remember the command to get milliseconds since 1970, for some reason everyone needs it. So you make this.
#copy
//Epoch time is
${Date.now()}
You want to file a complaint about the documentation quality.
#download {'filename':'complaint.txt', 'words':['difficult','shady','funky','poor', 'feral']}
${dayjs().format('MM-DD-YYYY')}
Dear ~~~Name {default:'Adam'}~~~,
Your docs did me dirty. Never have I seen content that was so ${randWord(words)}.
I did go ahead and make some edits to improve them.
Cheers,
${user}
The Getting Started page goes into more details about the markdown syntax and how it all works.
Below if you look for #srConfig
you'll see how little config is powering all of this. The trust policy on the Demo role is set to allow any GitHub user that is using the Speedrun app.
#srConfig
{
role: 'Demo',
services: {
DecacornService: {
bucket:"speedrun-demo-stickers-${region}",
logGroups:"/aws/lambda/MoonRocksService",
regions: {
"us-west-2" : {
account: '205348963185',
lambdaFunctionUrl: 'a2bocmnz4calxsxunj4ht7uibm0qcbsm'
},
"us-east-2" : {
account: '330023003565',
lambdaFunctionUrl: 'g37mubrn2y3mlbqacsow64wz4m0rfjky'
}
}
}
},
"function:randWord": {
"args" : ["words"],
"body" : "return words[Math.floor(Math.random()*words.length)]"
},
srServiceFilter:'DecacornService',
srShowConfig: true
}
Super Secret Squirrel Clearance Required
Sorry, you won't have access to this elevated privilege role, it is for perpil
only. But you can click these red buttons anyway and get denied.
#federateService {role:'Administrator'}
#copy.withCreds {role:'Administrator'}