Setting up (Confluence) Data Center on AWS

We’ve followed the guide for setting up Confluence Data Center on AWS using this quickstart/guide
Basically using all default values, the stacks are created successfully. But when we’re trying to access the stack output url to do the confluence setup wizard we just get a 502 Bad Gateway. Anyone else had issues with this or any clues?

Hi @rw-dennis,

It may be that Confluence wasn’t able to start correctly. Can you take a look at the system logs of any of the EC2 instances in the Confluence stack and check to see if there are any errors? Alternatively, are you able to SSH onto any of the Confluence nodes and check if Confluence is running?


Hi Vivian,
Just to give you some more information:
Under CloudFormation we have 4 stacks (1 ‘Confluence-Data-Center’ and 3 nested stacks) that have status “CREATE_COMPLETE”. Under the EC2 we’re listing 3 instances:

  • Confluence Node
  • LinuxBastion (Availability Zone 1a)
  • LinuxBastion (Availability Zone 1b)
    Out of these three I’m only able to connect (ssh) to the two LinuxBastion ones and not the confluence node. The system logs all seem ok but they aren’t containing anything related to confluence that I can find, just AWS instance boot up-stuff.

I’m not sure how to check the confluence server from the LinuxBastion nodes while connected through ssh.

Best regards,

I restarted the EC2 instances and now the output url seems to work. Will keep you posted!

Disregard the edit in my previous post. I’m back at the 502 bad gateway now, and restarting the instances doesn’t seem to work anymore. I actually also tried deleting the stack and redo the whole thing from the beginning, but alas I ended up with exactly the same error. Default values on everything.

Even i am facing the same issue “502 Bad Gateway” when setting up Confluence Data Center on AWS. Can someone get back on this
Have tried this with both the options :
Option 1
Deploy Confluence Data Center into a new VPC on AWS
Option 2
Deploy Confluence Data Center into an existing VPC

Hi all,
Well, it was a bit random for us. But generally, I got it working again by a combination of terminating the instances to create new ones & updating the cloudFormation stack. Generally I found that even though the EC2 instances were listed as running, if I accessed them to quickly I would get the 502 error, and in that case get stuck on it. Basically I terminated & rebooted everything and then didn’t access or touch anything for about an hour. It then seemed to work. So I guess my tip is be patient and don’t access your instance too quickly. Sorry that I don’t have anything more concrete, as I’m really a beginner in all of this.
Best Regards,


My experience with Jira DC on AWS is that, during setup, Jira goes away for a while in order to create the database and do a bunch of setup tasks. During this setup time, the load balancer detects Jira as having failed (due to it not responding to HTTP pings after ‘X’ seconds), so the load balancer starts returning HTTP 502 errors. You can verify if this is the case by looking at the load balancer node status in AWS.

The load balancer should eventually figure it out and come back, but I think the initial HTTP 502 errors confused my browser’s session with regards to the setup process.

I was able to work around this by creating a bastion host on the same subnet as the Jira server, SSHing into the bastion, and then using SSH port forwarding to access Jira directly on port 8080, which eliminated the problem.

I don’t know for sure if this is the same as your Confluence issue, but it sounds similar so I thought I’d mention it.


Thanks for the clarification Scott!

Unrelated but still related to the setup - Anyone has an idea on how you could “pause” the aws data center when not using it. We’re using it primarily for testing and demo purposes, so to minimize the costs we’d like to pause or stop the instances when not using them.

Hi Dennis,

can’t you simply stop or hibernate the instance? According to this that should stop you from getting billed. I never tried it but will have to in the very next future.

Another question: did you buy a Data Center license for your testing or did you find an alternative?


Hi Dennis,

I found out that stopping a Cloudformation is a little tricky.

  1. Edit all Autoscaling groups in the EC2 Management Console and add all processes except “Terminate” to the list of “Suspended Processes”.
  2. Go to instances and stop all instances in the EC2 Management Console.


For me worked following scenario:

  • reboot EC2 instance than got 504 Gateway Timeout
  • in a few seconds 502 once more
  • wait a minute or two and then it become working

Not sure, but maybe it will work even w/o rebooting, on itself in a few minutes

Regards, Roman