Dynamodb local unable to create and add items in it while using docker-compose.yml

Unable to create a docker-compose.yml that could create a table in dynamodb and add items.

tried with multiple configurations, still no luck

Can anyone help with a docker-compose.yml script that could create dynamodb tables locally and add items in it.

Used ChatGPT and google Gimini for the script. no use.