Closed hisato-kawaji closed 4 years ago
Ah yes, I never tested profile usage with --profile
arguments, because i usually set AWS_PROFILE
environment variable instead. Anyway This plugin creates a new Lambda Client and use that for calling lambda service apis to resolve layer versions. I haven't found any proper/clean way to access serverless internal AWS credentials so that's why this issue is causing.
Fortunately, Serverless plugin can receive command-line args from constructor and it can be used for fixing this issue. I can't provide you any ETA (Currently I have no spare time :() but it will be fixed in next few days!
Thanks for your positive reply. I hope this issue will be resolved someday.
I'll continue to resolve this issue. thank you.
running into this issue and i'm curious how i can resolve it with the workaround?
I believe it'll be fixed if this plugin will rely on Framework AWS request method as below:
serverless.getProvider('aws').request("Lambda", "listLayerVersions", params);
It internally resolves AWS credentials per Framework rules
:tada: This issue has been resolved in version 2.1.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hello all. This issue is fixed in v2.1.1. Thanks @medikoo for the information that i needed, and others for patience in waiting.
Stay safe and Be well! <3
The command below is failed because no layer was found while searching the layer version (though the layer exists) I did the experiments with two AWS accounts and profiles can access each environments.
This problem can represent by the resources deployed to default AWS account and the ones deployed to the other AWS account by the deploy commad bellow
sls deploy --profile {your configured aws profile name}
(maybe, also by the resources deployed to default region and the ones deployed to the other region)I guess this problem cause no AWS.Config is specified the aws credential information (profile name, or credentials).
I practically solved the problem by using the provisional environment variables with a deploy command instead of modifying this plugin.
I doubt there seem be no parameters include the aws credential infomation for plugin development.