-
Notifications
You must be signed in to change notification settings - Fork 208
Update docs for Lambda deployment #1463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Code coverage for golang is |
| ### Configuring Lambda cloud provider | ||
| > TBA | ||
| Adding a Lambda provider requires the region name where Lambda service is running. For authorization, the piped agent gets the credential information from environment variables by default or from a credential file provided via the below `credentialsFile` value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it eventually uses EC2 Instance Role if both environment variables and credential files aren't given. So it's kinder to mention that. (especially as using EC2 Instance Role is highly recommended at our company) And for those who use IAM, it would be nice to show which IAM policy permission is required.
Besides, now the credential chain is a little bit obscure. Hence it would be also cool to be more clear because Piped provides multiple methods of loading credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I'd show you example documents for that. You can ignore this and/or partly refer if needed.
You will generally need your AWS credentials to authenticate with Lambda. Piped provides multiple methods of loading these credentials.
It attempts to retrieve credentials in the following order:
- From the environment variables. Available environment variables are
AWS_ACCESS_KEY_IDorAWS_ACCESS_KEYandAWS_SECRET_ACCESS_KEYorAWS_SECRET_KEY - From the given credentials file.
- From the EC2 Instance Role
Therefore, you don't have to set credentialsFile if you use the environment variables or the EC2 Instance Role. Keep in mind the IAM role/user that you use with your Piped must possess the IAM policy permission for lambda:GetAccountSettings and lambda:ListFunctions and...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is honestly a modified version of ECR document already deleted 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 😂 I will use it 🙏
|
The following files are not gofmt-ed. By commenting pkg/app/piped/executor/lambda/lambda_test.go--- pkg/app/piped/executor/lambda/lambda_test.go.orig
+++ pkg/app/piped/executor/lambda/lambda_test.go
@@ -17,8 +17,9 @@
import (
"testing"
- provider "github.com/pipe-cd/pipe/pkg/app/piped/cloudprovider/lambda"
"github.com/stretchr/testify/assert"
+
+ provider "github.com/pipe-cd/pipe/pkg/app/piped/cloudprovider/lambda"
)
func TestConfigureTrafficRouting(t *testing.T) {
|
4061574 to
5065aa0
Compare
|
/lgtm |
|
Thank you! |
|
Great! |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: