[cloudshell-user@ip-10-134-76-174 ~]$ ab -c 1 -n 100 -k -H "authorization: $AUTH" https://dbnmtkykig3vobqu6f73dbgiam0qxeot.lambda-url.us-west-2.on.aws/todo-lists
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking dbnmtkykig3vobqu6f73dbgiam0qxeot.lambda-url.us-west-2.on.aws (be patient).....done
This file contains 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
import boto3 | |
from botocore.auth import SigV4Auth | |
from botocore.awsrequest import AWSRequest | |
session = boto3.Session() | |
credentials = session.get_credentials().get_frozen_credentials() | |
def make_signed_request(method, url, service_name, region, data=None, params=None, headers=None): | |
request = AWSRequest(method=method, url=url, data=data, params=params, headers=headers) | |
SigV4Auth(credentials, service_name, region).add_auth(request) |
This file contains 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Sample Template EC2ChooseAMI: Example to show how to chose an AMI based on the region and the architecture type. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "WebServer EC2 instance type", | |
"Type" : "String", | |
"Default" : "m1.small", |
This file contains 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
CREATE EXTERNAL TABLE `ticker_symbols`( | |
`ticker_symbol` string, | |
`sector` string, | |
`change` double, | |
`price` double, | |
`firehose` struct<record_id:string,timestamp:bigint> | |
) | |
PARTITIONED BY ( | |
`year` string, | |
`month` string, |
This file contains 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
GlueNotificationEventRule: | |
Type: AWS::Events::Rule | |
Properties: | |
Name: !Sub '${ProjectName}-glue-events-${Stage}' | |
State: ENABLED | |
EventPattern: | |
source: | |
- aws.glue | |
detail-type: | |
- Glue Data Catalog Database State Change |
This file contains 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
{ | |
"version": "0", | |
"id": "5089ddb8-2ab5-4739-7323-8519741f53d7", | |
"detail-type": "Glue Data Catalog Database State Change", | |
"source": "aws.glue", | |
"account": "123456789012", | |
"time": "2019-04-25T15:40:07Z", | |
"region": "us-east-1", | |
"resources": [ | |
"arn:aws:glue:us-east-1:123456789012:table/dbname/table_name" |
This file contains 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
GlueNotificationEventRule: | |
Type: AWS::Events::Rule | |
Properties: | |
Name: !Sub '${ProjectName}-glue-events-${Stage}' | |
State: ENABLED | |
EventPattern: | |
source: | |
- aws.glue | |
detail-type: | |
- Glue Data Catalog Database State Change |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "test01", | |
"Effect": "Allow", | |
"Action": "s3:GetObject", | |
"Resource": "*", | |
"Condition": { | |
"ForAllValues:StringEquals": { |
This file contains 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
/* | |
* Just consume events from Kinesis in a sink | |
*/ | |
const pause = parseInt(process.env.PAUSE_TIME || '0'); | |
//const pause = 0; | |
const sleep = (ms) => { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
}; |
This file contains 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
[ | |
{ | |
"kinesis": { | |
"approximateArrivalTimestamp": 1521218148.073, | |
"kinesisSchemaVersion": "1.0", | |
"partitionKey": "a1627837-a899-4dab-851e-98530ce557aa", | |
"sequenceNumber": "49582644240588213996014774893955628290209495172536860674", | |
"data": { | |
"MessageType": "Claps", | |
"EntitySequenceId": "0", |
NewerOlder