How to add Custom Permissions to your Drupal 8 module

In order to add custom permissions we used to use hook_permission in Drupal 7, however in Drupal 8 this is done through the yourmodulename.permissions.yml file

Here is an example of what the file should look like

administer commerce_amazon_slider:
  title: 'Administer Commerce Amazon Slider'
  description: 'View, edit and update Commerce Amazon Slider configurations'