
    Vh                        d Z dZdZddlZddlZddlZddlZddlmZ 	 ddl	m
Z
 ddl	mZ ddl	mZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddZd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$e%dk(  r e$        yy# e$ r Y [w xY w)a  
---
module: lambda
version_added: 5.0.0
short_description: Manage AWS Lambda functions
description:
  - Allows for the management of Lambda functions.
  - This module was originally added to C(community.aws) in release 1.0.0.
options:
  name:
    description:
      - The name you want to assign to the function you are uploading. Cannot be changed.
    required: true
    type: str
  state:
    description:
      - Create or delete Lambda function.
    default: present
    choices: [ 'present', 'absent' ]
    type: str
  runtime:
    description:
      - The runtime environment for the Lambda function you are uploading.
      - Required when creating a function. Uses parameters as described in boto3 docs.
      - Required when O(state=present).
      - For supported list of runtimes, see U(https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
    type: str
  role:
    description:
      - The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS)
        resources. You may use the bare ARN if the role belongs to the same AWS account.
      - Required when O(state=present).
    type: str
  handler:
    description:
      - The function within your code that Lambda calls to begin execution.
    type: str
  zip_file:
    description:
      - A .zip file containing your deployment package
      - If O(state=present) then either O(zip_file) or O(s3_bucket) must be present.
    aliases: [ 'src' ]
    type: str
  s3_bucket:
    description:
      - Amazon S3 bucket name where the .zip file containing your deployment package is stored.
      - If O(state=present) then either O(zip_file) or O(s3_bucket) must be present.
      - O(s3_bucket) and O(s3_key) are required together.
    type: str
  s3_key:
    description:
      - The Amazon S3 object (the deployment package) key name you want to upload.
      - O(s3_bucket) and O(s3_key) are required together.
    type: str
  s3_object_version:
    description:
      - The Amazon S3 object (the deployment package) version you want to upload.
    type: str
  description:
    description:
      - A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit.
    type: str
    default: ''
  timeout:
    description:
      - The function maximum execution time in seconds after which Lambda should terminate the function.
    default: 3
    type: int
  memory_size:
    description:
      - The amount of memory, in MB, your Lambda function is given.
    default: 128
    type: int
  vpc_subnet_ids:
    description:
      - List of subnet IDs to run Lambda function in.
      - Use this option if you need to access resources in your VPC. Leave empty if you don't want to run the function in a VPC.
      - If set, O(vpc_security_group_ids) must also be set.
    type: list
    elements: str
  vpc_security_group_ids:
    description:
      - List of VPC security group IDs to associate with the Lambda function.
      - Required when O(vpc_subnet_ids) is used.
    type: list
    elements: str
  environment_variables:
    description:
      - A dictionary of environment variables the Lambda function is given.
    type: dict
  dead_letter_arn:
    description:
      - The parent object that contains the target Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    type: str
  tracing_mode:
    description:
      - Set mode to 'Active' to sample and trace incoming requests with AWS X-Ray. Turned off (set to 'PassThrough') by default.
    choices: ['Active', 'PassThrough']
    type: str
  kms_key_arn:
    description:
      - The KMS key ARN used to encrypt the function's environment variables.
    type: str
    version_added: 3.3.0
    version_added_collection: community.aws
  architecture:
    description:
      - The instruction set architecture that the function supports.
      - Requires one of O(s3_bucket) or O(zip_file).
    type: str
    choices: ['x86_64', 'arm64']
    aliases: ['architectures']
    version_added: 5.0.0
  layers:
    description:
      - A list of function layers to add to the function's execution environment.
      - Specify each layer by its ARN, including the version.
    suboptions:
        layer_version_arn:
            description:
            - The ARN of the layer version.
            - Mutually exclusive with O(layers.layer_name).
            type: str
        layer_name:
            description:
            - The name or Amazon Resource Name (ARN) of the layer.
            - Mutually exclusive with O(layers.layer_version_arn).
            type: str
            aliases: ['layer_arn']
        version:
            description:
            - The version number.
            - Required when O(layers.layer_name) is provided, ignored if not.
            type: int
            aliases: ['layer_version']
    type: list
    elements: dict
    version_added: 5.5.0
  image_uri:
    description:
      - The Amazon ECR URI of the image to use.
      - Required (alternative to runtime zip_file and s3_bucket) when creating a function.
      - Required when O(state=present).
    type: str
    version_added: 7.3.0
author:
  - 'Steyn Huizinga (@steynovich)'
extends_documentation_fragment:
  - amazon.aws.common.modules
  - amazon.aws.region.modules
  - amazon.aws.tags
  - amazon.aws.boto3
aR  
# Create Lambda functions
- name: looped creation
  amazon.aws.lambda:
    name: '{{ item.name }}'
    state: present
    zip_file: '{{ item.zip_file }}'
    runtime: 'python2.7'
    role: 'arn:aws:iam::123456789012:role/lambda_basic_execution'
    handler: 'hello_python.my_handler'
    vpc_subnet_ids:
      - subnet-123abcde
      - subnet-edcba321
    vpc_security_group_ids:
      - sg-123abcde
      - sg-edcba321
    environment_variables: '{{ item.env_vars }}'
    tags:
      key1: 'value1'
  loop:
    - name: HelloWorld
      zip_file: hello-code.zip
      env_vars:
        key1: "first"
        key2: "second"
    - name: ByeBye
      zip_file: bye-code.zip
      env_vars:
        key1: "1"
        key2: "2"

# To remove previously added tags pass an empty dict
- name: remove tags
  amazon.aws.lambda:
    name: 'Lambda function'
    state: present
    zip_file: 'code.zip'
    runtime: 'python2.7'
    role: 'arn:aws:iam::123456789012:role/lambda_basic_execution'
    handler: 'hello_python.my_handler'
    tags: {}

# Basic Lambda function deletion
- name: Delete Lambda functions HelloWorld and ByeBye
  amazon.aws.lambda:
    name: '{{ item }}'
    state: absent
  loop:
    - HelloWorld
    - ByeBye

# Create Lambda functions with function layers
- name: looped creation
  amazon.aws.lambda:
    name: 'HelloWorld'
    state: present
    zip_file: 'hello-code.zip'
    runtime: 'python2.7'
    role: 'arn:aws:iam::123456789012:role/lambda_basic_execution'
    handler: 'hello_python.my_handler'
    layers:
      - layer_version_arn: 'arn:aws:lambda:us-east-1:123456789012:layer:python27-env:7'
a  
code:
    description: The lambda function's code returned by get_function in boto3.
    returned: success
    type: dict
    contains:
        location:
            description:
                - The presigned URL you can use to download the function's .zip file that you previously uploaded.
                - The URL is valid for up to 10 minutes.
            returned: success
            type: str
            sample: 'https://prod-04-2014-tasks.s3.us-east-1.amazonaws.com/snapshots/sample'
        repository_type:
            description: The repository from which you can download the function.
            returned: success
            type: str
            sample: 'S3'
configuration:
    description: The Lambda function's configuration metadata returned by get_function in boto3.
    returned: success
    type: dict
    contains:
        architectures:
            description: The architectures supported by the function.
            type: list
            elements: str
            sample: ['arm64']
        code_sha256:
            description: The SHA256 hash of the function's deployment package.
            returned: success
            type: str
            sample: 'zOAGfF5JLFuzZoSNirUtOrQp+S341IOA3BcoXXoaIaU='
        code_size:
            description: The size of the function's deployment package in bytes.
            returned: success
            type: int
            sample: 123
        dead_letter_config:
            description: The function's dead letter queue.
            returned: when the function has a dead letter queue configured
            type: dict
            sample: { 'target_arn': arn:aws:lambda:us-east-1:123456789012:function:myFunction:1 }
            contains:
                target_arn:
                    description: The ARN of an SQS queue or SNS topic.
                    returned: when the function has a dead letter queue configured
                    type: str
                    sample: arn:aws:lambda:us-east-1:123456789012:function:myFunction:1
        description:
            description: The function's description.
            returned: success
            type: str
            sample: 'My function'
        environment:
            description: The function's environment variables.
            returned: when environment variables exist
            type: dict
            contains:
                variables:
                    description: Environment variable key-value pairs.
                    returned: when environment variables exist
                    type: dict
                    sample: {'key': 'value'}
                error:
                    description: Error message for environment variables that could not be applied.
                    returned: when there is an error applying environment variables
                    type: dict
                    contains:
                        error_code:
                            description: The error code.
                            returned: when there is an error applying environment variables
                            type: str
                        message:
                            description: The error message.
                            returned: when there is an error applying environment variables
                            type: str
        function_arn:
            description: The function's Amazon Resource Name (ARN).
            returned: on success
            type: str
            sample: 'arn:aws:lambda:us-east-1:123456789012:function:myFunction:1'
        function_name:
            description: The function's name.
            returned: on success
            type: str
            sample: 'myFunction'
        handler:
            description: The function Lambda calls to begin executing your function.
            returned: on success
            type: str
            sample: 'index.handler'
        last_modified:
            description: The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ssTZD).
            returned: on success
            type: str
            sample: '2017-08-01T00:00:00.000+0000'
        memory_size:
            description: The memory allocated to the function.
            returned: on success
            type: int
            sample: 128
        revision_id:
            description: The latest updated revision of the function or alias.
            returned: on success
            type: str
            sample: 'a2x9886d-d48a-4a0c-ab64-82abc005x80c'
        role:
            description: The function's execution role.
            returned: on success
            type: str
            sample: 'arn:aws:iam::123456789012:role/lambda_basic_execution'
        runtime:
            description: The funtime environment for the Lambda function.
            returned: on success
            type: str
            sample: 'nodejs6.10'
        tracing_config:
            description: The function's AWS X-Ray tracing configuration.
            returned: on success
            type: dict
            sample: { 'mode': 'Active' }
            contains:
                mode:
                    description: The tracing mode.
                    returned: on success
                    type: str
                    sample: 'Active'
        timeout:
            description: The amount of time that Lambda allows a function to run before terminating it.
            returned: on success
            type: int
            sample: 3
        version:
            description: The version of the Lambda function.
            returned: on success
            type: str
            sample: '1'
        vpc_config:
            description: The function's networking configuration.
            returned: on success
            type: dict
            sample: {
              'security_group_ids': [],
              'subnet_ids': [],
              'vpc_id': '123'
            }
        layers:
            description: The function's layers.
            returned: on success
            version_added: 5.5.0
            type: complex
            contains:
                arn:
                    description: The Amazon Resource Name (ARN) of the function layer.
                    returned: always
                    type: str
                    sample: active
                code_size:
                    description: The size of the layer archive in bytes.
                    returned: always
                    type: str
                signing_profile_version_arn:
                    description: The Amazon Resource Name (ARN) for a signing profile version.
                    returned: always
                    type: str
                signing_job_arn:
                    description: The Amazon Resource Name (ARN) of a signing job.
                    returned: always
                    type: str
    N)Counter)BotoCoreError)ClientError)WaiterError)camel_dict_to_snake_dict)is_boto3_error_code)get_aws_account_info)AnsibleAWSModule)AWSRetry)compare_aws_tagsc                 ~    	 || j                  ||d      S | j                  |d      S # t        d      $ r Y y w xY w)NT)FunctionName	Qualifier	aws_retryr   r   ResourceNotFoundException)get_functionr   )
connectionfunction_name	qualifiers      e/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/amazon/aws/plugins/modules/lambda.pyget_current_functionr     sU     **QZfj*kk&&MT&RR:; s   + + <<c                     	 |j                  |d      d   }|D ]  }|d   |k(  s|d   c S  | j                  d| d|        y # t        d	      $ r | j                  d
| d       Y y w xY w)NT)	LayerNamer   LayerVersionsVersionLayerVersionArnzUnable to find version z from Lambda layer msgr   zLambda layer z
 not found)list_layer_versions	fail_jsonr   )moduler   
layer_nameversion_numberlayer_versionsvs         r   get_layer_version_arnr'     s    E#77*X\7]^mn 	,A|~-*++	, 	6~6FFYZdYefg:; E}ZL
CDEs   #A A A $A.-A.c                    t        j                         }t        | d      5 }|j                  |j	                                d d d        |j                         }t        j                  |      }|j                  d      }|S # 1 sw Y   AxY w)Nrbzutf-8)	hashlibsha256openupdatereaddigestbase64	b64encodedecode)filenamehasherf	code_hashcode_b64
hex_digests         r   	sha256sumr9     sr    ^^F	h	  affh  I	*H)J   s    BB
c                    |yd}|d   d   }	 | j                  |d      j                  di       }t        ||	      \  }	}
|
s|	sy|j                  ry	 |
r| j                  ||
d
       d}|	r| j                  ||	d       d}|S # t        t        f$ r}|j	                  |d       Y d }~}d }~ww xY w# t        t        f$ r!}|j	                  |d|        Y d }~|S d }~ww xY w)NFConfigurationFunctionArnT)Resourcer   TagszUnable to list tagsr   )
purge_tags)r=   TagKeysr   )r=   r>   r   zUnable to tag resource )		list_tagsgetr   r   fail_json_awsr   
check_modeuntag_resourcetag_resource)clientr"   tagsfunctionr?   changedarncurrent_tagsetags_to_addtags_to_removes              r   set_tagrP     s2   |G
?
#M
2C;'''EII&RTU #3<R\"]K+E!!& " 
 G    
 G
 N? ;' ;Q$9::;8 ;' EQ&=cU$CDDNEs/   #B 0B7 B4B//B47C'C""C'c                 8   	 | j                  d      }| j                  d      }|j                  |       |j                  |       y # t        $ r}|j                  |d       Y d }~y d }~wt        t
        f$ r}|j                  |d       Y d }~y d }~ww xY w)Nfunction_activefunction_updated)r   z2Timeout while waiting on lambda to finish updatingr   z1Failed while waiting on lambda to finish updating)
get_waiterwaitr   rC   r   r   )rG   r"   nameclient_active_waiterclient_updated_waiterrM   s         r   wait_for_lambdarY     s    Y%001BC & 1 12D E!!t!4"""5 ZQ$XYY' YQ$WXXYs$   AA	 		BA**B<BBc                 J    | j                  di       }t        |       }||d<   |S )Nr>   rH   )rB   r   )responserH   results      r   format_responser]     s*    <<#D%h/FF6NM    c                     | si S |s$t        |       }|j                  dd      }||k(  ri S t        | d      5 }|j                         }d d d        d|iS # 1 sw Y   diS xY w)N
CodeSha256 r)   ZipFile)r9   rB   r,   r.   )zip_filecurrent_configignore_checksumlocal_checksumremote_checksumr5   zip_contents          r   	_zip_argsri     su    	 "8,(,,\2>_,I	h	 ffh{##{##s   AA c                 J    | si S |si S | |d}|r|j                  d|i       |S )N)S3BucketS3KeyS3ObjectVersion)r-   )	s3_buckets3_keys3_object_versioncodes       r   _s3_argsrr     s7    		!F3D&(9:;Kr^   c                     | si S d| i}|S )NImageUri )	image_urirq   s     r   _image_argsrw     s    		"DKr^   c           	      ~   | j                   j                  d      }| j                   j                  d      }| j                   j                  d      }| j                   j                  d      }| j                   j                  d      }| j                   j                  d      }i }|r;|j                  dd       |gk7  r%| j                  d       |j                  d|gi       	 |j                  t	        ||t        |                   |j                  t        |||             |j                  t        |             |si S |s5|j                  dd       r#|j                  d|j                  dd       i       |S # t        $ r8}	| j                  t        |	      t        j                         	       Y d }	~	d }	~	ww xY w)
Nrn   ro   rp   rc   architecturerv   ArchitectureszArch Change)r   	exception)paramsrB   warnr-   ri   boolIOErrorr!   str	traceback
format_excrr   rw   )
r"   rd   rn   ro   rp   rc   architecturesrv   code_kwargsrM   s
             r   
_code_argsr   '  s   !!+.I]]x(F))*=>}}  ,HMM%%n5M!!+.IK++OTB}oUM"Om_=>G9X~tK?PQR x	63DEF{9-.	^//FO^-?-?QU-VWX  GSVy/C/C/EFFGs   #%E; ;	F<.F77F<c                  j   t        dui dt        d      dt        dddg      dt               d	t               d
t               dt               dt        dg      dt               dt        d      dt               dt        d      dt        dd      dt        dd      dt        dd       d!t        dd       d"t        d#$      d%t               d&t        dd'      d(t        d)d*g+      d,t        d-d.gdd/g0      d1t        d#d2g3      d4t        d5d      d6t        dd#t        t        d$      t        dd7g3      t        dd8g3      9      d:d;ggd<d:ggd:d<gd;d<gg=      } ddgddgddgddgdd	gddgddgddgddgg	}ddgdd!gd	dgg}ddd
ggddd	dgdgd,d-g d>dgd,d.g d>dgg}t        | d|||?      }|j                  j                  d      }|j                  j                  d      j	                         }|j                  j                  d	      }|j                  j                  d
      }|j                  j                  d      }	|j                  j                  d      }
|j                  j                  d      }|j                  j                  d      }|j                  j                  d      }|j                  j                  d!      }|j                  j                  d"      }|j                  j                  d%      }|j                  j                  d(      }|j                  j                  d1      }|j                  j                  d4      }|j                  j                  d&      }|j                  j                  d      }g }|j
                  }d}	 |j                  d@t        j                         A      }|dk(  rt        j                  dD|      r|}nt        |      \  }}dE| dF| dG| }|j                  j                  d6      rp|j                  j                  d6      D ]R  }|j                  d<      }|,t        ||j                  d:      |j                  d;            }|j!                  |       T t#        |      } |dk(  r| r}| dH   }!d }"dI|i}#r|!dJ   |k7  r|#j%                  dJ|i       |	r|!dK   |	k7  r|#j%                  dK|	i       |
r|!dL   |
k7  r|#j%                  dL|
i       |r|!dM   |k7  r|#j%                  dM|i       |r|!dN   |k7  r|#j%                  dN|i       ||!dO   dPk7  r|#j%                  dOdPi       |r|!dQ   |k7  r|#j%                  dQ|i       |:|!j                  dRi       j                  dSi       |k7  r|#j%                  dRdS|ii       |L|!j                  dT      r!|!dT   dU   |k7  r0|#j%                  dTdU|ii       n|dk7  r|#j%                  dTdU|ii       |r:|!j                  dVi       j                  dWd*      |k7  r|#j%                  dVdW|ii       |r|#j%                  dX|i       |rcdY|!v r>|!dY   dZ   }$|!dY   d[   }%t'        |      t'        |$      k7  }&t'        |      t'        |%      k7  }'dY|!vs&s'rG||d\}(|#j%                  dY|(i       n.dY|!v r*|!dY   j                  d]      r|#j%                  dYg g d\i       |rC|!j                  d^g       })t)        |      t)        d_ |)D              k7  r|#j%                  d^|i       t+        |#      d`kD  r-|st-        |||       	 |s |j.                  dudadi|#}*|*db   }"d}|t1        |||| |      rd}t3        ||!      }+|+rA|+j%                  |ddd       |st-        |||       	 |s |j4                  dudadi|+}*|*db   }"d}t#        |||"f      }*|*s|j7                  dgC       t9        |*      }*|+j;                  dhd         |j<                  du||+|#di|* n|dk(  r|d||dj}#t3        |i       },|,s|j7                  dkC       dl|,v r"|#j%                  dl|,j;                  dl      i       |#j%                  dm|,i       |
|#j%                  dL|
i       ||#j%                  dOdPi       ||#j%                  dQ|i       |	|#j%                  dK|	i       |r|#j%                  dRdS|ii       |r|#j%                  dTdU|ii       |r|#j%                  dVdW|ii       |r|#j%                  dX|i       |r|#j%                  dY||d\i       |r|#j%                  d^|i       |r|#j%                  dn|i       |r|j=                  do       d }"	  |j>                  dudadi|#}*|*db   }"d}t#        |||"f      }*|*s|j7                  dqC       t9        |*      }* |j<                  dudr|i|* |dk(  r-| r+	 |s|jA                  |ds       d}|j=                  |o       y |dk(  r|j=                  |o       y y # t        t        f$ r}|j                  |dBC       Y d }~d }~ww xY w# t        t        f$ r}|j                  |dcC       Y d }~&d }~ww xY w# t        t        f$ r}|j                  |deC       Y d }~d }~ww xY w# t        t        f$ r}|j                  |dpC       Y d }~Dd }~ww xY w# t        t        f$ r}|j                  |dtC       Y d }~d }~ww xY w)vNrV   T)requiredstatepresentabsent)defaultchoicesrv   runtimerolehandlerrc   src)aliasesrn   ro   F)no_logrp   descriptionra   )r   timeoutint   )typer   memory_size   vpc_subnet_idslistr   )r   elementsvpc_security_group_idsenvironment_variablesdict)r   dead_letter_arnkms_key_arn)r   r   tracing_modeActivePassThrough)r   ry   x86_64arm64r   )r   r   r   rH   resource_tags)r   r   r?   r~   layers	layer_arnlayer_version)layer_version_arnr#   versionr#   r   r   )r   r   optionsrequired_togetherrequired_one_ofmutually_exclusive)rc   rn   rv   )argument_specsupports_check_moder   r   required_iflambda)retry_decoratorzTrying to connect to AWSr   z^arn:aws(-([a-z\-]+))?:iamzarn:z:iam::z:role/r;   r   RoleHandlerDescriptionTimeout
MemorySizePackageTypeImageRuntimeEnvironment	VariablesDeadLetterConfig	TargetArnTracingConfigMode	KMSKeyArn	VpcConfig	SubnetIdsSecurityGroupIds)r   r   VpcIdLayersc              3   &   K   | ]	  }|d      yw)ArnNru   ).0r5   s     r   	<genexpr>zmain.<locals>.<genexpr>  s     *L1U8*Ls      r   r   z%Trying to update lambda configuration)r   PublishzTrying to upload new code)r   z1Unable to get function information after updatingrb   )rJ   r   func_kwargs)r   r   r   r   r   z,Either S3 object or path to zipfile requiredrz   Coder>   )rJ   zTrying to create functionz1Unable to get function information after creatingrJ   r   z Trying to delete Lambda functionru   )!r   r
   r|   rB   lowerrD   rG   r   jittered_backoffr   r   rC   rematchr	   r'   appendr   r-   sortedr   lenrY   update_function_configurationrP   r   update_function_coder!   r]   pop	exit_jsoncreate_functiondelete_function)-r   r   r   r   r"   rV   r   r   r   r   r   r   r   r   r   r   r   r   rH   r?   r   rv   r   rD   rJ   rG   rM   role_arn
account_id	partitionlayerr   current_functionrd   current_versionr   current_vpc_subnet_idscurrent_vpc_security_group_idssubnet_net_id_changedvpc_security_group_ids_changednew_vpc_configcurrent_layersr[   r   rq   s-                                                r   mainr   F  s    #4 #9y(.CD# &# 	#
 V# # ug&# &# 5!# &# $# %+# eS1# %8#  $%@#  #/!#" ##$ eE2%#& 8]";<'#( 8W"5EOK\])#* v'89+#, VT2-#. "&E"2U[MB%/1BC
 !-i891<@A!-/B CiQdEef
/#ML 
X	[!	()	j!	i 	i 	h	k"	)*
 
;	34	I 
)fX&	)i5t<	#I4P	"H$O	K # -+F ==V$DMMg&,,.Emm	*G==V$Dmm	*G--##M2Kmm	*G--##M2K]]&&'78N#]]../GH"MM--.EFmm''(9:O==$$^4L==V$D""<0J--##M2K!!+.IF""JG@x9R9R9TU 	88148H %9$@!J	i[zl&GH ==X&**84 1$)II.A$B!$,(=		,(?9AU)% /01 ,FD9 	.)/: &t, v.(:12~i0G;	734>-8KG{;<~i0G;	734>,7;Fk:; ^M%Bg%Mw78~i0G;	734!-}b155k2FJ__=R/STU&!!"45!"45kBoU&&(:[/<Z'[\"b(&&(:[/<Z'[\^//DHHQ^_coo&,1GHI[9: n,)7)D[)Q&1?1LM_1`.(.~(>&I_B`(`%178N1OSY2T 2. .04IMk/=Si!j""K#@A n,1L1P1PQX1Y""KrWY1Z#[\ +//"=Nv'*L^*L"MM""Hf#56 {a5U!CvCCbdbVabH&.y&9O
 vvt-=zJ 8FG5I!:v::YTY[YH&.y&9O
 (P!TU"8, 		4(gk{g^fg 
)	 %
 &"%!OPd"/1JKLFD>*"{;< w78	734	734 =R/STU 2[/4RST&,1GHI[9: >_u-vwx &12 ~. T* 	E-v--LLLH&y1OG (P!TU"8,55H5 -	L&&DD&IG 	) 
(	) 
y ' @Q$>??@J ";/ U$$Q,S$TTU* ";/ I$$Q,G$HHIZ {+ 	E  (C DD	E {+ 	L  (J KK	Lsx   7%i i5 <j% k l i2i--i25j"jj"%k4kkl$k==ll2l--l2__main__)N)&DOCUMENTATIONEXAMPLESRETURNr0   r*   r   r   collectionsr   botocore.exceptionsr   r   r   ImportError0ansible.module_utils.common.dict_transformationsr   <ansible_collections.amazon.aws.plugins.module_utils.botocorer   7ansible_collections.amazon.aws.plugins.module_utils.iamr	   ;ansible_collections.amazon.aws.plugins.module_utils.modulesr
   ;ansible_collections.amazon.aws.plugins.module_utils.retriesr   ;ansible_collections.amazon.aws.plugins.module_utils.taggingr   r   r'   r9   rP   rY   r]   ri   rr   rw   r   r   __name__ru   r^   r   <module>r      s   Xt>@j
X   	  	1// V \ X X P XE	(V	Y$ 
>|*~	 zF ]  		s   B BB