aws-fsx-lifecycle-status-monitor
Version:
The documentation is available [here](https://stefanfreitag.github.io/AWS-FSx-Lifecycle-Status-Monitor/).
558 lines • 12.6 kB
JSON
{
"Description": "Integration test stack for FSx lifecycle status monitor",
"Resources": {
"monitorfsxhealthsnstopic74C15B1B": {
"Type": "AWS::SNS::Topic",
"Properties": {
"DisplayName": "fsx-lifecycle-monitor",
"KmsMasterKeyId": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":kms:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":alias/aws/sns"
]
]
},
"TopicName": "fsx-lifecycle-monitor"
}
},
"monitorpolicy80A558D1": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"fsx:DescribeFileSystems",
"sns:Publish"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"monitorfsxhealthloggroup9F4B8215",
"Arn"
]
}
}
],
"Version": "2012-10-17"
},
"PolicyName": "fsx-lambda-sns",
"Roles": [
{
"Ref": "monitorfsxlifecyclemonitorServiceRole29219093"
}
]
}
},
"monitorfsxlifecyclemonitorServiceRole29219093": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
},
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy"
]
]
}
]
}
},
"monitorfsxlifecyclemonitor692E6494": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Architectures": [
"x86_64"
],
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "f98d2a893ca675e9913c5c54241a23418c46c083ddf445621500691e1b3c0790.zip"
},
"Environment": {
"Variables": {
"LambdaSNSTopic": {
"Ref": "monitorfsxhealthsnstopic74C15B1B"
}
}
},
"Handler": "fsx-health.lambda_handler",
"Layers": [
{
"Fn::FindInMap": [
"CloudwatchlambdainsightsversionMap",
{
"Ref": "AWS::Region"
},
"1x0x229x0xx86x64"
]
}
],
"Role": {
"Fn::GetAtt": [
"monitorfsxlifecyclemonitorServiceRole29219093",
"Arn"
]
},
"Runtime": "python3.10"
},
"DependsOn": [
"monitorfsxlifecyclemonitorServiceRole29219093"
]
},
"monitorfsxhealthloggroup9F4B8215": {
"Type": "AWS::Logs::LogGroup",
"Properties": {
"LogGroupName": {
"Ref": "monitorfsxlifecyclemonitor692E6494"
},
"RetentionInDays": 365
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"monitorrule99C4CAB4": {
"Type": "AWS::Events::Rule",
"Properties": {
"Description": "Trigger the FSx health check based on the underlying cron expression",
"Name": "fsx-health-trigger",
"ScheduleExpression": "cron(0/10 * * * ? *)",
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Fn::GetAtt": [
"monitorfsxlifecyclemonitor692E6494",
"Arn"
]
},
"Id": "Target0"
}
]
}
},
"monitorruleAllowEventRulemonitorstackmonitorfsxlifecyclemonitor85E311F1CC964143": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"monitorfsxlifecyclemonitor692E6494",
"Arn"
]
},
"Principal": "events.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"monitorrule99C4CAB4",
"Arn"
]
}
}
},
"CDKMetadata": {
"Type": "AWS::CDK::Metadata",
"Properties": {
"Analytics": "v2:deflate64:H4sIAAAAAAAA/02QTU/DMAyGfwt312xwAI5sElxAmgr3KUtN5TWNqzoZQlH+O0kpiNP7vLb8eYMPG9xcmU9tbDc0jk+Y3oKxA7SkEmdLUHLHpF4xvcvEFvYffoEMbEZMB3Fsv2p0pVYcVVs1gzPjqTOYnqK3gcXXzH8+0DyyanEZ9PZoVCkoPlYpHnfRDhR2Rgmc9GWHF+mfZ4lTrf3lDHQhX8pSG9fZRXOGpU05p2ff1/CrmaYV/84rvBffcVhW8NIRnvX6sr3H7V35zFmZmzn6wCNh+6Pf8py3HDUBAAA="
},
"Condition": "CDKMetadataAvailable"
}
},
"Mappings": {
"CloudwatchlambdainsightsversionMap": {
"af-south-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:28"
},
"ap-east-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:28"
},
"ap-northeast-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:60"
},
"ap-northeast-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:37"
},
"ap-northeast-3": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-northeast-3:194566237122:layer:LambdaInsightsExtension:19"
},
"ap-south-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:36"
},
"ap-south-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-south-2:891564319516:layer:LambdaInsightsExtension:10"
},
"ap-southeast-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:38"
},
"ap-southeast-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:38"
},
"ap-southeast-3": {
"1x0x229x0xx86x64": "arn:aws:lambda:ap-southeast-3:439286490199:layer:LambdaInsightsExtension:14"
},
"ca-central-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:37"
},
"cn-north-1": {
"1x0x229x0xx86x64": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:29"
},
"cn-northwest-1": {
"1x0x229x0xx86x64": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:29"
},
"eu-central-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:38"
},
"eu-central-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-central-2:033019950311:layer:LambdaInsightsExtension:11"
},
"eu-north-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:35"
},
"eu-south-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:28"
},
"eu-south-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-south-2:352183217350:layer:LambdaInsightsExtension:12"
},
"eu-west-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:38"
},
"eu-west-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:38"
},
"eu-west-3": {
"1x0x229x0xx86x64": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:37"
},
"me-central-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:me-central-1:732604637566:layer:LambdaInsightsExtension:11"
},
"me-south-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:28"
},
"sa-east-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:37"
},
"us-east-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:38"
},
"us-east-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:38"
},
"us-west-1": {
"1x0x229x0xx86x64": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:38"
},
"us-west-2": {
"1x0x229x0xx86x64": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:38"
}
}
},
"Conditions": {
"CDKMetadataAvailable": {
"Fn::Or": [
{
"Fn::Or": [
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"af-south-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-east-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-northeast-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-northeast-2"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-south-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-southeast-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ap-southeast-2"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"ca-central-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"cn-north-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"cn-northwest-1"
]
}
]
},
{
"Fn::Or": [
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-central-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-north-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-south-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-west-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-west-2"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"eu-west-3"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"me-south-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"sa-east-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"us-east-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"us-east-2"
]
}
]
},
{
"Fn::Or": [
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"us-west-1"
]
},
{
"Fn::Equals": [
{
"Ref": "AWS::Region"
},
"us-west-2"
]
}
]
}
]
}
},
"Outputs": {
"ExportsOutputRefmonitorfsxhealthsnstopic74C15B1B4A2D2981": {
"Value": {
"Ref": "monitorfsxhealthsnstopic74C15B1B"
},
"Export": {
"Name": "monitor-stack:ExportsOutputRefmonitorfsxhealthsnstopic74C15B1B4A2D2981"
}
},
"ExportsOutputFnGetAttmonitorrule99C4CAB4ArnB28B8588": {
"Value": {
"Fn::GetAtt": [
"monitorrule99C4CAB4",
"Arn"
]
},
"Export": {
"Name": "monitor-stack:ExportsOutputFnGetAttmonitorrule99C4CAB4ArnB28B8588"
}
},
"ExportsOutputRefmonitorrule99C4CAB40309C047": {
"Value": {
"Ref": "monitorrule99C4CAB4"
},
"Export": {
"Name": "monitor-stack:ExportsOutputRefmonitorrule99C4CAB40309C047"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}