can trigger the execution of an AWS Lambda function. Amazon S3 Data Events Database events AWS Kinesis Stream processing events IoT device telemetry signals Code changes and new repository code commits HTTP API calls Message queue events SMS message notifications, PUSH notifications etc.
validity Never pass user input directly to any interpreter without first validating and sanitizing it Make sure that your code always runs with the minimum privileges required to perform its task If you apply threat modeling in your development lifecycle, make sure that you consider all possible event types and entry points into the system. Do not assume that input can only arrive from the expected event trigger
instead of building their own authentication schemes. For non-interactive user authentication, such as APIs, secure API keys, SAML assertions, or Client-Side Certificates should be used. Use of MFA.
set of public APIs, all of which enforce proper authentication. At the other end of the system, the application reads files from a cloud storage service, where file contents are consumed as input to certain lambda functions. If proper authentication is not applied on the cloud storage service, the system is exposing an unauthenticated rogue entry point, which was not taken into consideration during system design.
it to perform unauthorized access, including: Unauthorized actions on the specific bucket, such as reading and/or deleting other users orders or uploading unvalidated files. Deleting other storages in the account, even outside of the feature/application scope. Executing internal functionality, such as executing functions with malicious input which are triggered by events. Denial of Wallet (DoW) via cost-consuming actions. Broken Access Control
function should be a small piece of code that performs a single discrete task. Oftentimes, in order to perform this task, the lambda function will be required to depend on third party software packages, open source libraries and even consume 3rd party remote web services through API calls. Keep in mind that even the most secure lambda function can become vulnerable when importing code from a vulnerable 3rd party dependency.
vulnerable dependencies Remove unnecessary dependencies Use trustworthy sources for 3rd party packages Upgrade to latest package versions and apply patches to ensure security
requests per user or per API key. Apply concurrency limits on Lambda functions to control the maximum number of instances that can run simultaneously, preventing resource exhaustion. Use Firewall to filter the malicious reuests
Configs Minimize Function Roles Ensure Secure Dependencies Monitoring and Logging Best Practices Dealing with Insecure Authentication Secure Credentials Management Secure Development Lifecycle Incident Response Plan