Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AWS parsing env vars as string, forcing int #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mashb1t
Copy link

@mashb1t mashb1t commented Feb 1, 2024

Fixes #58
Somehow AWS suddenly changed the type of the env var despite being defined in https://github.com/meltwater/terraform-aws-asg-dns-handler/blob/master/variables.tf#L22-L26 as number.

@meltwater-ateam Please consider merging this bugfix.

ERROR] ParamValidationError: Parameter validation failed:
Invalid type for parameter ChangeBatch.Changes[0].ResourceRecordSet.TTL, value: 300, type: <class 'str'>, valid types: <class 'int'>
Traceback (most recent call last):
  File "/var/task/autoscale.py", line 144, in lambda_handler
    process_record(record)
  File "/var/task/autoscale.py", line 136, in process_record
    process_message(json.loads(record['Sns']['Message']))
  File "/var/task/autoscale.py", line 132, in process_message
    update_record(zone_id, ip, hostname, operation)
  File "/var/task/autoscale.py", line 87, in update_record
    route53.change_resource_record_sets(
  File "/var/runtime/botocore/client.py", line 530, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/var/runtime/botocore/client.py", line 919, in _make_api_call
    request_dict = self._convert_to_request_dict(
  File "/var/runtime/botocore/client.py", line 990, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
  File "/var/runtime/botocore/validate.py", line 381, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Broken Lambda in v2.1.8
1 participant