Dockerizing and deploying a simple API store, where you can GET and POST Pokemon seems like a fun way to learn about the basics of ECS and AWS services!
All code can be found here.
Prerequisites:
Let’s first create a simple DynamoDB database.
First create a new file called “create-table.json”, and paste in the json data below. We’re setting up a table with just two attributes (pokemon name, and pokemon type)
{
“TableName”: “Pokemon”,
“KeySchema”: [
{ “AttributeName”: “name”, “KeyType”: “HASH” },
{ “AttributeName”: “type”, “KeyType”: “RANGE” }
],
“AttributeDefinitions”: [
{ “AttributeName”: “name”, “AttributeType”: “S” },
{ “AttributeName”: “type”, “AttributeType”: “S” }
],
“ProvisionedThroughput”: {
“ReadCapacityUnits”: 5,
“WriteCapacityUnits”: 5
}…