Spotinst Functions - IAM roles

Functions sometimes rely on outside services from Amazon such as S3, and accessing these resources often requires authorization using IAM. Spotinst Functions can be configured with the relevant permissions with the inclusion of IAM role information in the serverless.yml file. See Amazon's documentation for more information on IAM roles.


  • You will need to create an IAM role on your AWS account and attach policies with the relevant permissions.
  • A spotinst role will be generated and linked with your AWS role
  • Only one Spotinst role per function.
  • Multiple functions can be associated with the same Spotinst role.


    runtime: nodejs8.3
    handler: handler.main
    memory: 128
    timeout: 30
    access: private
      roleId: ${role-id}


  • roleId: the role created on the console
    • ex : sfr-5ea76784

For more information on how to set up IAM roles, check out our documentation here

Go to Github