AWS cognito logging out with Streamlit (python) - amazon-web-services

I built a simple application using Streamlit (python) and AWS Cognito. I managed to set up a user pool and access to the application through an application load balancer and Fargate.
However, although logging in is no problem, I'm struggling trying to figure out how to actually log out. I found the following documentation: https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html. I assumed that entering https://<my-application>.ca-central-1.elb.amazonaws.com/logout?client_id=xxxxxxxxxxxxxxxxxx&logout_uri=https://myclient/logout/ in the address bar would result in a logout, but I just get a 404 response?
Any help would be greatly appreciated.

Related

Getting 403 while i try to access Cloudrun URL through browser

I am trying to setup a python app on GCP Cloudrun I need only authenticated users to be able to access the Cloudrun URL but I am facing 403 issue when I set up this app. Is there any alternative way to access the Cloudrun instance using browser provided it is configured to allow only authenticated users?
This is the flow which i am trying to implement :
HTTP(S) Load balancer -> Frontend forwarding rule -> Cloudrun Backend -> Python app deployed on Cloudrun
I have saw few other questions and tried that solution but it does not work few such similar questions would be :
403 "Error: Forbidden" when opening the URL of my Cloud Run service
If you're currently getting 403, it means you don't have the necessary permission to access the service (the App was deployed to cloud with the option to use 'authenticated' invocation which means you can't access it by directly typing the URL in the browser). You can do any of the following
Generate a token and then use curl to invoke your url using that token. See Google Documentation on this and a more detailed explanation from Google here. But you can't be doing this each time you wish to invoke the service. It's more for testing.
Update: The solution below was to allow him to actually see the App run in the browser but reread the question and see that OP wants only authenticated users to access the App.
2. Redeploy the App to Cloud Run but make sure you choose the option to allow for 'unauthenticated invocation'. See step 3.iv of this [blog article][3] we wrote on deploying to cloud run
After trying out IAP as said by #guillaumeblaquiere i was able to fix this issue. Thanks a lot as there is ver less documentation on how to fix this i have recorded steps that i implemented to fix this issue :
Accessing applications on Authenticated Cloud Run using IAP

Can I use fire base to host my flutter web app while still using AWS amplify for Cognito and DataStore

Hi I was wondering if it was possible to host my flutter Web app on Firebase while using AWS Amplify for its DataStore and Cognito services or does AWS NOT support Flutter Web at all yet. Im having issues hosting it on Amplify and was wondering if there were any solutions.
After you build it, a Flutter web app is just a bunch of HTML and JavaScript, so you can serve it from any hosting platform. And once the JavaScript runs in the browser, it can connect to any service.
If you're having trouble making something work, we can typically help better if you show us the minimal information that is needed to reproduce where you are stuck.

How do I connect my AWS Cloudfront deployed sign-in page to AWS Cognito?

I want to create a user pool for the purposes of requiring authentication on my website. I have a website deployed using CloudFront. I have one hosted zone for this website on Route 53. I have tried setting up a Cognito, but I have been unsuccessful.
During the set up process, it asks for the app name. I can not figure out if this is asking for an existing app name or if I need to make one up. The significance of this step is not clear. Another step in the process has me enter the domain name, either an Amazon Cognito domain, or my own custom domain. I tried using an Amazon Cognito domain, but after following the AWS documentation and visiting my new domain, I only saw an error message.
I wish to connect a pre-existing, and pre-deployed website with its own sign-in page to AWS Cognito, but I cannot find any solid guides on how to do so. Any help would be greatly appreciated.
After much searching and reading through numerous posts and documentation, I found the answer to my questions. I ended up following an AWS GitHub Wiki to set up the authentication flow.
The Route 53 service ended up not being relevant for this task. Amplify is not required. The name of the Cognito app was not significant, it only gives the user pool an app name. On the AWS side, I had to create my own user pool following this AWS doc. On the website side, I had to create a user and a user pool in JavaScript using the SDK described in the linked wiki.
The wiki lists different ways to install and include the Cognito SDK within a JavaScript project. The configuration steps needed to be tweaked slightly to fit within the framework I am using. Numerous use cases are covered.

Where do i deploying my Model Building API code in aws LEX

i am noobie to AWS, i have a question!? where do i deploy this API code? i am not sure on and how to deploy the API code that is been created.
I am trying to download the chat logs for LEX bot.
I am following this documentation https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-configure.html. can someone help me figure out where do i write the API request that is given in the documentation.
You deploy code to whichever server/service you're using, it's all upto you.
Lex is a service that you interact with either through the console, the SDK or via the CLI.

Why cloud endpoints dashboard is never getting updated with 'request' metrics?

I setup cloud endpoints on GKE. I enabled JWT Auth with google service accounts.
API is working fine. It needs the JWT passed in Authentication header. It doesn't allow expired JWT all are working as expected. Except the dashboard on GCP shows nothing. It shows 0 requests. 0 requests/s.
I tried to check logs on stackdriver. It's empty :(
Apparently i need 10 reputations to show this image embedded in the question. Sorry for inconvenience
https://i.imgur.com/JaqJ0sp.png
Started to work after enabling the Google Cloud Endpoints API in the API console