Created
February 13, 2023 18:09
-
-
Save noahgift/603f2ca43d6a47d067c1f4cbe0a31d3f to your computer and use it in GitHub Desktop.
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
# Amazon Forecast Example | |
[source, python] | |
---- | |
import boto3 | |
forecast = boto3.client('forecast') | |
response = forecast.create_dataset_group( | |
DatasetGroupName='forecast_dataset_group', | |
Domain='CUSTOM', | |
) | |
---- | |
# Amazon QuickSight Example | |
[source, python] | |
---- | |
import boto3 | |
quicksight = boto3.client('quicksight') | |
response = quicksight.create_data_source( | |
AwsAccountId='AWS_ACCOUNT_ID', | |
DataSourceId='data_source_id', | |
Name='data_source_name', | |
Type='ADOBE_ANALYTICS', | |
) | |
---- | |
# Amazon Kinesis Data Streams Example | |
[source, python] | |
---- | |
import boto3 | |
kinesis = boto3.client('kinesis') | |
response = kinesis.create_stream( | |
StreamName='kinesis_stream_name', | |
ShardCount=1, | |
) | |
---- | |
# Amazon Kinesis Data Analytics Example | |
[source, python] | |
---- | |
import boto3 | |
kinesis_analytics = boto3.client('kinesisanalytics') | |
response = kinesis_analytics.create_application( | |
ApplicationName='kinesis_analytics_app', | |
RuntimeEnvironment='SQL-1.0', | |
) | |
---- | |
# Amazon SageMaker Example | |
[source, python] | |
---- | |
import boto3 | |
sagemaker = boto3.client('sagemaker') | |
response = sagemaker.create_notebook_instance( | |
NotebookInstanceName='notebook_instance_name', | |
InstanceType='ml.t2.medium', | |
) | |
---- | |
# Amazon DynamoDB Example | |
[source, python] | |
---- | |
import boto3 | |
dynamodb = boto3.client('dynamodb') | |
response = dynamodb.create_table( | |
TableName='dynamodb_table_name', | |
KeySchema=[ | |
{ | |
'AttributeName': 'attribute_name', | |
'KeyType': 'HASH' | |
}, | |
], | |
AttributeDefinitions=[ | |
{ | |
'AttributeName': 'attribute_name', | |
'AttributeType': 'S' | |
}, | |
], | |
ProvisionedThroughput={ | |
'ReadCapacityUnits': 5, | |
'WriteCapacityUnits': 5 | |
} | |
) | |
---- | |
# Amazon EMR Example | |
[source, python] | |
---- | |
import boto3 | |
emr = boto3.client('emr') | |
response = emr.run_job_flow( | |
Name='emr_cluster_name', | |
Instances={ | |
'InstanceGroups': [ | |
{ | |
'Name': 'master_instance_group', | |
'InstanceRole': 'MASTER', | |
'InstanceType': 'm5.xlarge', | |
'InstanceCount': 1, | |
}, | |
], | |
'Ec2KeyName': 'ec2_key_name', | |
'KeepJobFlowAlive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment