dynamodb#
DynamoDB ORM layer.
- class packer_ami_workflow.dynamodb.AmiData(hash_key: Optional[Any] = None, range_key: Optional[Any] = None, **attributes)[source]#
This is the model class for the DynamoDB table for storing AMI metadata.
- Parameters:
workflow_id –
step_id –
ami_id – the AMI id.
ami_name – the AMI name.
create_at – when this AMI is created.
aws_console_url – AWS console url to open the AMI details in the browser.
base_ami_id – this AMI is built on top of which base AMI?
base_ami_name – name of the base AMI.
root_base_ami_id – which AMI we originally start from? Usually it’s the ubuntu official AMI.
root_base_ami_name – name of the root base AMI.
details – the response of the https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/describe_images.html API call.
metadata – user custom metadata
- classmethod get_image(workflow_id: str, step_id: str)[source]#
Get the AMI data details.
- Parameters:
workflow_id – the workflow id.
step_id – the step id.
- classmethod query_by_workflow(workflow_id: str)[source]#
Get all AMI (steps) data for a specific workflow.
- Parameters:
workflow_id – the workflow id.