san-kumar/lambdaphp

Support for AWS credential profiles

Closed this issue · 1 comments

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

hi,

You are right. The project uses lambdaphp.ini for name, ram and crontab. Maybe we can save a local copy of credentials in it too.

Maybe you can hack this function in Config.php and send me a PR otherwise I'll change it when I get the time :)

protected function getConfigFile(string $key) {
            return preg_match('/^(name|ram)$/', $key) ? $this->getIniFile() : sprintf('%s/%s', $this->getAwsDir(), preg_match('/key|secret/', $key) ? 'credentials' : 'config');
        }