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 DynamoDB endpoint in VPC | |
aws ec2 create-vpc-endpoint --vpc-id vpc-xxxxxx --service-name com.amazonaws.us-east-1.dynamodb --region us-east-1 | |
{ | |
"VpcEndpoint": { | |
"VpcEndpointId": "vpce-xxxxxx", | |
"VpcEndpointType": "Gateway", | |
"VpcId": "vpc-xxxxxxx", | |
"ServiceName": "com.amazonaws.us-east-1.dynamodb", | |
"State": "available", |
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
# Finally adding the routing information for the endpoint | |
aws ec2 modify-vpc-endpoint --vpc-endpoint-id vpce-xxxxxx --add-route-table-ids rtb-xxxxxx --region us-east-1 | |
{ | |
"Return": true | |
} |
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
STATUS: 200 | |
lambdaExecSecurityGroups: ["sg-xxxxxxx"] | |
subnets: ["subnet-xxxxxxx"] |
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
# Deploy in the us-east-1 region | |
serverless deploy --region us-east-1 | |
# Deploy in the us-west-2 region | |
serverless deploy --region us-west-2 |
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
from __future__ import unicode_literals | |
import sys | |
import logging | |
import os | |
import json | |
import decimal | |
log = logging.getLogger() | |
log.setLevel(logging.DEBUG) |
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 json | |
import logging | |
import boto3 | |
import os | |
import uuid | |
log = logging.getLogger() | |
log.setLevel(logging.DEBUG) | |
region = os.environ["AWS_REGION"] |
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
http POST https://global.adhorn.me/create "session_comment"="It is a love hate relationship" "item_id"="foobar" ✔ 13:50:02 | |
HTTP/1.1 200 OK | |
Connection: keep-alive | |
Content-Length: 23 | |
Content-Type: application/json | |
Date: Fri, 18 May 2018 11:50:44 GMT | |
X-Amzn-Trace-Id: Root=1-5afebe14-da73f2310da0b2cd7b61f11f | |
x-amz-apigw-id: HFKjJE7-vHcFVgQ= | |
x-amzn-RequestId: b239568b-5a91-11e8-b612-b7f1413e87f0 |
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
from __future__ import unicode_literals | |
import sys | |
import logging | |
import boto3 | |
import os | |
log = logging.getLogger() | |
log.setLevel(logging.DEBUG) | |
sys.path.insert(0, './vendored') |
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
http https://global.adhorn.me/get/foobar ✔ 13:50:43 | |
HTTP/1.1 200 OK | |
Connection: keep-alive | |
Content-Length: 386 | |
Content-Type: application/json | |
Date: Fri, 18 May 2018 11:50:48 GMT | |
X-Amzn-Trace-Id: Root=1-5afebe18-79fda21b908c34d743f9e5c1 | |
x-amz-apigw-id: HFKj1FGMPHcFbIQ= | |
x-amzn-RequestId: b4d7cf60-5a91-11e8-a53f-c9e1bbeb06fe |
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
from __future__ import unicode_literals | |
import sys | |
import logging | |
import os | |
import json | |
import decimal | |
log = logging.getLogger() | |
log.setLevel(logging.DEBUG) |