DEV Community

Discussion on: Build a file upload service with NodeJS, Typescript, Clean Architecture and AWS S3

Collapse
 
ttnsgn profile image
ttnsgn

Trying to upload file via postman POST to endpoint localhost:5000/upload/
got below error, any hint on what I probably missed?

error Error: connect EHOSTUNREACH 169.254.169.254:80
at TCPConnectWrap.afterConnect as oncomplete {
message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1',
errno: -113,
code: 'CredentialsError',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2021-07-15T02:02:31.478Z,
originalError: {
message: 'Could not load credentials from any providers',
errno: -113,
code: 'CredentialsError',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2021-07-15T02:02:31.478Z,
originalError: {
message: 'EC2 Metadata roleName request returned error',
errno: -113,
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2021-07-15T02:02:31.478Z,
originalError: [Object]
}
}
}