Testing the implementation

Testing the implementation

  1. Switch back to the productsservice project. Package the project into a JAR using Gradle.

Architect

  1. Open the Dockerfile and create an image tag named productsservice:1.3.0.

Architect

  1. Once the Docker image build is complete, push it to the ECR Repository with a remote tag of 1.3.0.

Architect

  1. Return to the FCJ2024_CDK project and update the image tag in fargateTaskDefinition.addContainer to 1.3.0.

Architect

  1. Deploy the service using the following command:
cdk deploy --all --require-approval never

Architect

  1. After completing the deployment, access the ECS interface and select Task. Then choose any task from the running tasks.

Architect

  1. In the selected task interface, you can see a sidecar container named XRayProductsService running alongside the productsService container.

Architect

  1. Next, we will test the API in Postman to measure the AWS ECS service using AWS X-Ray.

Architect

  1. Access the CloudWatch interface and select Trace Map to view the request path.

Architect

  1. Finally, to view ECS measurement information, select the ECS icon on the trace map.

Architect

  1. Similarly, with DynamoDB.

Architect