-
Install the AWS CLI tool.
-
Setup the AWS CLI credentials with administrator acccess (Access Key ID, Access Key Secret and Region).
aws configure
-
Deploy the cloudformation template
aws cloudformation deploy --template-file cloudformation.yaml --stack-name lcr
-
Check the deployment
aws cloudformation describe-stacks --stack-name lcr { "Stacks": [ { "StackId": "arn:aws:cloudformation:us-east-1:905802233663:stack/lcr/3e9b2320-db04-11ed-b682-0a41fe0ace1b", "StackName": "lcr", "ChangeSetId": "arn:aws:cloudformation:us-east-1:905802233663:changeSet/awscli-cloudformation-package-deploy-1681516020/1def64ad-6713-439b-88da-5f707fea663a", "Description": "Creating DynamoDB tables with CloudFormation", "CreationTime": "2023-04-14T20:37:59.636000+00:00", "LastUpdatedTime": "2023-04-14T23:47:12.385000+00:00", "RollbackConfiguration": {}, "StackStatus": "UPDATE_COMPLETE", "DisableRollback": false, "NotificationARNs": [], "Outputs": [ { "OutputKey": "Player", "OutputValue": "Player", "Description": "Player table" }, { "OutputKey": "Game", "OutputValue": "Game", "Description": "Game table" } ], "Tags": [], "EnableTerminationProtection": false, "DriftInformation": { "StackDriftStatus": "NOT_CHECKED" } } ] }
-
Install proyect dependencies in each subproject.
cd lcr-client npm i
cd lcr-service npm i
-
Create 2 .env file in each one of the 2 sub projects.
touch lcr-client/.env touch lcr-client/.env
.env
REDIS_URL="redis://redis:6379" AWS_REGION= <aws_region> AWS_ACCESS_KEY= <aws_access_key_secret> AWS_KEY_ID= <aws_access_key_id> AWS_SQS_QUEUE= <aws_queue_url>
-
Open 2 terminal instances.
-
Build and run the client application.
docker-compose build docker-compose run app
-
Build and run the service application.
npm run build npm run start