doulin6448 2018-01-17 23:02
浏览 52
已采纳

CodeIgniter Rest Server与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:

  • Create an API with CodeIgniter Rest Server
  • Use AWS, using a combination of Lambda and the API Gateway to GET and POST to my RDS database.

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!

  • 写回答

1条回答 默认 最新

  • duan0531 2018-01-18 08:59
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退