AWS::Lightsail::StaticIp - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The AWS::Lightsail::StaticIp resource specifies a static IP that can be attached to an Amazon Lightsail instance that is in the same Amazon Region and Availability Zone.


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


{ "Type" : "AWS::Lightsail::StaticIp", "Properties" : { "AttachedTo" : String, "StaticIpName" : String } }


Type: AWS::Lightsail::StaticIp Properties: AttachedTo: String StaticIpName: String



The instance that the static IP is attached to.

Required: No

Type: String

Update requires: No interruption


The name of the static IP.

Required: Yes

Type: String

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns a unique identifier for this resource.


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

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The IP address of the static IP.


A Boolean value indicating whether the static IP is attached to an instance.


The Amazon Resource Name (ARN) of the static IP (for example, arn:aws:lightsail:us-east-2:123456789101:StaticIp/244ad76f-8aad-4741-809f-12345EXAMPLE).


An instance must be in a running state to attach a static IP

To attach a static IP to an instance, the instance must be in a running state. If the instance does not come to running state within 15 minutes after performing an attach static IP request, the attach static IP request times-out.

You can attach only one static IP to an instance

You can attach one static IP to a single instance. You cannot attach multiple static IPs to one instance. If multiple static IPs have the same instance in the AttachedTo parameter, the behavior is unpredictable and any of the static IPs (but only one) could be attached to the instance. This will cause the stack to drift because only one of the static IPs will be attached to the instance but the template will show multiple.