()
| 49 | } |
| 50 | |
| 51 | extendedValidate() { |
| 52 | this.validate() |
| 53 | // validate function exists in service |
| 54 | const functionObject = this.serverless.service.getFunction( |
| 55 | this.options.function, |
| 56 | ) |
| 57 | const lambdaName = functionObject.name |
| 58 | this.options.interval = this.options.interval || 1000 |
| 59 | const logGroupClass = this.provider.getLogGroupClass(functionObject) |
| 60 | this.options.logGroupName = this.provider.naming.getLogGroupName( |
| 61 | lambdaName, |
| 62 | { logGroupClass }, |
| 63 | ) |
| 64 | if (logGroupClass === LOG_GROUP_CLASSES.INFREQUENT_ACCESS) { |
| 65 | throw new ServerlessError( |
| 66 | `The "${this.options.function}" function writes to the INFREQUENT_ACCESS log group "${this.options.logGroupName}". This log class does not support the CloudWatch Logs APIs used by "sls logs". Use CloudWatch Logs Insights to read these logs.`, |
| 67 | 'LOGS_INFREQUENT_ACCESS_NOT_SUPPORTED', |
| 68 | { stack: false }, |
| 69 | ) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | async getLogStreams() { |
| 74 | const params = { |
no test coverage detected