Commit a7fbfaa9 authored by Rayan  CHIKHI's avatar Rayan CHIKHI
Browse files

template tweaks

parent 9a597125
ID=$(aws sts get-caller-identity --query Account --output text)
aws s3 rm s3://aws-unitigs-$ID --recursive
sleep 5
aws cloudformation delete-stack --stack-name aws-unitigs
......@@ -99,6 +99,23 @@ Resources:
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role
- arn:aws:iam::aws:policy/AmazonS3FullAccess
SpotIamFleetRole: # taken from https://github.com/aodn/aws-wps/blob/master/wps-cloudformation-template.yaml
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service: spot.amazonaws.com
Action: sts:AssumeRole
- Effect: Allow
Principal:
Service: spotfleet.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetTaggingRole
BatchProcessingJobDefinition:
Type: AWS::Batch::JobDefinition
Properties:
......@@ -133,13 +150,16 @@ Resources:
Properties:
Type: MANAGED
ComputeResources:
Type: EC2
Type: SPOT
MinvCpus: 0
DesiredvCpus: 0
MaxvCpus: 2
MaxvCpus: 4
AllocationStrategy: SPOT_CAPACITY_OPTIMIZED
InstanceTypes:
#- a1.medium
#- c5.xlarge
- optimal
BidPercentage: 100
SpotIamFleetRole: !Ref SpotIamFleetRole
Subnets:
- Ref: Subnet
SecurityGroupIds:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment