AWS::StepFunctions::Activity - AWS CloudFormation


An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the GetActivityTask API action and respond using SendTask* API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.

For information about creating an activity, see Creating an Activity State Machine in the AWS Step Functions Developer Guide and CreateActivity in the AWS Step Functions API Reference.


To declare this entity in your AWS CloudFormation template, use the following syntax:


{ "Type" : "AWS::StepFunctions::Activity", "Properties" : { "Name" : String, "Tags" : [ TagsEntry, ... ] } }


Type: AWS::StepFunctions::Activity Properties: Name: String Tags: - TagsEntry



The name of the activity.

A name must not contain:

  • white space

  • brackets < > { } [ ]

  • wildcard characters ? *

  • special characters " # % \ ^ | ~ ` $ & , ; : /

  • control characters (U+0000-001F, U+007F-009F)

To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.

Required: Yes

Type: String

Update requires: Replacement


The list of tags to add to a resource.

Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.

Required: No

Type: List of TagsEntry

Update requires: No interruption

Return values


When you provide the logical ID of this resource to the Ref intrinsic function, Ref returns the ARN of the created activity. For example:

{ "Ref": "MyActivity" }

Returns a value similar to the following:


For more information about using the Ref function, see Ref.


Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.


Not currently supported by AWS CloudFormation.


Returns the name of the activity. For example:

{ "Fn::GetAtt": ["MyActivity", "Name"] }

Returns a value similar to the following:


For more information about using Fn::GetAtt, see Fn::GetAtt.


The following examples create a Step Functions activity.


{ "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "An example template for a Step Functions activity.", "Resources" : { "MyActivity" : { "Type" : "AWS::StepFunctions::Activity", "Properties" : { "Name" : "myActivity", "Tags": [ { "Key": "keyname1", "Value": "value1" }, { "Key": "keyname2", "Value": "value2" } ] } } } }


AWSTemplateFormatVersion: "2010-09-09" Description: "A sample template for a Step Functions activity" Resources: MyActivity: Type: "AWS::StepFunctions::Activity" Properties: Name: myActivity Tags: - Key: "keyname1" Value: "value1" - Key: "keyname2" Value: "value2"