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
{ | |
"StartAt": "Get Page Count", | |
"States": { | |
"Get Page Count": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::apigateway:invoke", | |
"Parameters": { | |
"ApiEndpoint": "xxxxxxxxxx.execute-api.us-east-1.amazonaws.com", | |
"Method": "HEAD", | |
"Stage": "prod", |
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 uuid import uuid4 | |
import random | |
client = boto3.client('s3') | |
bucket_name = 'my-bucket-name' | |
categories = ['a', 'b', 'c'] |
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
Service | GB-month | |
---|---|---|
DynamoDB | $0.25 | |
S3 | $0.023 | |
Lambda Store | $0.15 |
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
Service | Single Record | One Million Records | |
---|---|---|---|
DynamoDB | $0.000000125 | $0.125 | |
S3 | $0.0000054 | $5.4 | |
Lambda Store | $0.000004 | $4 |
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 uuid import uuid4 | |
client = boto3.client('s3') | |
bucket_name = 'my-bucket-name' | |
categories = ['easy', 'medium', 'difficult'] | |
for category in categories: |
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 uuid import uuid4 | |
client = boto3.client('s3') | |
bucket_name = 'my-bucket-name' | |
# Create 100 records with a random key | |
for i in range(100): | |
key = str(uuid4()) |
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 uuid import uuid4 | |
from boto3.dynamodb.conditions import Key | |
dynamodb = boto3.resource('dynamodb') | |
table = dynamodb.Table('random-table-categorized') | |
categories = ['easy', 'medium', 'difficult'] |
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 uuid import uuid4 | |
dynamodb = boto3.resource('dynamodb') | |
table = dynamodb.Table('random-table') | |
# Create 100 records with a random partition key | |
for i in range(100): | |
item = {'pk': str(uuid4()), 'text': f"{i}"} | |
table.put_item(Item=item) |
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
{ | |
"Comment": "A Hello World example of the Amazon States Language using Pass states", | |
"StartAt": "Invoke an API Gateway URL", | |
"States": { | |
"Invoke an API Gateway URL": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::apigateway:invoke", | |
"Parameters": { | |
"ApiEndpoint": "xxxxxxxxxx.execute-api.us-east-1.amazonaws.com", | |
"Method": "GET", |
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
{ | |
"Comment": "A Hello World example of the Amazon States Language using Pass states", | |
"StartAt": "Create pending order", | |
"States": { | |
"Create pending order": { | |
"Type": "Pass", | |
"Next": "Select Payment Method" | |
}, | |
"Select Payment Method": { | |
"Type": "Choice", |