??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó ßUdac@s6idd6dgd6dd6ZdZdZdZd d lmZd d lmZd d lm Z m Z m Z d d lm Z d dl Z d dlZd dlZd dlZy&d dlmZmZmZmZWnek rånXeed„Zed„Zd„Zd„Zd„Zedkr2eƒndS(s1.1tmetadata_versiontpreviewtstatust communityt supported_bys --- module: lambda short_description: Manage AWS Lambda functions description: - Allows for the management of Lambda functions. version_added: '2.2' requirements: [ boto3 ] options: name: description: - The name you want to assign to the function you are uploading. Cannot be changed. required: true state: description: - Create or delete Lambda function. default: present choices: [ 'present', 'absent' ] 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 C(state=present). - For supported list of runtimes, see U(https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). 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 C(state=present). handler: description: - The function within your code that Lambda calls to begin execution. zip_file: description: - A .zip file containing your deployment package - If C(state=present) then either zip_file or s3_bucket must be present. aliases: [ 'src' ] s3_bucket: description: - Amazon S3 bucket name where the .zip file containing your deployment package is stored. - If C(state=present) then either zip_file or s3_bucket must be present. - C(s3_bucket) and C(s3_key) are required together. s3_key: description: - The Amazon S3 object (the deployment package) key name you want to upload. - C(s3_bucket) and C(s3_key) are required together. s3_object_version: description: - The Amazon S3 object (the deployment package) version you want to upload. description: description: - A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit. timeout: description: - The function maximum execution time in seconds after which Lambda should terminate the function. default: 3 memory_size: description: - The amount of memory, in MB, your Lambda function is given. default: 128 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. vpc_security_group_ids: description: - List of VPC security group IDs to associate with the Lambda function. Required when vpc_subnet_ids is used. environment_variables: description: - A dictionary of environment variables the Lambda function is given. aliases: [ 'environment' ] version_added: "2.3" dead_letter_arn: description: - The parent object that contains the target Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. version_added: "2.3" tags: description: - tag dict to apply to the function (requires botocore 1.5.40 or above). version_added: "2.5" author: - 'Steyn Huizinga (@steynovich)' extends_documentation_fragment: - aws - ec2 s # Create Lambda functions - name: looped creation lambda: name: '{{ item.name }}' state: present zip_file: '{{ item.zip_file }}' runtime: 'python2.7' role: 'arn:aws:iam::987654321012: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 lambda: name: 'Lambda function' state: present zip_file: 'code.zip' runtime: 'python2.7' role: 'arn:aws:iam::987654321012:role/lambda_basic_execution' handler: 'hello_python.my_handler' tags: {} # Basic Lambda function deletion - name: Delete Lambda functions HelloWorld and ByeBye lambda: name: '{{ item }}' state: absent loop: - HelloWorld - ByeBye s= code: description: the lambda function location returned by get_function in boto3 returned: success type: dict sample: { 'location': 'a presigned S3 URL', 'repository_type': 'S3', } configuration: description: the lambda function metadata returned by get_function in boto3 returned: success type: dict sample: { 'code_sha256': 'SHA256 hash', 'code_size': 123, 'description': 'My function', 'environment': { 'variables': { 'key': 'value' } }, 'function_arn': 'arn:aws:lambda:us-east-1:123456789012:function:myFunction:1', 'function_name': 'myFunction', 'handler': 'index.handler', 'last_modified': '2017-08-01T00:00:00.000+0000', 'memory_size': 128, 'role': 'arn:aws:iam::123456789012:role/lambda_basic_execution', 'runtime': 'nodejs6.10', 'timeout': 3, 'version': '1', 'vpc_config': { 'security_group_ids': [], 'subnet_ids': [] } } iÿÿÿÿ(t to_native(tAnsibleAWSModule(tget_aws_connection_infot boto3_conntcamel_dict_to_snake_dict(tcompare_aws_tagsN(t ClientErrort BotoCoreErrortValidationErrortParamValidationErrorc Ks»d}d}ybt|ddddd|d||}|jƒ}|jdƒ}|jdƒjd ƒd }Wn@tk r°yZt|dddd d|d||}|jƒd djd ƒ\} }} } }} Wq±tk r‡} | jd ddkr@t| j ƒ}|j dƒ}|j dƒ}|j d ƒ}n|dkrb|j | ddƒn|dkr­|j | ddƒq­q±t k r¬} |j | ddƒq±XnX||fS(sYreturn the account information (account id and partition) we are currently working on get_account_info tries too find out the account that we are working on. It's not guaranteed that this will be easy so we try in several different ways. Giving either IAM or STS privileges to the account should be enough to permit this. t conn_typetclienttresourcetststregiontendpointtAccounttArnt:itiamtUsertErrortCodet AccessDenieds0arn:(aws(-([a-z\-]+))?):iam::([0-9]{12,32}):\w+/itmsgsgetting account informations&getting account information: partitionN(tNoneRtget_caller_identitytgettsplitR tget_usertresponseRtmessagetsearchtgroupt fail_json_awst Exception(tmoduleRRtaws_connect_kwargst account_idt partitiont sts_clientt caller_idt iam_clienttarntservicetregRtet except_msgtm((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pytget_account_infoÙs4   3  cCsy6|dk r%|jd|d|ƒS|jd|ƒSWnRtk rŠ}y|jdddkrfdSWnttfk r€nX|‚nXdS(Nt FunctionNamet QualifierRRtResourceNotFoundException(Rt get_functionR R#tKeyErrortAttributeError(t connectiont function_namet qualifierR3((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pytget_current_functionþs cCsetjƒ}t|dƒ}|j|jƒƒWdQX|jƒ}tj|ƒ}|jdƒ}|S(Ntrbsutf-8( thashlibtsha256topentupdatetreadtdigesttbase64t b64encodetdecode(tfilenamethashertft code_hashtcode_b64t hex_digest((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pyt sha256sum s  c Cs–t|dƒs"|jddƒnt}|dd}y"|jd|ƒjdiƒ}Wn>tk r˜}|jddjt|ƒƒd tj ƒƒnXt ||d t ƒ\}} yN| rÜ|j d|d | ƒt }n|r|j d|d|ƒt }nWntk rQ}|jdd j|t|ƒƒd tj ƒt|jƒnAtk r‘}|jdd j|t|ƒƒd tj ƒƒnX|S( Nt list_tagsRs,Using tags requires botocore 1.5.40 or abovet Configurationt FunctionArntResourcetTagssUnable to list tags: {0}t exceptiont purge_tagstTagKeyssUnable to tag resource {0}: {1}(thasattrt fail_jsontFalseRRR R tformatRt tracebackt format_excR tTruetuntag_resourcet tag_resourceR R#R ( RR)ttagstfunctiontchangedR0t current_tagsR3t tags_to_addttags_to_remove((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pytset_tags:"     c1%Cs€ tdtdtƒdtdddddgƒdtƒd tƒd tƒd td d gƒdtƒdtƒdtƒdtddƒdtddddƒdtddddƒdtddƒdtddƒdtddƒdtƒdtddƒƒ}d dgd dgd dgg}ddgddgg}dddd d ggg}td |d!td"|d#|d$|ƒ}|jjdƒ}|jjdƒjƒ}|jjdƒ}|jjd ƒ}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/Wqî tk rÚ }|j d&t|ƒdMtjƒƒqî Xn|j d&dSƒi|d26tdF6|d<6|d36|/dT6|d66|d76}#|dk rH |#ji|d56ƒn| dk rk |#ji| d46ƒn|r |#jii|d96d86ƒn|r³ |#jii|d;6d:6ƒn|s¿ |r | sÍ | rà |j d&d>ƒn|#jii|d@6|dA6d?6ƒnd}"y,|s0 |j$|#})|)dD}"nt}Wn,tt fk re }|j |d&dUƒnX|dk rœ t |||t||ƒƒrœ t}qœ nt||dP|"ƒ})|)sÊ |j d&dVƒn|j"dR|t#|)ƒn|dkr] | r] y#|s |j%d2|ƒnt}Wn,tt fk rI }|j |d&dWƒnX|j"dR|ƒn|dkr| |j"dR|ƒndS(XNtnametrequiredtstatetdefaulttpresenttchoicestabsenttruntimetrolethandlertzip_filetaliasestsrct s3_bucketts3_keyts3_object_versiont descriptiontttimeoutttypetintit memory_sizei€tvpc_subnet_idstlisttvpc_security_group_idstenvironment_variablestdicttdead_letter_arnRct argument_spectsupports_check_modetmutually_exclusivetrequired_togethert required_iftboto3Rsregion must be specifiedRRRtlambdaRRsTrying to connect to AWSs^arn:aws(-([a-z\-]+))?:iamsarn:{0}:iam::{1}:role/{2}RSR7tRoletHandlert DescriptiontTimeoutt MemorySizet Environmentt VariablestDeadLetterConfigt TargetArntRuntimes3Cannot change runtime. Please recreate the functionsDvpc connectivity requires at least one security group and one subnett VpcConfigt SubnetIdstSecurityGroupIdstVpcIditVersions%Trying to update lambda configurationtPublishtS3BuckettS3KeytS3ObjectVersiont CodeSha256RAtZipFileRWisTrying to upload new codeR?s1Unable to get function information after updatingRes,Either S3 object or path to zipfile requiredRsTrying to create functions1Unable to get function information after creatings Trying to delete Lambda function(&R„R`RtparamsR tlowert check_modeR\RR[RR R R'tretmatchR6R]R@RREtsortedtlentupdate_function_configurationRRQRDRFtIOErrortstrR^R_Ritupdate_function_codet exit_jsonR tcreate_functiontdelete_function(1R†RˆR‰RŠR)RjRlRqRrRsRwRxRyRtRzR|RR€R‚RƒR…RcR¤ReRtec2_urlR*RR3trole_arnR+R,tcurrent_functiontcurrent_configtcurrent_versiont func_kwargstcurrent_vpc_subnet_idstcurrent_vpc_security_group_idstsubnet_net_id_changedtvpc_security_group_ids_changedtnew_vpc_configR#t code_kwargstlocal_checksumtremote_checksumRMt encoded_ziptcodet zip_content((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pytmainAsŒ               !   ! !    %      ,        )           t__main__(tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils._textRtansible.module_utils.aws.coreRtansible.module_utils.ec2RRR R RHRBR^R¥tbotocore.exceptionsR R R Rt ImportErrorRR6R@RQRiRÁt__name__(((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/lambda.pyts2   X4(    & %  ) ÿ