@aygdeveloper there should be a newer AMI with both Sync Gateway and CB Server version 4.+ available.
Sync Gateway is very easy to install by itself anyway. I have a blog post that may help: Installing Sync Gateway on Alternate Linux Distributions - The Couchbase Blog
Sync Gateway uses ports 4984 and 4985 by default. You can configure this. Just pointing that out so you open the right ports. 4985 is the admin port, so you may not want that open to the world.
Let us know what other questions you have. Also tagging @traun who is the AMI expert. If you have more questions on mobile (Couchbase Lite and Sync Gateway), better to post under the mobile category.