Skip to content

Conversation

@dfriveros11
Copy link

Description

This PR fixes two issues in Lab3:

  1. X-Ray tracing not capturing AWS SDK calls: Added tracer.patch(['boto3']) to ProductService and OrderService to enable X-Ray tracing of DynamoDB operations
  2. Authorizer failing with missing module: Added python-jose[cryptography] to layer requirements to fix the "No module named 'jose'" error

Changes

  • Added boto3 patching in Lab3/server/ProductService/product_service.py
  • Added boto3 patching in Lab3/server/OrderService/order_service.py
  • Added python-jose[cryptography] to Lab3/server/layers/requirements.txt

Testing

  • Deployed to AWS and verified X-Ray traces now show DynamoDB operations
  • Verified authorizer no longer throws import errors
  • Confirmed products list API returns 200 instead of 500

Impact

  • X-Ray traces now include complete request flow with DynamoDB timing
  • Authorizer functions correctly, allowing authenticated API access

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Diego Riveros and others added 3 commits January 7, 2026 19:56
…dmin

- Add TenantAdminEmailParameter to cognito.yaml and shared-template.yaml
- Create CognitoTenantAdminUser automatically during deployment in PooledTenant user pool
- Add CognitoTenantAdminUserGroup for tenant admins
- Update deployment.sh to accept -e flag for admin email and -te flag for tenant admin email
- Both users receive temporary passwords via Cognito email on deployment
- System Admin user: username 'admin' in OperationUsers pool
- Tenant Admin user: username 'tenant-admin-default' in PooledTenant pool with tenantId 'default-tenant'

This allows immediate access to both Admin UI and Application UI without manual tenant registration.
…jose dependency

Enable X-Ray tracing of AWS SDK calls by patching boto3 in both
ProductService and OrderService. This allows DynamoDB operations
to appear in X-Ray traces with timing and error information.

Add python-jose[cryptography] to layer requirements to fix
authorizer import error that was causing 500 responses.
Forgot to leave the TODO in line 44 without the answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant