Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix(cellgeo): remove access logs
Browse files Browse the repository at this point in the history
See #455
  • Loading branch information
coderbyheart committed Oct 21, 2020
1 parent dbe2409 commit b9895f6
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions cdk/resources/CellGeolocationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { BifravstLambdas } from '../prepare-resources'
import { logToCloudWatch } from './logToCloudWatch'
import { CellGeolocation } from './CellGeolocation'
import { LambdasWithLayer } from './LambdasWithLayer'
import * as CloudWatchLogs from '@aws-cdk/aws-logs'

/**
* Allows to resolve cell geolocations using a HTTP API
Expand Down Expand Up @@ -88,39 +87,10 @@ export class CellGeolocationApi extends CloudFormation.Resource {
protocolType: 'HTTP',
})

const httpApiLogGroup = new CloudWatchLogs.LogGroup(
this,
`HttpApiLogGroup`,
{
removalPolicy: CloudFormation.RemovalPolicy.DESTROY,
logGroupName: `/${this.stack.stackName}/cellGeolocationApiAccessLogs`,
retention: CloudWatchLogs.RetentionDays.ONE_WEEK,
},
)

this.stage = new HttpApi.CfnStage(this, 'httpApiStage', {
apiId: this.api.ref,
stageName: 'v1',
autoDeploy: true,
accessLogSettings: {
destinationArn: httpApiLogGroup.logGroupArn,
format: JSON.stringify({
requestId: '$context.requestId',
awsEndpointRequestId: '$context.awsEndpointRequestId',
requestTime: '$context.requestTime',
ip: '$context.identity.sourceIp',
protocol: '$context.protocol',
routeKey: '$context.routeKey',
status: '$context.status',
responseLength: '$context.responseLength',
integrationLatency: '$context.integrationLatency',
integrationStatus: '$context.integrationStatus',
integrationErrorMessage: '$context.integrationErrorMessage',
integration: {
status: '$context.integration.status',
},
}),
},
})

const geolocateIntegration = new HttpApi.CfnIntegration(
Expand Down

0 comments on commit b9895f6

Please sign in to comment.