573 List of reserved keywords in AWS DynamoDB


AWS DynamoDB reserved Keywords List

Like any other programming language or database, AWS DynamoDB also has a list of keywords that are reserved.

If you make use of them you will get an ValidationException error.

Error: ValidationException: Invalid KeyConditionExpression: 

Attribute CLOSE is a reserved keyword

How to make use of the reserved keywords

If you need to make use of the reserved keywords as an attribute name in your expression, you can replace the reserved keyword with #(some character) and add an expression "expression-attribute-names" as shown below.

aws dynamodb get-item \
    --table-name InventoryMaster \
    --key '{"Id":{"N":"489282"}}' \
    --projection-expression "GENERAL"
aws dynamodb get-item \
     --table-name InventoryMaster \
     --key '{"Id":{"N":"123"}}' \
     --projection-expression "#g" \
     --expression-attribute-names '{"#c":"GENERAL"}'

Lis of reserved keywords

  1. ABORT
  2. ABSOLUTE
  3. ACTION
  4. ADD
  5. AFTER
  6. AGENT
  7. AGGREGATE
  8. ALL
  9. ALLOCATE
  10. ALTER
  11. ANALYZE
  12. AND
  13. ANY
  14. ARCHIVE
  15. ARE
  16. ARRAY
  17. AS
  18. ASC
  19. ASCII
  20. ASENSITIVE
  21. ASSERTION
  22. ASYMMETRIC
  23. AT
  24. ATOMIC
  25. ATTACH
  26. ATTRIBUTE
  27. AUTH
  28. AUTHORIZATION
  29. AUTHORIZE
  30. AUTO
  31. AVG
  32. BACK
  33. BACKUP
  34. BASE
  35. BATCH
  36. BEFORE
  37. BEGIN
  38. BETWEEN
  39. BIGINT
  40. BINARY
  41. BIT
  42. BLOB
  43. BLOCK
  44. BOOLEAN
  45. BOTH
  46. BREADTH
  47. BUCKET
  48. BULK
  49. BY
  50. BYTE
  51. CALL
  52. CALLED
  53. CALLING
  54. CAPACITY
  55. CASCADE
  56. CASCADED
  57. CASE
  58. CAST
  59. CATALOG
  60. CHAR
  61. CHARACTER
  62. CHECK
  63. CLASS
  64. CLOB
  65. CLOSE
  66. CLUSTER
  67. CLUSTERED
  68. CLUSTERING
  69. CLUSTERS
  70. COALESCE
  71. COLLATE
  72. COLLATION
  73. COLLECTION
  74. COLUMN
  75. COLUMNS
  76. COMBINE
  77. COMMENT
  78. COMMIT
  79. COMPACT
  80. COMPILE
  81. COMPRESS
  82. CONDITION
  83. CONFLICT
  84. CONNECT
  85. CONNECTION
  86. CONSISTENCY
  87. CONSISTENT
  88. CONSTRAINT
  89. CONSTRAINTS
  90. CONSTRUCTOR
  91. CONSUMED
  92. CONTINUE
  93. CONVERT
  94. COPY
  95. CORRESPONDING
  96. COUNT
  97. COUNTER
  98. CREATE
  99. CROSS
  100. CUBE
  101. CURRENT
  102. CURSOR
  103. CYCLE
  104. DATA
  105. DATABASE
  106. DATE
  107. DATETIME
  108. DAY
  109. DEALLOCATE
  110. DEC
  111. DECIMAL
  112. DECLARE
  113. DEFAULT
  114. DEFERRABLE
  115. DEFERRED
  116. DEFINE
  117. DEFINED
  118. DEFINITION
  119. DELETE
  120. DELIMITED
  121. DEPTH
  122. DEREF
  123. DESC
  124. DESCRIBE
  125. DESCRIPTOR
  126. DETACH
  127. DETERMINISTIC
  128. DIAGNOSTICS
  129. DIRECTORIES
  130. DISABLE
  131. DISCONNECT
  132. DISTINCT
  133. DISTRIBUTE
  134. DO
  135. DOMAIN
  136. DOUBLE
  137. DROP
  138. DUMP
  139. DURATION
  140. DYNAMIC
  141. EACH
  142. ELEMENT
  143. ELSE
  144. ELSEIF
  145. EMPTY
  146. ENABLE
  147. END
  148. EQUAL
  149. EQUALS
  150. ERROR
  151. ESCAPE
  152. ESCAPED
  153. EVAL
  154. EVALUATE
  155. EXCEEDED
  156. EXCEPT
  157. EXCEPTION
  158. EXCEPTIONS
  159. EXCLUSIVE
  160. EXEC
  161. EXECUTE
  162. EXISTS
  163. EXIT
  164. EXPLAIN
  165. EXPLODE
  166. EXPORT
  167. EXPRESSION
  168. EXTENDED
  169. EXTERNAL
  170. EXTRACT
  171. FAIL
  172. FALSE
  173. FAMILY
  174. FETCH
  175. FIELDS
  176. FILE
  177. FILTER
  178. FILTERING
  179. FINAL
  180. FINISH
  181. FIRST
  182. FIXED
  183. FLATTERN
  184. FLOAT
  185. FOR
  186. FORCE
  187. FOREIGN
  188. FORMAT
  189. FORWARD
  190. FOUND
  191. FREE
  192. FROM
  193. FULL
  194. FUNCTION
  195. FUNCTIONS
  196. GENERAL
  197. GENERATE
  198. GET
  199. GLOB
  200. GLOBAL
  201. GO
  202. GOTO
  203. GRANT
  204. GREATER
  205. GROUP
  206. GROUPING
  207. HANDLER
  208. HASH
  209. HAVE
  210. HAVING
  211. HEAP
  212. HIDDEN
  213. HOLD
  214. HOUR
  215. IDENTIFIED
  216. IDENTITY
  217. IF
  218. IGNORE
  219. IMMEDIATE
  220. IMPORT
  221. IN
  222. INCLUDING
  223. INCLUSIVE
  224. INCREMENT
  225. INCREMENTAL
  226. INDEX
  227. INDEXED
  228. INDEXES
  229. INDICATOR
  230. INFINITE
  231. INITIALLY
  232. INLINE
  233. INNER
  234. INNTER
  235. INOUT
  236. INPUT
  237. INSENSITIVE
  238. INSERT
  239. INSTEAD
  240. INT
  241. INTEGER
  242. INTERSECT
  243. INTERVAL
  244. INTO
  245. INVALIDATE
  246. IS
  247. ISOLATION
  248. ITEM
  249. ITEMS
  250. ITERATE
  251. JOIN
  252. KEY
  253. KEYS
  254. LAG
  255. LANGUAGE
  256. LARGE
  257. LAST
  258. LATERAL
  259. LEAD
  260. LEADING
  261. LEAVE
  262. LEFT
  263. LENGTH
  264. LESS
  265. LEVEL
  266. LIKE
  267. LIMIT
  268. LIMITED
  269. LINES
  270. LIST
  271. LOAD
  272. LOCAL
  273. LOCALTIME
  274. LOCALTIMESTAMP
  275. LOCATION
  276. LOCATOR
  277. LOCK
  278. LOCKS
  279. LOG
  280. LOGED
  281. LONG
  282. LOOP
  283. LOWER
  284. MAP
  285. MATCH
  286. MATERIALIZED
  287. MAX
  288. MAXLEN
  289. MEMBER
  290. MERGE
  291. METHOD
  292. METRICS
  293. MIN
  294. MINUS
  295. MINUTE
  296. MISSING
  297. MOD
  298. MODE
  299. MODIFIES
  300. MODIFY
  301. MODULE
  302. MONTH
  303. MULTI
  304. MULTISET
  305. NAME
  306. NAMES
  307. NATIONAL
  308. NATURAL
  309. NCHAR
  310. NCLOB
  311. NEW
  312. NEXT
  313. NO
  314. NONE
  315. NOT
  316. NULL
  317. NULLIF
  318. NUMBER
  319. NUMERIC
  320. OBJECT
  321. OF
  322. OFFLINE
  323. OFFSET
  324. OLD
  325. ON
  326. ONLINE
  327. ONLY
  328. OPAQUE
  329. OPEN
  330. OPERATOR
  331. OPTION
  332. OR
  333. ORDER
  334. ORDINALITY
  335. OTHER
  336. OTHERS
  337. OUT
  338. OUTER
  339. OUTPUT
  340. OVER
  341. OVERLAPS
  342. OVERRIDE
  343. OWNER
  344. PAD
  345. PARALLEL
  346. PARAMETER
  347. PARAMETERS
  348. PARTIAL
  349. PARTITION
  350. PARTITIONED
  351. PARTITIONS
  352. PATH
  353. PERCENT
  354. PERCENTILE
  355. PERMISSION
  356. PERMISSIONS
  357. PIPE
  358. PIPELINED
  359. PLAN
  360. POOL
  361. POSITION
  362. PRECISION
  363. PREPARE
  364. PRESERVE
  365. PRIMARY
  366. PRIOR
  367. PRIVATE
  368. PRIVILEGES
  369. PROCEDURE
  370. PROCESSED
  371. PROJECT
  372. PROJECTION
  373. PROPERTY
  374. PROVISIONING
  375. PUBLIC
  376. PUT
  377. QUERY
  378. QUIT
  379. QUORUM
  380. RAISE
  381. RANDOM
  382. RANGE
  383. RANK
  384. RAW
  385. READ
  386. READS
  387. REAL
  388. REBUILD
  389. RECORD
  390. RECURSIVE
  391. REDUCE
  392. REF
  393. REFERENCE
  394. REFERENCES
  395. REFERENCING
  396. REGEXP
  397. REGION
  398. REINDEX
  399. RELATIVE
  400. RELEASE
  401. REMAINDER
  402. RENAME
  403. REPEAT
  404. REPLACE
  405. REQUEST
  406. RESET
  407. RESIGNAL
  408. RESOURCE
  409. RESPONSE
  410. RESTORE
  411. RESTRICT
  412. RESULT
  413. RETURN
  414. RETURNING
  415. RETURNS
  416. REVERSE
  417. REVOKE
  418. RIGHT
  419. ROLE
  420. ROLES
  421. ROLLBACK
  422. ROLLUP
  423. ROUTINE
  424. ROW
  425. ROWS
  426. RULE
  427. RULES
  428. SAMPLE
  429. SATISFIES
  430. SAVE
  431. SAVEPOINT
  432. SCAN
  433. SCHEMA
  434. SCOPE
  435. SCROLL
  436. SEARCH
  437. SECOND
  438. SECTION
  439. SEGMENT
  440. SEGMENTS
  441. SELECT
  442. SELF
  443. SEMI
  444. SENSITIVE
  445. SEPARATE
  446. SEQUENCE
  447. SERIALIZABLE
  448. SESSION
  449. SET
  450. SETS
  451. SHARD
  452. SHARE
  453. SHARED
  454. SHORT
  455. SHOW
  456. SIGNAL
  457. SIMILAR
  458. SIZE
  459. SKEWED
  460. SMALLINT
  461. SNAPSHOT
  462. SOME
  463. SOURCE
  464. SPACE
  465. SPACES
  466. SPARSE
  467. SPECIFIC
  468. SPECIFICTYPE
  469. SPLIT
  470. SQL
  471. SQLCODE
  472. SQLERROR
  473. SQLEXCEPTION
  474. SQLSTATE
  475. SQLWARNING
  476. START
  477. STATE
  478. STATIC
  479. STATUS
  480. STORAGE
  481. STORE
  482. STORED
  483. STREAM
  484. STRING
  485. STRUCT
  486. STYLE
  487. SUB
  488. SUBMULTISET
  489. SUBPARTITION
  490. SUBSTRING
  491. SUBTYPE
  492. SUM
  493. SUPER
  494. SYMMETRIC
  495. SYNONYM
  496. SYSTEM
  497. TABLE
  498. TABLESAMPLE
  499. TEMP
  500. TEMPORARY
  501. TERMINATED
  502. TEXT
  503. THAN
  504. THEN
  505. THROUGHPUT
  506. TIME
  507. TIMESTAMP
  508. TIMEZONE
  509. TINYINT
  510. TO
  511. TOKEN
  512. TOTAL
  513. TOUCH
  514. TRAILING
  515. TRANSACTION
  516. TRANSFORM
  517. TRANSLATE
  518. TRANSLATION
  519. TREAT
  520. TRIGGER
  521. TRIM
  522. TRUE
  523. TRUNCATE
  524. TTL
  525. TUPLE
  526. TYPE
  527. UNDER
  528. UNDO
  529. UNION
  530. UNIQUE
  531. UNIT
  532. UNKNOWN
  533. UNLOGGED
  534. UNNEST
  535. UNPROCESSED
  536. UNSIGNED
  537. UNTIL
  538. UPDATE
  539. UPPER
  540. URL
  541. USAGE
  542. USE
  543. USER
  544. USERS
  545. USING
  546. UUID
  547. VACUUM
  548. VALUE
  549. VALUED
  550. VALUES
  551. VARCHAR
  552. VARIABLE
  553. VARIANCE
  554. VARINT
  555. VARYING
  556. VIEW
  557. VIEWS
  558. VIRTUAL
  559. VOID
  560. WAIT
  561. WHEN
  562. WHENEVER
  563. WHERE
  564. WHILE
  565. WINDOW
  566. WITH
  567. WITHIN
  568. WITHOUT
  569. WORK
  570. WRAPPED
  571. WRITE
  572. YEAR
  573. ZONE

Note: These reserved keywords are not case-sensitive is a important point to remember.

-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap