aws / aws-auto-scaling-custom-resource Goto Github PK
View Code? Open in Web Editor NEWLibraries, samples, and tools to help AWS customers onboard with custom resource auto scaling.
License: MIT No Attribution
Libraries, samples, and tools to help AWS customers onboard with custom resource auto scaling.
License: MIT No Attribution
Hi,
My application makes use of kinesis streams. In order to cope up with the changing load pattern, I wish to use application autoscaling service to scale up/down kinesis shards. To achieve this, I followed steps mentioned here.
After following all the mentioned steps, I could see the kinesis stream getting scaled based on the load.
Now here is the problem. Our application ends up creating new kinesis streams during its lifetime. So, the requirement is that as soon as the new kinesis stream gets created it should get registered as a scalable target so that shards can be scaled up/down based on the load on the newly created stream. To achieve this, I used the following command, however, it resulted into an error given below:
aws application-autoscaling register-scalable-target --service-namespace custom-resource --resource-id https://<API ID>.execute-api.ap-south-1.amazonaws.com/prod/scalableTargetDimensions/POC-KinesisAutoShardTest-2 --scalable-dimension 'custom-resource:ResourceType:Property' --min-capacity 1 --max-capacity 8 --role-arn arn:aws:iam::<ACC ID>:role/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_CustomResource
and the error I got is:
Error parsing parameter '--resource-id': Unable to retrieve https://<API ID>.execute-api.ap-south-1.amazonaws.com/prod/scalableTargetDimensions/POC-KinesisAutoShardTest-2: received non 200 status code of 403
Could you please help me achieve this? How can we let the pre-created solution (consisting of API gateway, Lambda, Cloudwatch) know that new kinesis streams have arrived and it should be scaled on shards based on the load?
Thanks and Regards,
Prafulla
I've followed the instructions and created the CFN stack. I tested my API manually. I'm now trying to register the scalable target on the CLI:
aws application-autoscaling register-scalable-target \
--service-namespace custom-resource \
--scalable-dimension custom-resource:ResourceType:Property \
--resource-id file://~/tmp/custom-resource-id.txt \
--min-capacity 1 --max-capacity 15 \
--region us-east-1
However, I get this error:
An error occurred (ValidationException) when calling the RegisterScalableTarget operation: User is missing the following permissions: execute-api:Invoke:PATCH, execute-api:Invoke:GET
My IAM user has full admin access in the account, and just to be sure, I added an online policy to my user that grants the specific permissions on the API.
I am not sure how to get past this permission problem.
PreProdReourceIdPrefix
contains a spelling mistake in (eg)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.