AWSTemplateFormatVersion: "2010-09-09"
Resources:
TaskRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service:
- ecs-tasks.amazonaws.com
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
Taskdefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: paas-monitor
Cpu: "256"
Memory: "512"
NetworkMode: "awsvpc"
RequiresCompatibilities:
- FARGATE
ExecutionRoleArn: !GetAtt TaskRole.Arn
ContainerDefinitions:
-
Name: "paas-monitor"
Image: "mvanholsteijn/paas-monitor:latest"
Cpu: 256
Memory: 512
PortMappings:
- ContainerPort: 1337
HostPort: 1337
ECSCluster:
Type: 'AWS::ECS::Cluster'
Properties:
ClusterName: awslabs-cluster