Jarek Pietraszek
10/18/2021, 7:50 AMJarek Pietraszek
10/18/2021, 7:50 AMAuthenticating with User Pool
Getting temporary credentials
Making API request
getaddrinfo ENOTFOUND <http://myapiaddress.execute-api.us-east-1.amazonaws.com|myapiaddress.execute-api.us-east-1.amazonaws.com>
Jarek Pietraszek
10/18/2021, 7:51 AMJarek Pietraszek
10/18/2021, 7:52 AMAn error occurred (ResourceNotFoundException) when calling the ListUsers operation: User pool us-east-1_Zxk5GzdPn does not exist.
Jarek Pietraszek
10/18/2021, 7:52 AMJarek Pietraszek
10/18/2021, 7:53 AMStack admin-notes-auth
Status: no changes
Outputs:
IdentityPoolId: us-east-1:ac536b89-e80e-47e2-a046-7b0c441fd70c
Region: us-east-1
UserPoolClientId: 5leqtmeo0p4a3j6oeijli78gkq
UserPoolId: us-east-1_Zxk5GzdPn
Ross Coundon
10/18/2021, 8:01 AMJarek Pietraszek
10/18/2021, 8:03 AMJarek Pietraszek
10/18/2021, 8:04 AMRoss Coundon
10/18/2021, 8:09 AMJarek Pietraszek
10/18/2021, 8:13 AMmanitej
10/18/2021, 8:16 AMsst.json
file?Jarek Pietraszek
10/18/2021, 8:17 AMJarek Pietraszek
10/18/2021, 8:18 AMJarek Pietraszek
10/18/2021, 8:20 AMRoss Coundon
10/18/2021, 8:21 AMsst remove
then redeploy making sure you're setting the correct AWS_PROFILE and region, maybe specify directly using --region us-east-1
Jarek Pietraszek
10/18/2021, 9:36 AMsst remove
and I wasn't able to redeploy before manually removing all buckets, S3 tables and CloudFormation stacks. I did that and then always added --region us-east-1
after the sst start
and sst deploy
commands. It's exactly the same I am still able to create a new user, then verify their email. But no luck adding a note or getting a user list from Cognito 😕Jarek Pietraszek
10/18/2021, 9:37 AM$ npx aws-api-gateway-cli-test --username='<mailto:admin@example.com|admin@example.com>' --password='Passw0rd!' --user-pool-id='us-east-1_YHwOj0uvJ' --app-client-id='261540hsf5ligu83006vokp20f' --cognito-region='us-east-1' --identity-pool-id='us-east-1:732ef2a5-cde3-472e-85cd-449dbaa25cc3' --invoke-url='<https://hqijyz1iof.execute-api.us-east-1.amazonaws.com>' --api-gateway-region='API_REGION' --path-template='/notes' --method='POST' --body='{"content":"hello world","attachment":"hello.jpg"}'
Authenticating with User Pool
Getting temporary credentials
Making API request
getaddrinfo ENOTFOUND hqijyz1iof.execute-api.us-east-1.amazonaws.comc
Jarek Pietraszek
10/18/2021, 9:41 AM$ aws cognito-idp list-users --user-pool-id us-east-1_YHwOj0uvJ
An error occurred (ResourceNotFoundException) when calling the ListUsers operation: User pool us-east-1_YHwOj0uvJ does not exist.
Ross Coundon
10/18/2021, 9:42 AMJarek Pietraszek
10/18/2021, 9:43 AMRoss Coundon
10/18/2021, 9:45 AMRoss Coundon
10/18/2021, 9:46 AM~/.aws/credentials
Ross Coundon
10/18/2021, 9:46 AMJarek Pietraszek
10/18/2021, 9:47 AMJarek Pietraszek
10/18/2021, 9:49 AMJarek Pietraszek
10/18/2021, 9:49 AM$ aws cognito-idp sign-up --region us-east-1 --client-id 261540hsf5ligu83006vokp20f --username <mailto:admin@example.com|admin@example.com> --password Passw0rd!
{
"UserConfirmed": false,
"CodeDeliveryDetails": {
"Destination": "a***@e***.com",
"DeliveryMedium": "EMAIL",
"AttributeName": "email"
},
"UserSub": "42fcd64c-b31c-452f-b5aa-2f7563e498fc"
}
Ross Coundon
10/18/2021, 9:54 AMJarek Pietraszek
10/18/2021, 9:57 AMRoss Coundon
10/18/2021, 10:00 AMJarek Pietraszek
10/18/2021, 10:02 AMJarek Pietraszek
10/18/2021, 10:04 AMJarek Pietraszek
10/18/2021, 10:05 AMRoss Coundon
10/18/2021, 10:16 AMJarek Pietraszek
10/18/2021, 10:17 AMRoss Coundon
10/18/2021, 11:00 AMChad (cysense)
10/18/2021, 11:59 AMaws cognito-idp list-users --user-pool-id us-east-1_YHwOj0uvJ --region us-east-1
Jarek Pietraszek
10/18/2021, 12:00 PMJarek Pietraszek
10/18/2021, 12:01 PMChad (cysense)
10/18/2021, 12:01 PMChad (cysense)
10/18/2021, 12:01 PMJarek Pietraszek
10/18/2021, 12:01 PMChad (cysense)
10/18/2021, 12:02 PMChad (cysense)
10/18/2021, 12:02 PMJarek Pietraszek
10/18/2021, 12:15 PMlist-users
works now flawlessly even without specifying the region, however I'm still facing this issue where I can't add a note. The command works on MacOS, I use GitBash on Windows and it doesn't. What gives?Chad (cysense)
10/18/2021, 12:17 PMJarek Pietraszek
10/18/2021, 12:18 PM$ npx aws-api-gateway-cli-test --username='<mailto:admin@example.com|admin@example.com>' --password='Passw0rd!' --user-pool-id='us-east-1_YHwOj0uvJ' --app-client-id='261540hsf5ligu83006vokp20f' --cognito-region='us-east-1' --identity-pool-id='us-east-1:732ef2a5-cde3-472e-85cd-449dbaa25cc3' --invoke-url='<https://hqijyz1iof.execute-api.us-east-1.amazonaws.com>' --api-gateway-region='API_REGION' --path-template='/notes' --method='POST' --body='{"content":"hello","attachment":"hello.jpg"}'
Jarek Pietraszek
10/18/2021, 12:19 PMJarek Pietraszek
10/18/2021, 12:19 PMJarek Pietraszek
10/18/2021, 12:19 PMAuthenticating with User Pool
Getting temporary credentials
Making API request
getaddrinfo ENOTFOUND hqijyz1iof.execute-api.us-east-1.amazonaws.comc
Chad (cysense)
10/18/2021, 12:20 PM--api-gateway-region='API_REGION'
should this not be (not familiar with this command):
--api-gateway-region='us-east-1'
Chad (cysense)
10/18/2021, 12:20 PMJarek Pietraszek
10/18/2021, 12:21 PMJarek Pietraszek
10/18/2021, 12:22 PMJarek Pietraszek
10/18/2021, 12:23 PMChad (cysense)
10/18/2021, 12:24 PM<https://hqijyz1iof.execute-api.us-east-1.amazonaws.com/>
can you reach it?Jarek Pietraszek
10/18/2021, 12:25 PMJarek Pietraszek
10/18/2021, 12:25 PMJarek Pietraszek
10/18/2021, 12:29 PMJarek Pietraszek
10/18/2021, 12:30 PMChad (cysense)
10/18/2021, 12:30 PMChad (cysense)
10/18/2021, 12:30 PMJarek Pietraszek
10/18/2021, 12:30 PMChad (cysense)
10/18/2021, 12:31 PMJarek Pietraszek
10/18/2021, 12:31 PM<http://vadata-ic333118-ash-b2.ip.twelve99-cust.net|vadata-ic333118-ash-b2.ip.twelve99-cust.net> [62.115.11.183]
that's as far as it'll goJarek Pietraszek
10/18/2021, 12:33 PM/note
route with my browser, which should give me my (user's) notes list, but I'm not logged in obviously.Jarek Pietraszek
10/18/2021, 12:35 PMChad (cysense)
10/18/2021, 12:37 PMcurl <https://hqijyz1iof.execute-api.us-east-1.amazonaws.com/notes>
return forbidden?Jarek Pietraszek
10/18/2021, 12:37 PMChad (cysense)
10/18/2021, 12:39 PMChad (cysense)
10/18/2021, 12:40 PMJarek Pietraszek
10/18/2021, 12:53 PM"
in the JSON and it was a pain in my spine. But it worked eventually