We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 734ce25 + 26ab1f5 commit eba67cfCopy full SHA for eba67cf
1 file changed
src/resources/Api.ts
@@ -147,6 +147,25 @@ export class Api {
147
const policyLogicalId = this.naming.getLogGroupPolicyLogicalId();
148
const apiLogicalId = this.naming.getApiLogicalId();
149
150
+ if (this.config.logging.roleArn) {
151
+ return {
152
+ [logGroupLogicalId]: {
153
+ Type: 'AWS::Logs::LogGroup',
154
+ Properties: {
155
+ LogGroupName: {
156
+ 'Fn::Join': [
157
+ '/',
158
+ ['/aws/appsync/apis', { 'Fn::GetAtt': [apiLogicalId, 'ApiId'] }],
159
+ ],
160
+ },
161
+ RetentionInDays:
162
+ this.config.logging.retentionInDays ||
163
+ this.plugin.serverless.service.provider.logRetentionInDays,
164
165
166
+ };
167
168
+
169
return {
170
[logGroupLogicalId]: {
171
Type: 'AWS::Logs::LogGroup',
0 commit comments