Auth0 Does not work from inside Docker container + Elastic beanstalk - amazon-web-services

I have developed a golang application using Auth0 for user authentication, I have also developed a frontend app. On my local machine everything works fine. Now I want to deploy the app via docker on AWS elastic beanstalk.
I build my docker image and run it, but Auth0 does not work anymore. I get the following error when I want to validate the authtoken send by a user:
Token is not valid <nil>
Token err: Get https://xxx.eu.auth0.com/.well-known/jwks.json: x509: certificate signed by unknown authority
This happens running the docker image on my local machine as well as on elastic beanstalk. However, if I just run go run main.go, everything works fine.
Any ideas why ? Thanks for your help :)

Check docker image you use for hosting your application. It should include registration for root certificate.
You can find some image that includes that certificate or add them dynamicaly as described in this blog post - https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/

Related

Is there any way to get the DNS address of an instance of an aws ubuntu server if I do not have the login to the aws account, but the SSH key for it

I got a task to deploy a static website on an AWS Ubuntu Server, I was given the username and the SSH key for it. Using PuTTy I got access to the server, setup django, postgres nginx and gunicorn. However now I need to check the progress and whichever tutorial I looked up, I found them checking their deployment progress with a dns address, but since I have connected to the server remotely, I do not have that. So please help me check my deployment status. I am attaching some screenshots of the PuTTy terminal below
Image of the final Gunicorn command to finish the deployment

Flask-WTF "The CSRF tokens do not match" with AWS ECS and ELB

I have followed this guide:
https://manmohan-bohara.medium.com/aws-container-services-part-1-b147e974c745
so have a Flask app, which is dockerised and running on AWS ECS with a load balancer.
If I run the docker locally and submit any forms which use FlaskWTF it works. However, if I use the ELB url on AWS or the underlying EC2 IP address I get an error
The CSRF tokens do not match
I'm not even sure where to begin troubleshooting this? I think it may be caching issue but can't work out where the caching would be.

Docker container runs local, but not on AWS Elastic BeanStalk

I created Docker container with flash and gunicorn. I tested it locally successfully and pushed it without any problems to Docker hub. I also have AWS EB CLI installed so I tested it with eb local run. Everything worked fine.
I used the following link to deploy it on AWS Elastic BeanStalk. When I visit URL of the application, I am getting HTTP ERROR 504. I looked at log file and there are any error messages.
How can I further troubleshoot this issue?

408 timeout error with postgraphile on AWS elastic beanstalk

I'm running postgraphile and apollo to get data for my react app. I am using npm concurrently to run the react server and to run postgraph using the CLI including --cors flag. Everything works fine when i run the app locally. When I upload everything to AWS elastic beanstalk, I can't access app.com:5000/graphiql and the app gives me a 408 timeout error code saying it is a problem with HTTPLink, then tells me there is a cross origin error. If i run the app on AWS and have it point to my localhost:5000/graphiql it works perfectly, but not when it is deployed to AWS. The part that confuses me is that it does not have a cross origin error when it is going from AWS to my localhost, but it does have a cross origin error when it's going from AWS to AWS.
By default PostGraphile binds to localhost; it sounds like you need it to bind to all interfaces. Try the --host 0.0.0.0 option documented here:
https://www.graphile.org/postgraphile/usage-cli/

how to run django application on browser which is hosted on aws

I have created a website based on Django framework. I want to run that website through the amazon aws. I have already created an instance on aws and downloaded the code from git in the instance.
The problem I am now facing is I am not able to understand how to run the website made through django on the browser. I have read some blogs about using nginx but is there a way to do it just with wsgi .
If I directly type the attached ip to the browser with the port, it doesnt show anything. Please help me with the deployment.
Thanks in advance