# Erro Missing Authentication Token Exception

**URL:** <https://forum.serverless.com/t/erro-missing-authentication-token-exception/3995>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [March 12, 2018, 8:02pm UTC](https://forum.serverless.com/t/erro-missing-authentication-token-exception/3995 "2018-03-12T20:02:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FernandoCagale](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@FernandoCagale](https://forum.serverless.com/u/FernandoCagale)\
**Post date:** [March 12, 2018, 8:02pm UTC](https://forum.serverless.com/t/erro-missing-authentication-token-exception/3995/1 "2018-03-12T20:02:13Z")

</div>

Hello, I made an example connecting by postgresql, using the console terminal aws it executes, however via terminal I am getting the following error:

> $ curl.exe -I [https://url-api.us-east-1.amazonaws.com/dev/hello-world](https://url-api.us-east-1.amazonaws.com/dev/hello-world)  
> HTTP/2 403  
> content-type: application/json  
> content-length: 42  
> date: Mon, 12 Mar 2018 14:02:15 GMT  
> x-amzn-requestid: f7f98b53-25fd-11e8-beaa-e7723c28b74c  
> x-amzn-errortype: MissingAuthenticationTokenException  
> x-cache: Error from cloudfront  
> via: 1.1 [e37f1f862adcf463c7e5850854dc15a7.cloudfront.net](http://e37f1f862adcf463c7e5850854dc15a7.cloudfront.net) (CloudFront)  
> x-amz-cf-id: hspqX0Dpmu8qT54cdU38EK-fGW6UjiWh3hOBtXGbZ4rK9wZgooRXow==

Browser → {“message”: “Internal server error”}

I do not use any authentication

I’m just listing the data from a table in aws rds with postgres

> service: serverless-hello-world
> 
> plugins:
> 
> - serverless-offline
> 
> provider:  
> name: aws  
> runtime: nodejs6.10
> 
> functions:  
> helloWorld:  
> handler: handler.helloWorld  
> events:  
> - http:  
> path: hello-world  
> method: get  
> cors: true

My handler

> ‘use strict’;
> 
> const Sequelize = require(‘sequelize’);  
> const sequelize = new Sequelize(‘user’, ‘database’, ‘password’, {  
> host: ‘host’,  
> dialect: ‘postgres’  
> });
> 
> const Task = sequelize.define(‘Task’, {  
> title: {  
> type: Sequelize.STRING(120),  
> allowNull: false  
> }  
> }, {  
> createdAt: ‘created\_at’,  
> updatedAt: ‘update\_at’,  
> tableName: ‘task’  
> });
> 
> module.exports.helloWorld = (event, context, callback) =\> {  
> context.callbackWaitsForEmptyEventLoop = false;  
> const model = Task;
> 
> const options = {  
> attributes: [‘id’, ‘title’]  
> };
> 
> model.findAndCountAll(options).then((data) =\> {  
> const response = {  
> statusCode: 200,  
> headers: {  
> ‘Access-Control-Allow-Credentials’ : true  
> },  
> body: data  
> };
> 
> ```
> callback(null, response);
> 
> ```
> 
> }).catch((err) =\> {  
> const response = {  
> statusCode: 500,  
> headers: {  
> ‘Access-Control-Allow-Credentials’ : true  
> },  
> body: err  
> };
> 
> ```
> callback(null, response);
> 
> ```
> 
> });
> 
> };

---

<div class="post-metadata">

**Author:** ![FernandoCagale](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@FernandoCagale](https://forum.serverless.com/u/FernandoCagale)\
**Post date:** [March 14, 2018, 5:58am UTC](https://forum.serverless.com/t/erro-missing-authentication-token-exception/3995/2 "2018-03-14T05:58:40Z")

</div>

service: serverless-hello-world

plugins:

- serverless-offline

provider:  
name: aws  
runtime: nodejs6.10

functions:  
helloWorld:  
handler: handler.helloWorld  
events:  
- http:  
path: hello-world  
method: get  
cors: true
