Ben Hayward
Ben Hayward

Reputation: 191

CodeIgniter Rest Server vs Amazon AWS

I have to create an API (JSON REST) for a project that has recently moved onto AWS, with a PHP CodeIgniter code-base, and an RDS database.

I have a bit of a dilemma, because I'm unsure what route to take to create the API. My two options seem to be:

The paramount priority is security, so that points towards using AWS, as far as I understand, but after failing in my attempt to make a small scale mock-up on AWS, I'm left a bit confused.

I wondered if anybody had any input as this is somewhat of a niche question, and I've had no interaction with AWS or CodeIgniter Rest Server.

Thank you for your time!

Upvotes: 0

Views: 1123

Answers (1)

maelzx
maelzx

Reputation: 41

I can help you in a bit since I've experience with deploying Codeigniter base web system onto AWS.

First of all, the security in questions... AWS wont help much. Yes, it is by default have more security layer. But it is no use if your application itself is not secured.

So here goes:

  1. If you want to deploy fast, I'd suggest go through EC2, install one of the image that have LAMP configured (from market, should've free image that you can use)
  2. Upload to the server, configure the right config
  3. Then it should work as per what it is intended.

But if you want to utilized auto scaling features

  1. Setup the Elastic Beanstalk (EB) for PHP environment
  2. ZIP up the codeigniter source code with all setting configured as below
  3. Database setting point to RDS
  4. Session to use database driver and create the needed table in the RDS
  5. Upload and deploy to the EB
  6. Then hopefully everything is working fine

Then, if to use API Gateway & Lambda, you will actually need to learn a bit more things.

  1. How to configure API Gateway, to get familiar with how to use it
  2. How to "link" it to lambda
  3. How Lambda need to read request & response back etc
  4. Also on Lambda no PHP support yet, so need to learn nodejs/python etc in order to use it

Basically if want to use API Gateway & Lambda you might need to start the development from scratch.

Upvotes: 1

Related Questions