AwsCommunity::ApplicationAutoscaling::ScheduledAction CFN community resource.
  • Python 76.6%
  • Makefile 23.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-05-10 16:47:45 +01:00
docs Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
inputs Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
src/awscommunity_applicationautoscaling_scheduledaction Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
.dockerignore Initial commit 2022-10-20 17:10:24 +01:00
.editorconfig Initial commit 2022-10-20 17:10:24 +01:00
.gitignore Initial commit 2022-10-20 17:10:24 +01:00
.rpdk-config Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
activate.template Initial commit 2022-10-20 17:10:24 +01:00
awscommunity-applicationautoscaling-scheduledaction.json Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
LICENSE Initial commit 2022-10-20 17:10:24 +01:00
Makefile Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
publish.template Initial commit 2022-10-20 17:10:24 +01:00
pyproject.toml Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
README.md Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00
resource-role.yaml Initial commit 2022-10-20 17:10:24 +01:00
resource-test.template Initial commit 2022-10-20 17:10:24 +01:00
template.yml Working all contracts, up to date libs, testing with DynamoDB for ease of testing 2023-05-10 16:47:45 +01:00

AwsCommunity::ApplicationAutoscaling::ScheduledAction

This resource allows to create a Scheduled Action via Application Autoscaling for a given resource. Currently on AWS the only actions are TargetTracking and Step Scaling. So this aims to bridge that gap.

Testing

Create 2 virtual environments after cloning the repository: one for SAM CLI, one for CFN and our resource.

python -m venv sam-cli
source sam-cli/bin/activate
pip install pip -U; pip install aws-sam-cli
sam local start-lambda`

In a different terminal / session, install the resource and depencencies

poetry env use 3.9 # You can use another python version, but I recommend to stick to the ones supported by AWS Lambda
poetry install
# Activate it.
source `poetry env info -p`/bin/activate

Run make package to create the build layer that is used by SAM CLI. Change the values in inputs/*.json to match the resource you have in your account you can perform the tests with, then you can test using cfn test

Build the ZIP for the resource and definition

make zip

Create the execution role.

Using the resource-role.yaml, create the execution role that will allow you to run the resource.

Publishing

You can publish and register the resource using the publish.template CFN Template.