in src/node.ts [182:213]
public configureLogging(sdkCallPolicy: customresources.AwsCustomResourcePolicy) {
// This call doesn't really need all the permissions its using in the
// provided policy, but since the policy must be constructed all at once
// this is the only way to do it effectively
const logPublishingConfiguration = {
Fabric: {
ChaincodeLogs: {
Cloudwatch: { Enabled: this.enableChaincodeLogging },
},
PeerLogs: {
Cloudwatch: { Enabled: this.enableNodeLogging },
},
},
};
const configureNodeLogSdkCall = {
service: 'ManagedBlockchain',
action: 'updateNode',
parameters: {
NetworkId: this.networkId,
MemberId: this.memberId,
NodeId: this.nodeId,
LogPublishingConfiguration: logPublishingConfiguration,
},
physicalResourceId: customresources.PhysicalResourceId.of('Id'),
};
new customresources.AwsCustomResource(this, 'ConfigureNodeLogResource', {
policy: sdkCallPolicy,
onCreate: configureNodeLogSdkCall,
onUpdate: configureNodeLogSdkCall,
});
}