Implement a secure, serverless data processing pipeline using AWS Lambda and other AWS services to handle sensitive data.
Instruction: Describe how you would architect a serverless data processing pipeline that securely processes and transforms sensitive data, ensuring data encryption, access control, and compliance with data protection regulations.
Updated
Official answer
Start with data classification, permitted processing locations, retention rules and responsible reviewers. Define the data flow and recovery objectives; a combination of AWS products does not by itself establish regulatory compliance.
For a file-processing example, accept uploads into a restricted S3 input location, queue bounded work, and let Lambda read only the approved input and write to a separate output location. Validate file type, size and schema before processing. Use stable object/event identities so duplicate delivery or a crash after writing output does not corrupt results. Prevent output-trigger loops.
Encrypt stored data and protect each network hop with verified TLS. Choose and configure KMS keys according to access, recovery and audit requirements. Bucket/queue policies, execution-role permissions and KMS key permissions must agree; encryption alone does not authorize a request. Manage credentials through a suitable secret store and test rotation.
Minimize sensitive content in events, logs, traces, quarantine records and failure destinations. Those secondary copies need access restrictions, retention and deletion controls too. Configure relevant CloudTrail management/data-event coverage and application-level audit records; CloudTrail and Config do not automatically capture every business action.
Use bounded concurrency and dependency timeouts, monitor failures/backlog, and rehearse denied access, invalid payloads, duplicate events and partial processing. Verify that only authorized operators can replay or recover data. Record evidence for policy/security review and address downstream exports and backups in the retention design.
Lambda execution permissions, S3 integration, secret guidance, CloudTrail data events