The CreateTable function creates a table in your AWS account. In an AWS account, table names must be unique in each Region. You can have two tables with same name if you create the tables in different regions.
For more information, see CreateTable.
ColdFusion (2021 release): Added this function.
serviceHandle.createTable(requestParameters)
See request parameters of CreateTable.
<cfscript> cred = { "credentialAlias" : "myalias", "vendorName" : "AWS", "region" : "us-east-2", "secretAccessKey" : "xxxxx", "accessKeyId" : "xxxx" } config = { "serviceName" = "DYNAMODB" } dynamo = getCloudService(cred, config) // create table movies tableStruct={ TableName : "MoviesNew", KeySchema:[ { AttributeName: "year", KeyType: "HASH"}, // Partition key { AttributeName: "title", KeyType: "RANGE"} // Sort key ], AttributeDefinitions:[ { AttributeName: "year", AttributeType: "N" }, { AttributeName: "title", AttributeType: "S" } ], ProvisionedThroughput:{ ReadCapacityUnits: 10, WriteCapacityUnits: 10 } } createTableResponse=dynamo.createTable(tableStruct,{"customResponse": true}) writeDump(createTableResponse) </cfscript>
Sign in to your account