Deployer
Creating a Sandbox
The following command create a sandbox in the given AWS profile (-e|--profile)
cd <topology-dir>
tc create [--sandbox SANDBOX] [-e ENV]
Incremental updates
While developing, we often need to incrementally deploy certain components without recreating the entire topology. tc
provides an update command that updates given entity and components.
An entity is a core composable servereless resource. . A component is an attribute or instance of the entity.
We can update an entity and/or component as follows:
tc update -s sandbox -e env -c Entity/Component
Updating Entities
tc update -s sandbox -e env -c routes
tc update -s sandbox -e env -c events
tc update -s sandbox -e env -c functions
tc update -s sandbox -e env -c mutations
tc update -s sandbox -e env -c channels
tc update -s sandbox -e env -c schedules
tc update -s sandbox -e env -c queues
Updating specific component in an entity
Components in function
entity:
tc update -s sandbox -e env -c functions/layers
tc update -s sandbox -e env -c functions/vars
tc update -s sandbox -e env -c functions/concurrency
tc update -s sandbox -e env -c functions/runtime
tc update -s sandbox -e env -c functions/tags
tc update -s sandbox -e env -c functions/roles
tc update -s sandnox -e env -c functions/function-name
Components in mutation
entity:
tc update -s sandbox -e env -c mutations/authorizer
tc update -s sandbox -e env -c mutations/types
tc update -s sandbox -e env -c mutations/roles
tc update -s sandbox -e env -c mutations/RESOLVER_NAME
Components in event
entity:
tc update -s sandbox -e env -c events/EVENT_NAME
tc update -s sandbox -e env -c events/roles
Components in route
entity:
tc update -s sandbox -e env -c routes/ROUTE_NAME
tc update -s sandbox -e env -c routes/ROUTE_NAME/authorizer
tc update -s sandbox -e env -c routes/roles
Deleting
To delete a sandbox:
tc delete -s sandbox -e env
To delete a specific entity/component. See update commands (above) for list of components
tc delete -s sandbox -e env -c ENTITY/COMPONENT