text: Logging and debugging go hand in hand. Traces of events are available with Amazon X-Ray for 
  
  debugging. 
  
  **Securing functions**
  
  AWS Identity and Access Management (IAM) is the service used to manage access to AWS services. 
  
  Lambda is fully integrated with IAM, allowing you to control precisely what each Lambda function 
  
  can do within the AWS Cloud. There are two important things that deﬁne the scope of permissions 
  
  in Lambda functions: 
  
  •*resource policy*: Deﬁnes which events are authorized to invoke the function. 
  
  •*execution role policy*: Limits what the Lambda function is authorized to do. 