Module D07: Services
Track: D3 · Services & providers · Effort: 2 h · Prowler: 5.48
Scenario
Two requests reach you at Cloudsmiths. First, the follow-up you logged in Module D03: when the scanning role lacks s3:GetBucketTagging, the S3 service stores tags = [] and s3_bucket_owner_tag_present reports a misleading FAIL. Your Module D06 test records that gap as a strict xfail. Second, the data team runs nightly jobs on EventBridge Scheduler, a service Prowler does not cover at all. In this module you learn how services fetch and model cloud resources, then fix the S3 service with a tagging_retrieved flag and scaffold a brand-new service with a client, a check and tests.
Learning objectives
- Describe the role of a service, its base class per provider, and the
<service>_clientsingleton that checks import. - Use the AWS, Azure and GCP threading helpers and regional clients to fan out API calls.
- Model resources with pydantic
BaseModels and store them in containers keyed for fast lookup. - Apply Prowler's error handling, logging, pagination and
audit_resourcesfiltering conventions. - Add a new attribute to an existing service and consume it from a check.
- Scaffold a new service (
__init__.py,<service>_service.py,<service>_client.py), verify it with--list-services, and test it.
Regístrate para leer el módulo completo
El temario y el resumen de cada módulo son públicos. Crea una cuenta gratuita para desbloquear las lecciones completas, los laboratorios, las comprobaciones de conocimientos y el examen final, y para seguir tu progreso.