Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a VPC endpoint for autoscaling

We have our VPCs not directly connected to internet. So we need CLI --endpoint-url option to send commands to the custom VPC endpoints instead of standard AWS service endpoints e.g.

aws sns publish --message $MESSAGE  --target-arn $SNSTARGET --region $REGION --endpoint-url 'https://vpce-xxxx-xxxxx.sns.ap-southeast-1.vpce.amazonaws.com/'

For autoscaling though: I can't find any vpc endpoint interface option and the EC2 endpoint is not accepted.

aws autoscaling complete-lifecycle-action --lifecycle-hook-name $LIFECYCLEHOOKNAME --auto-scaling-group-name $ASGNAME --lifecycle-action-result $HOOKRESULT --instance-id $INSTANCEID  --region $REGION

Could not connect to the endpoint URL: https://autoscaling.ap-southeast-1.amazonaws.com/

If I try to use the closest endpoint i.e. EC2

aws autoscaling complete-lifecycle-action --lifecycle-hook-name $LIFECYCLEHOOKNAME --auto-scaling-group-name $ASGNAME --lifecycle-action-result $HOOKRESULT --instance-id $INSTANCEID  --region $REGION --endpoint-url 'https://vpce-xxxx-xxx.ec2.ap-southeast-1.vpce.amazonaws.com/'

An error occurred (InvalidAction) when calling the CompleteLifecycleAction operation: The action CompleteLifecycleAction is not valid for this web service.

like image 945
HumayunM Avatar asked Nov 07 '22 21:11

HumayunM


1 Answers

AWS will be adding EC2 autoscaling VPC endpoint in the coming weeks, the rumor is before Re:Invent.

like image 197
user1154422 Avatar answered Nov 16 '22 18:11

user1154422