This script help you to convert a YAML AWS CloudFormation with a Fargate Task Definition into a protected TaskDefinition with Prisma Cloud App-Embedded Defender for Fargate.
The script will find the resource with "AWS::ECS::TaskDefinition" in the Cloudformation and will add the Defender en every taskDefinition.
-
The script will ask for a YAML file name you have in the folder that you are running the script
-
You have to udpate your Defender parameters. You can find them in the Console:
tokenConsole = 'tokenConsole'
wssConsole = 'wss://us-east1.cloud.twistlock.com:443'
defenderImage = 'registry-auth.twistlock.com/tw_TOKEN/twistlock/defender:defender_21_04_421'
The output will put a new filename ending with "protected".
How to protect a Fargate task defined in AWS CloudFormation YAML - (No automation)
https://github.com/erickrazr/PC_AWS_FARGATE_Clouformation
David Avila - @davidaavilar
Erick Ferreira - @erickrazr