I’m using two serverless plugins (serverless-fargate, serverless-step-functions) with the basic idea of having my step function start a task in a fargate cluster. I’m able to spin both up but I’m not clear how reference the fargate cluster and task in the state definition.
fargate:
clusterName: price-cluster
vpc:
securityGroupIds:
- !Ref LambdaSecurityGroup
subnetIds:
- ${self:custom.config.${sls:stage}.vpc.subnet1}
- ${self:custom.config.${sls:stage}.vpc.subnet2}
tasks:
download-test:
image: appImage
environment:
file_path: test.py
service:
desiredCount: 0
my first thought was to use the alias because I have done with lambda functions before eg
functions:
downloader:
handler: scarper.main
description: ${self:custom.config.appName} ${sls:stage} lambda downloader
layers:
- !Ref PythonRequirementsLambdaLayer
.....
In-Network-Parser:
Type: Task
Resource: !GetAtt inNetworkParser.Arn
End: true
but when I tried Cluster: !GetAtt fargate.Arn
I got The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource fargate
I was tried using ${self:fargate}
but that just gave me an object.
I guess this is a long way to ask how to reference the Arn for this plugin resource.