Functions sometimes rely on external services from Amazon such as S3. 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.
Requirements
- Create an IAM role on your AWS account and attach policies with the relevant permissions.
- A Spotinst role will be generated and linked to your AWS role
- Only one Spotinst role per function.
- Multiple functions can be associated with the same Spotinst role.
YML
functions: example: runtime: nodejs8.3 handler: handler.main memory: 128 timeout: 30 access: private iamRoleConfig: roleId: ${role-id}
Parameters
roleId
: the role created on the Spotinst console- ex : sfr-5ea76784