# serverless.yml service: products-service provider: name: aws runtime: nodejs6.10 functions: getProduct: handler: handler.getProduct events: - http: path: product/{id} method: get cors: true # <-- CORS! createProduct: handler: handler.createProduct events: - http: path: product method: post cors: true # <-- CORS!