Advertisement
zaq_hack

dynamodb

May 3rd, 2019
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. {
  2. "AWSTemplateFormatVersion" : "2010-09-09",
  3.  
  4. "Description" : "AWS CloudFormation Sample Template DynamoDB_Table: This template demonstrates the creation of a DynamoDB table. **WARNING** This template creates an Amazon DynamoDB table. You will be billed for the AWS resources used if you create a stack from this template.",
  5.  
  6. "Parameters" : {
  7. "HashKeyElementName" : {
  8. "Description" : "HashType PrimaryKey Name",
  9. "Type" : "String",
  10. "AllowedPattern" : "[a-zA-Z0-9]*",
  11. "MinLength": "1",
  12. "MaxLength": "2048",
  13. "ConstraintDescription" : "must contain only alphanumberic characters"
  14. },
  15.  
  16. "HashKeyElementType" : {
  17. "Description" : "HashType PrimaryKey Type",
  18. "Type" : "String",
  19. "Default" : "S",
  20. "AllowedPattern" : "[S|N]",
  21. "MinLength": "1",
  22. "MaxLength": "1",
  23. "ConstraintDescription" : "must be either S or N"
  24. },
  25.  
  26. "ReadCapacityUnits" : {
  27. "Description" : "Provisioned read throughput",
  28. "Type" : "Number",
  29. "Default" : "5",
  30. "MinValue": "5",
  31. "MaxValue": "10000",
  32. "ConstraintDescription" : "must be between 5 and 10000"
  33. },
  34.  
  35. "WriteCapacityUnits" : {
  36. "Description" : "Provisioned write throughput",
  37. "Type" : "Number",
  38. "Default" : "10",
  39. "MinValue": "5",
  40. "MaxValue": "10000",
  41. "ConstraintDescription" : "must be between 5 and 10000"
  42. }
  43. },
  44.  
  45. "Resources" : {
  46. "myDynamoDBTable" : {
  47. "Type" : "AWS::DynamoDB::Table",
  48. "Properties" : {
  49. "AttributeDefinitions": [ {
  50. "AttributeName" : {"Ref" : "HashKeyElementName"},
  51. "AttributeType" : {"Ref" : "HashKeyElementType"}
  52. } ],
  53. "KeySchema": [
  54. { "AttributeName": {"Ref" : "HashKeyElementName"}, "KeyType": "HASH" }
  55. ],
  56. "ProvisionedThroughput" : {
  57. "ReadCapacityUnits" : {"Ref" : "ReadCapacityUnits"},
  58. "WriteCapacityUnits" : {"Ref" : "WriteCapacityUnits"}
  59. }
  60. }
  61. }
  62. },
  63.  
  64. "Outputs" : {
  65. "TableName" : {
  66. "Value" : {"Ref" : "myDynamoDBTable"},
  67. "Description" : "Table name of the newly created DynamoDB table"
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement