Skill 3.2.2
Write integration tests and mock APIs for external dependencies
Key Concepts
Integration tests run against real AWS resources in a test environment, for example invoking a deployed API and checking that the expected item appears in DynamoDB. They catch problems unit tests miss, such as wrong IAM permissions or misconfigured triggers.
For external dependencies, API Gateway mock integrations return fixed responses without a backend, which lets front-end and back-end teams work in parallel. In code, libraries such as moto mock AWS services, and DynamoDB Local or LocalStack emulate services on a developer machine.