@@ -1139,6 +1139,322 @@ For more detailed information and advanced configurations, refer to the followin
1139
1139
Remember to replace placeholders (e.g., my-cluster, us-west-2) with your actual cluster name and preferred region. Always be cautious when deleting resources to avoid unintended data loss.
1140
1140
#+END_COMMENT
1141
1141
1142
+ ** AWS Step Functions
1143
+
1144
+ *** List state machines
1145
+ #+BEGIN_SRC shell
1146
+ aws stepfunctions list-state-machines | jq -r '.stateMachines[]|.name'
1147
+ #+END_SRC
1148
+
1149
+ #+RESULTS:
1150
+ : jwalsh-ml-states
1151
+
1152
+ *** Create a state machine
1153
+ #+BEGIN_SRC shell
1154
+ aws stepfunctions create-state-machine \
1155
+ --name "MyStateMachine" \
1156
+ --definition '{"Comment":"A Hello World example of the Amazon States Language using a Pass state","StartAt":"HelloWorld","States":{"HelloWorld":{"Type":"Pass","Result":"Hello World!","End":true}}}' \
1157
+ --role-arn arn:aws:iam::123456789012:role/service-role/StepFunctions-MyStateMachine-role-0123456789
1158
+ #+END_SRC
1159
+
1160
+ *** Start execution of a state machine
1161
+ #+BEGIN_SRC shell
1162
+ aws stepfunctions start-execution \
1163
+ --state-machine-arn arn:aws:states:us-west-2:123456789012:stateMachine:MyStateMachine \
1164
+ --input '{"key1": "value1", "key2": "value2"}'
1165
+ #+END_SRC
1166
+
1167
+ ** Amazon Athena
1168
+
1169
+ *** List workgroups
1170
+ #+BEGIN_SRC shell
1171
+ aws athena list-work-groups | jq '.WorkGroups[]|.Name'
1172
+ #+END_SRC
1173
+
1174
+ #+RESULTS:
1175
+ : primary
1176
+
1177
+ *** Create a workgroup
1178
+ #+BEGIN_SRC shell
1179
+ aws athena create-work-group \
1180
+ --name "MyWorkGroup" \
1181
+ --configuration '{"ResultConfiguration":{"OutputLocation":"s3://my-athena-results/"}}'
1182
+ #+END_SRC
1183
+
1184
+ *** Run a query
1185
+ #+BEGIN_SRC shell
1186
+ aws athena start-query-execution \
1187
+ --query-string "SELECT * FROM my_database.my_table LIMIT 10" \
1188
+ --query-execution-context Database=my_database \
1189
+ --result-configuration OutputLocation=s3://my-athena-results/
1190
+ #+END_SRC
1191
+
1192
+ *** Get query results
1193
+ #+BEGIN_SRC shell
1194
+ aws athena get-query-results --query-execution-id QueryExecutionId
1195
+ #+END_SRC
1196
+
1197
+ ** Amazon QuickSight
1198
+
1199
+ *** List users
1200
+ #+BEGIN_SRC shell
1201
+ aws quicksight list-users --aws-account-id 123456789012 --namespace default
1202
+ #+END_SRC
1203
+
1204
+ #+RESULTS:
1205
+
1206
+ *** Create a dataset
1207
+ #+BEGIN_SRC shell
1208
+ aws quicksight create-data-set \
1209
+ --aws-account-id 123456789012 \
1210
+ --data-set-id MyDataSet \
1211
+ --name "My Data Set" \
1212
+ --physical-table-map file://physical-table-map.json \
1213
+ --logical-table-map file://logical-table-map.json \
1214
+ --import-mode SPICE
1215
+ #+END_SRC
1216
+
1217
+ *** Create an analysis
1218
+ #+BEGIN_SRC shell
1219
+ aws quicksight create-analysis \
1220
+ --aws-account-id 123456789012 \
1221
+ --analysis-id MyAnalysis \
1222
+ --name "My Analysis" \
1223
+ --source-entity file://source-entity.json
1224
+ #+END_SRC
1225
+
1226
+ ** Amazon Neptune
1227
+
1228
+ *** List Neptune clusters
1229
+ #+BEGIN_SRC shell
1230
+ aws neptune describe-db-clusters | jq .DBClusters
1231
+ #+END_SRC
1232
+
1233
+ #+RESULTS:
1234
+ : []
1235
+
1236
+ *** Create a Neptune cluster
1237
+ #+BEGIN_SRC shell
1238
+ aws neptune create-db-cluster \
1239
+ --db-cluster-identifier my-neptune-cluster \
1240
+ --engine neptune \
1241
+ --vpc-security-group-ids sg-1234567890abcdef0 \
1242
+ --db-subnet-group-name my-db-subnet-group
1243
+ #+END_SRC
1244
+
1245
+ *** Create a Neptune instance
1246
+ #+BEGIN_SRC shell
1247
+ aws neptune create-db-instance \
1248
+ --db-instance-identifier my-neptune-instance \
1249
+ --db-instance-class db.r5.large \
1250
+ --engine neptune \
1251
+ --db-cluster-identifier my-neptune-cluster
1252
+ #+END_SRC
1253
+
1254
+ *** Run a Gremlin query (using curl)
1255
+ #+BEGIN_SRC shell
1256
+ curl -X POST \
1257
+ -H 'Content-Type: application/json' \
1258
+ https://your-neptune-endpoint:8182/gremlin \
1259
+ -d '{"gremlin": "g.V().limit(1)"}'
1260
+ #+END_SRC
1261
+
1262
+ #+BEGIN_COMMENT
1263
+ Remember to replace placeholder values (e.g., 123456789012, arn:aws:iam::123456789012:role/service-role/StepFunctions-MyStateMachine-role-0123456789, QueryExecutionId, sg-1234567890abcdef0, your-neptune-endpoint) with actual values relevant to your AWS environment. Always be cautious when executing commands that create or modify resources to avoid unintended changes or costs.
1264
+ #+END_COMMENT
1265
+
1266
+ ** AWS Data Exchange
1267
+
1268
+ *** List data sets
1269
+ #+BEGIN_SRC shell
1270
+ aws dataexchange list-data-sets | jq .DataSets
1271
+ #+END_SRC
1272
+
1273
+ *** Create a data set
1274
+ #+BEGIN_SRC shell
1275
+ aws dataexchange create-data-set \
1276
+ --asset-type "S3_SNAPSHOT" \
1277
+ --description "My sample data set" \
1278
+ --name "My Data Set"
1279
+ #+END_SRC
1280
+
1281
+ *** Create a revision
1282
+ #+BEGIN_SRC shell
1283
+ aws dataexchange create-revision \
1284
+ --data-set-id "data-set-id" \
1285
+ --comment "Initial revision"
1286
+ #+END_SRC
1287
+
1288
+ ** Amazon Neptune (Additional Examples)
1289
+
1290
+ *** Load data into Neptune
1291
+ #+BEGIN_SRC shell
1292
+ aws neptune-db load-from-s3 \
1293
+ --source s3://bucket-name/object-key-name \
1294
+ --format csv \
1295
+ --region us-west-2 \
1296
+ --endpoint https://your-cluster-endpoint:8182
1297
+ #+END_SRC
1298
+
1299
+ *** Run a SPARQL query (using curl)
1300
+ #+BEGIN_SRC shell
1301
+ curl -X POST \
1302
+ -H 'Content-Type: application/x-www-form-urlencoded' \
1303
+ https://your-neptune-endpoint:8182/sparql \
1304
+ -d 'query=SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10'
1305
+ #+END_SRC
1306
+
1307
+ ** AWS DeepLens
1308
+
1309
+ *** List DeepLens projects
1310
+ #+BEGIN_SRC shell
1311
+ aws deeplens list-projects
1312
+ #+END_SRC
1313
+
1314
+ #+RESULTS:
1315
+
1316
+ *** Create a DeepLens project
1317
+ #+BEGIN_SRC shell
1318
+ aws deeplens create-project \
1319
+ --project-name "MyProject" \
1320
+ --project-description "My DeepLens project"
1321
+ #+END_SRC
1322
+
1323
+ ** Amazon CodeGuru
1324
+
1325
+ *** Create a CodeGuru Reviewer association
1326
+ #+BEGIN_SRC shell
1327
+ aws codeguru-reviewer associate-repository \
1328
+ --repository CodeCommit={Name=my-repo}
1329
+ #+END_SRC
1330
+
1331
+ *** List CodeGuru Profiler profiling groups
1332
+ #+BEGIN_SRC shell
1333
+ aws codeguruprofiler list-profiling-groups
1334
+ #+END_SRC
1335
+
1336
+ ** AWS IoT Greengrass
1337
+
1338
+ *** List Greengrass groups
1339
+ #+BEGIN_SRC shell
1340
+ aws greengrass list-groups
1341
+ #+END_SRC
1342
+
1343
+ *** Create a Greengrass group
1344
+ #+BEGIN_SRC shell
1345
+ aws greengrass create-group --name "MyGreengrassGroup"
1346
+ #+END_SRC
1347
+
1348
+ *** Create a Greengrass core definition
1349
+ #+BEGIN_SRC shell
1350
+ aws greengrass create-core-definition --name "MyCoreDefinition"
1351
+ #+END_SRC
1352
+
1353
+ ** Amazon Forecast (Expanded)
1354
+
1355
+ *** Create a dataset group
1356
+ #+BEGIN_SRC shell
1357
+ aws forecast create-dataset-group \
1358
+ --dataset-group-name my-dataset-group \
1359
+ --domain CUSTOM \
1360
+ --dataset-arns arn:aws:forecast:us-west-2:123456789012:dataset/my-dataset
1361
+ #+END_SRC
1362
+
1363
+ *** Create a predictor
1364
+ #+BEGIN_SRC shell
1365
+ aws forecast create-predictor \
1366
+ --predictor-name my-predictor \
1367
+ --algorithm-arn arn:aws:forecast:::algorithm/ARIMA \
1368
+ --forecast-horizon 10 \
1369
+ --input-data-config '{"DatasetGroupArn":"arn:aws:forecast:us-west-2:123456789012:dataset-group/my-dataset-group"}' \
1370
+ --featurization-config '{"ForecastFrequency": "D"}'
1371
+ #+END_SRC
1372
+
1373
+ *** Create a forecast
1374
+ #+BEGIN_SRC shell
1375
+ aws forecast create-forecast \
1376
+ --forecast-name my-forecast \
1377
+ --predictor-arn arn:aws:forecast:us-west-2:123456789012:predictor/my-predictor
1378
+ #+END_SRC
1379
+
1380
+ ** Amazon Personalize (Expanded)
1381
+
1382
+ *** Create a dataset group
1383
+ #+BEGIN_SRC shell
1384
+ aws personalize create-dataset-group --name my-dataset-group
1385
+ #+END_SRC
1386
+
1387
+ *** Create a solution
1388
+ #+BEGIN_SRC shell
1389
+ aws personalize create-solution \
1390
+ --name my-solution \
1391
+ --dataset-group-arn arn:aws:personalize:us-west-2:123456789012:dataset-group/my-dataset-group \
1392
+ --recipe-arn arn:aws:personalize:::recipe/aws-user-personalization
1393
+ #+END_SRC
1394
+
1395
+ *** Create a campaign
1396
+ #+BEGIN_SRC shell
1397
+ aws personalize create-campaign \
1398
+ --name my-campaign \
1399
+ --solution-version-arn arn:aws:personalize:us-west-2:123456789012:solution/my-solution/1 \
1400
+ --min-provisioned-tps 1
1401
+ #+END_SRC
1402
+
1403
+ *** Get recommendations
1404
+ #+BEGIN_SRC shell
1405
+ aws personalize-runtime get-recommendations \
1406
+ --campaign-arn arn:aws:personalize:us-west-2:123456789012:campaign/my-campaign \
1407
+ --user-id user123
1408
+ #+END_SRC
1409
+
1410
+ ** AWS Lake Formation
1411
+
1412
+ *** List data lake settings
1413
+ #+BEGIN_SRC shell
1414
+ aws lakeformation list-data-lake-settings
1415
+ #+END_SRC
1416
+
1417
+ *** Grant permissions
1418
+ #+BEGIN_SRC shell
1419
+ aws lakeformation grant-permissions \
1420
+ --principal DataLakePrincipalIdentifier=arn:aws:iam::123456789012:user/data-analyst \
1421
+ --resource '{"Table":{"DatabaseName":"my_database","Name":"my_table"}}' \
1422
+ --permissions SELECT
1423
+ #+END_SRC
1424
+
1425
+ *** Register a new location
1426
+ #+BEGIN_SRC shell
1427
+ aws lakeformation register-resource \
1428
+ --resource-arn arn:aws:s3:::my-bucket \
1429
+ --use-service-linked-role
1430
+ #+END_SRC
1431
+
1432
+ ** Amazon Managed Streaming for Apache Kafka (MSK)
1433
+
1434
+ *** List MSK clusters
1435
+ #+BEGIN_SRC shell
1436
+ aws kafka list-clusters
1437
+ #+END_SRC
1438
+
1439
+ *** Create an MSK cluster
1440
+ #+BEGIN_SRC shell
1441
+ aws kafka create-cluster \
1442
+ --cluster-name MyMSKCluster \
1443
+ --kafka-version 2.6.2 \
1444
+ --number-of-broker-nodes 3 \
1445
+ --broker-node-group-info file://broker-node-group-info.json \
1446
+ --encryption-info file://encryption-info.json
1447
+ #+END_SRC
1448
+
1449
+ *** Describe a cluster
1450
+ #+BEGIN_SRC shell
1451
+ aws kafka describe-cluster --cluster-arn ClusterArn
1452
+ #+END_SRC
1453
+
1454
+ #+BEGIN_COMMENT
1455
+ Remember to replace placeholder values (e.g., 123456789012, your-neptune-endpoint, ClusterArn) with actual values relevant to your AWS environment. Always be cautious when executing commands that create or modify resources to avoid unintended changes or costs. Some commands may require additional setup or file preparation not shown here.
1456
+ #+END_COMMENT
1457
+
1142
1458
* Responsible AI
1143
1459
1144
1460
A key focus of this project is on responsible AI practices. We cover:
0 commit comments