Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions pkg/app/piped/cloudprovider/lambda/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ func (c *client) Apply(ctx context.Context, fm FunctionManifest, role string) er
Code: &lambda.FunctionCode{
ImageUri: aws.String(fm.Spec.ImageURI),
},
PackageType: aws.String("Image"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about other use-cases when our users may want to be able to use other kinds of PackageType ( Zip or S3 object ). But currently, we only support container image packaging, so let me hard code this PackageType value here as is, and update this later when we have a plan to support a wide range of package types.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal change so I am fine about it.
👍

Role: aws.String(role),
FunctionName: aws.String(fm.Spec.Name),
Runtime: aws.String(fm.Spec.Runtime),
Handler: aws.String(fm.Spec.Handler),
}
_, err := c.client.CreateFunctionWithContext(ctx, input)
if err != nil {
Expand All @@ -89,9 +88,7 @@ func (c *client) Apply(ctx context.Context, fm FunctionManifest, role string) er
return fmt.Errorf("aws lambda service encountered an internal error: %w", err)
case lambda.ErrCodeCodeStorageExceededException:
return fmt.Errorf("total code size per account exceeded: %w", err)
case lambda.ErrCodeResourceNotFoundException:
fallthrough
case lambda.ErrCodeResourceNotReadyException:
case lambda.ErrCodeResourceNotFoundException, lambda.ErrCodeResourceNotReadyException:
return fmt.Errorf("resource error occurred: %w", err)
}
}
Expand Down