0 : AUTOMATED CONFIGURATION
=======================================
The steps from 0) to 1) of START INSTANCE, STOP INSTANCE, DESCRIBE INSTANCE can be automatically performed by using this deployment template:
https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?stackName=BubbleEC2&templateURL=https://bubble-resources.s3.amazonaws.com/deployment-assets/CloudFormation-AWSEC2.yaml You will find the required parameters values used across the plugin in the "OUTPUT" tab of the created stack.
1 : START INSTANCE
===============================
ACTION DESCRIPTION
--------------------------------
START INSTANCE starts an AWS EC2 instance that has been previously stopped.
STEP-BY-STEP SETUP
--------------------------------
The steps from 0) to 1) can be automatically performed by using this deployment template:
https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?stackName=BubbleEC2&templateURL=https://bubble-resources.s3.amazonaws.com/deployment-assets/CloudFormation-AWSTranslateSyncOnly.yaml You will find the required parameters values used across the plugin in the "OUTPUT" tab of the created stack.
0) Sign-up for AWS EC2 by following this link:
https://console.aws.amazon.com/ec2/v2/home 1) Create your AWS EC2 API KEY & SECRET and attach the AWS EC2 FULL ACCESS POLICY
https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys 2) Enter in the PLUGIN SETTINGS your AWS EC2 API KEY & SECRET & AWS SERVICE ENDPOINT REGION (if not provided, the default endpoint is "us-east-1").
3) Set up the "START INSTANCE" action in the workflow.
Inputs Fields :
- INSTANCE ID : ID of the AWS EC2 instance to start.
Output Fields :
- CURRENT STATE CODE : State code of the instance after command execution. Valid values are: 0:pending | 16:running | 32:shutting-down | 48:terminated | 64:stopping | 80:stopped.
- CURRENT STATE NAME : State name of the instance after command execution. Valid values are: pending | running | shutting-down | terminated | stopping | stopped.
- PREVIOUS STATE CODE : State code of the instance prior command execution. Valid values are: 0:pending | 16:running | 32:shutting-down | 48:terminated | 64:stopping | 80:stopped.
- PREVIOUS STATE NAME : State name of the instance prior command execution. Valid values are: pending | running | shutting-down | terminated | stopping | stopped.
2 : DESCRIBE INSTANCE
===============================
ACTION DESCRIPTION
--------------------------------
DESCRIBE INSTANCE describes the state of an AWS EC2 instance.
STEP-BY-STEP SETUP
--------------------------------
0) If not already done, perform the steps 0 to 2 of the first action of this documentation."
1) Set up the "DESCRIBE INSTANCE" action in the workflow. If you wish to continuously poll the instance state, use a Repeating Workflow.
Inputs Fields :
- INSTANCE ID : ID of the AWS EC2 instance ID to describe.
Output Fields :
- LAUNCH TIME : The date and time time the instance launched.
- STATE CODE : State code of the instance. Valid values are: 0:pending | 16:running | 32:shutting-down | 48:terminated | 64:stopping | 80:stopped.
- STATE NAME : State name of the instance. Valid values are: pending | running | shutting-down | terminated | stopping | stopped.
- STATE TRANSITION REASON : The reason code for the state change. Valid values are:
- Insufficient Instance Capacity: There was insufficient capacity available to satisfy the launch request.
- Internal Error: An internal error caused the instance to terminate during launch.
- Scheduled Stop: The instance was stopped due to a scheduled retirement.
- Spot Instance Shutdown: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
- Spot Instance Termination: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
- Instance Initiated Shutdown: The instance was shut down using the shutdown -h command from the instance
- Instance Terminated: The instance was terminated or rebooted during AMI creation.
- Invalid Snapshot Not Found: The specified snapshot was not found.
- User Initiated Hibernate: Hibernation was initiated on the instance.
- User Initiated Shutdown: The instance was shut down using the Amazon EC2 API.
- Volume Limit Exceeded: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.
3 : STOP INSTANCE
===============================
ACTION DESCRIPTION
--------------------------------
STOP INSTANCE stops an AWS EC2 instance that has been previously started.
STEP-BY-STEP SETUP
--------------------------------
0) If not already done, perform the steps 0 to 2 of the first action of this documentation."
1) Set up the "STOP INSTANCE" action in the workflow.
Inputs Fields :
- INSTANCE ID : ID of the AWS EC2 instance to stop.
Output Fields :
- CURRENT STATE CODE : State code of the instance after command execution. Valid values are: 0:pending | 16:running | 32:shutting-down | 48:terminated | 64:stopping | 80:stopped.
- CURRENT STATE NAME : State name of the instance after command execution. Valid values are: pending | running | shutting-down | terminated | stopping | stopped.
- PREVIOUS STATE CODE : State code of the instance prior command execution. Valid values are: 0:pending | 16:running | 32:shutting-down | 48:terminated | 64:stopping | 80:stopped.
- PREVIOUS STATE NAME : State name of the instance prior command execution. Valid values are: pending | running | shutting-down | terminated | stopping | stopped.
IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.
ADDITIONAL INFORMATION
======================
> AWS EC2 availability per region:
https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/> Available endpoints per region:
https://docs.aws.amazon.com/general/latest/gr/rande.htmlTROUBLESHOOTING
================
Any plugin related error will be posted to the the Logs tab, "Server logs" section of your App Editor.
Make sure that "Plugin server side output" and "Plugin server side output" is selected in "Show Advanced".
> Server Logs Details:
https://manual.bubble.io/core-resources/bubbles-interface/logs-tab#server-logsPERFORMANCE CONSIDERATIONS
===========================
N/A
QUESTIONS ?
===========
Contact us at
bubble@wiseable.io for any additional feature you would require or support ques