(ctx context.Context, functionName string)
| 217 | } |
| 218 | |
| 219 | func (d *LambdaDeployer) functionExists(ctx context.Context, functionName string) (bool, error) { |
| 220 | input := &lambda.GetFunctionInput{ |
| 221 | FunctionName: aws.String(functionName), |
| 222 | } |
| 223 | |
| 224 | _, err := d.clients.Lambda.GetFunctionWithContext(ctx, input) |
| 225 | if err != nil { |
| 226 | if awsErr, ok := err.(awserr.Error); ok { |
| 227 | if awsErr.Code() == lambda.ErrCodeResourceNotFoundException { |
| 228 | return false, nil |
| 229 | } |
| 230 | } |
| 231 | return false, err |
| 232 | } |
| 233 | |
| 234 | return true, nil |
| 235 | } |
| 236 | |
| 237 | func (d *LambdaDeployer) waitForFunctionActive(ctx context.Context, functionName string) error { |
| 238 | log.Printf("Waiting for function to become active...") |
no test coverage detected