Giter VIP home page Giter VIP logo

lambdaphp's People

Contributors

roblui avatar san-kumar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lambdaphp's Issues

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

can't find layer

I'm seeing this error on deploy. I'm not sure where to get/build the layer with PHP?

$> vendor/bin/lambdaphp deploy -v
Gathering AWS credentials
Created zip: /private/var/folders/bv/8tvsw5h155v_2_dwj1fjkl_h0000gn/T/zipqKrgWz.zip, /private/var/folders/bv/8tvsw5h155v_2_dwj1fjkl_h0000gn/T/zipjY956m.zip
Setting up IAM permissions
Found existing IAM role
Creating new lambda function (this may take a while)

In WrappedHttpHandler.php line 195:

[Aws\Lambda\Exception\LambdaException]
Error executing "CreateFunction" on "https://lambda.us-east-1.amazonaws.com/2015-03-31/functions"; AWS HTTP error: Client error: POST https://lambda.us-east-1.amazonaws.com/2015-03-31/functions resulted in a 400 Bad Request response:
{"Type":"User","message":"Layer version arn:aws:lambda:us-east-1:322173628904:layer:php:10 does not exist."}
InvalidParameterValueException (client): Layer version arn:aws:lambda:us-east-1:322173628904:layer:php:10 does not exist. - {"Type":"User","message":"Layer version arn:aws:lambda:us-east-1:322173628904:layer:php:10 does not exist."}

Output Incorrect

When working in regions outside of eu-west-1 - the output URL shows eu-west-1 rather than the configured region.

Unable to deploy lambda project

I created a lambda project like this

creation-of-lambda-project

now, if I am trying to use lambdaphp deploy -v I am getting error

'lambdaphp' is not recognized as an internal or external command,
operable program or batch file.

How I should proceed, please guide me.

MySQLi support would be handy

Hi San Kumar

I've been playing with this package and it's excellent, thank you for creating it.

I've been having trouble using mysqli, it seems like this isn't included, but I may be mistaken. It'd be a great addition though, as it must be one of the more widely used PHP extensions. Would it be possible to add it in please.

Thanks

Andy

DOS2Unix

I'm finding issues deploying on unix/linux from the latest composer which would suggest its been edited using a windows format and not cleaned prior to commit.

find . -type f -exec dos2unix {} \;

This is resulting in a broken deploy function on unix/linux os

PHP layer doesn't work in other regions

It seems that the latest version of lambdaphp v0.01 will only run in region "us-east-1", as apparently all layers of a lambda must be within the same region and the PHP layer only exists in "us-east-1". Is there a way to create layers for all regions, or failing that some instructions on how to create a PHP layer for the region we are using (ap-southeast-2)?

Error while deploying lambdaphp

awsuser@VPS:~/awstest# lambdaphp deploy -v
Creating zip file
Gathering AWS credentials
Updating lambda function (this may take a while)
PHP Notice: Undefined index: crontab in /awsuser/awstest/vendor/lambdaphp/installer/console/App/Config.php on line 55
PHP Warning: Invalid argument supplied for foreach() in /awsuser/awstest/vendor/lambdaphp/installer/console/App/Config.php on line 55

Windows line endings break execution on Linux

First, wow, what a great project! Thank you for making this.

Summary
In files such as ./vendor/bin/lambdaphp there are windows line endings. Deploying on Linux therefore triggers fatal errors, and deployment cannot take place.

Steps To Reproduce
Follow the instructions to install and deploy using lambdaphp deploy -v

Expected Behaviour
Site should be deployed, with the script producing output similar to the following:

$ lambdaphp deploy -v
Creating zip file
Gathering AWS credentials
Setting up IAM permissions
Creating new IAM role
Setting S3 and DynamoDB access
Creating new lambda function (this may take a while)
Setting permissions for lambda function
Creating sessions table
Creating new REST API
Connecting REST API to Lambda function
Creating API methods for [some-id]
Creating API methods for [some-other-id]
Creating deployment for Rest API
Website deployed!
To access your site visit:
[url]

Actual Behaviour
Site does not get deployed, and the script terminates with the following output:

$ lambdaphp deploy -v
/usr/bin/env: ‘php\r’: No such file or directory

Solution
Change line endings to Unix (LF) line endings. The process then completes as expected.

Cheers

Geoff.

REST API example

Please could you add a REST API example to your list of examples. It is not clear what API request data is being made available from the AWS API gateway, and also how to access such data in PHP.

structure of lambdaphp.ini?

Hi,

Any chance you can supply a sample lambdaphp.ini? (it is ignored from the repo)
I'm keen to see the available options.

Thanks

Geoff.

PHP runtime version older than in docs

In the FAQ section, it states:

FAQ

  • Which PHP version will my site be running?
    Currently it supports PHP 7.2.

However phpinfo() from a live Lambda deployed 19 Oct 2018 shows an older PHP of 7.1.3.

How do I construct a more recent PHP build?

Thanks

Geoff.

Support for AWS credential profiles

First, awesome project. Came in super handy for me today and saved me a ton of time.

Would be great if you could indicate a specific profile when calling lambdaphp deploy -v

As it currently is you have to hack the getAwsConfig function to get it to use a profile other than the default.

Maybe something like this:

lambdaphp deploy -v -p profile-name

node version depreciated

The source vendor/lambdaphp/installer/console/Command/Deploy.php references nodejs8.10 which is no longer supported on AWS. How to update for nodejs10.x and nodejs12.x ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.