Clicking vs Declaring

Manual Console Clicking Versus Declarative Infrastructure

Console clicks leave no record, and staging and production drift apart as people click on different days. A script of AWS CLI 24 calls can be reviewed, but it is imperative: each step assumes the state the previous one left, and run twice, aws dynamodb create-table fails with ResourceInUseException. A declarative template states the result and leaves the steps to the engine:

infra/catalog.yaml: BookNest's catalog table, declaredYAML
AWSTemplateFormatVersion: "2010-09-09"
Resources:
  BooksTable:
    Type: AWS::DynamoDB::Table
    Properties:
      TableName: booknest-books
      BillingMode: PAY_PER_REQUEST
      AttributeDefinitions: [{AttributeName: id, AttributeType: N}]
      KeySchema: [{AttributeName: id, KeyType: HASH}]