Error: Missing credentails in config

I am trying to call a create function for a table I created in DynamoDB. When I tried calling it, I got this error:
{ Error: connect EHOSTUNREACH 169…
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
message: ‘Missing credentials in config’,
code: ‘CredentialsError’,
errno: ‘EHOSTUNREACH’,
syscall: ‘connect’,
address: ‘169…’,
port: 80,
time: 2019-03-19T19:40:12.589Z,
originalError:
{ message: ‘Could not load credentials from any providers’,
code: ‘CredentialsError’,
errno: ‘EHOSTUNREACH’,
syscall: ‘connect’,
address: ‘169.254.169.254’,
port: 80,
time: 2019-03-19T19:40:12.589Z,
originalError:
{ code: ‘EHOSTUNREACH’,
errno: ‘EHOSTUNREACH’,
syscall: ‘connect’,
address: ‘169…’,
port: 80,
message: ‘connect EHOSTUNREACH 169.254.169.254:80’ } } }
{
I took out my IP address and just left in 169, but the ip address was correct.
I checked aws/config, and aws/credentials, and both of them are set up correctly. I also tried listing all my s3 buckets from the cli, and that worked, so I know for sure I am connected to my aws account.

I figured it out, when I was inputting the command to run my create file, I was calling “myProfile” instead of “default” and so it was looking for a profile that doesn’t exist.