Skip to content

Make fix_aws_dns fails if AMI-ID no longer exists #57

@mhjacks

Description

@mhjacks

e.g.

TASK [roles/manage_ec2_instances : provision aap server] ***************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.amazon.aws.plugins.module_utils.ec2.AnsibleEC2Error: Failed to run instances: An error occurred (InvalidAMIID.NotFound) when calling the RunInstances operation: The image id '[ami-0c37ac84e611f43e0]' does not exist
[DEPRECATION WARNING]: The network parameter has been deprecated, please use network_interfaces and/or 
network_interfaces_ids instead. This feature will be removed from amazon.aws in a release after 2026-12-01. Deprecation
 warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {"boto3_version": "1.40.65", "botocore_version": "1.40.65", "changed": false, "error": {"code": "InvalidAMIID.NotFound", "message": "The image id '[ami-0c37ac84e611f43e0]' does not exist"}, "msg": "Failed to run instances: An error occurred (InvalidAMIID.NotFound) when calling the RunInstances operation: The image id '[ami-0c37ac84e611f43e0]' does not exist", "response_metadata": {"http_headers": {"cache-control": "no-cache, no-store", "connection": "close", "content-type": "text/xml;charset=UTF-8", "date": "Wed, 05 Nov 2025 13:44:40 GMT", "server": "AmazonEC2", "strict-transport-security": "max-age=31536000; includeSubDomains", "transfer-encoding": "chunked", "vary": "accept-encoding", "x-amzn-requestid": "da76cd1e-fcf1-4903-a449-313944b4eda8"}, "http_status_code": 400, "request_id": "da76cd1e-fcf1-4903-a449-313944b4eda8", "retry_attempts": 0}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions