awslambdaget-account-settings# List functions and get extra config infoawslambdalist-functionsawslambdaget-function--function-name<function_name>awslambdaget-function-configuration--function-name<function_name>awslambdalist-function-event-invoke-configs--function-name<function_name>## Check for creds in env varsawslambdalist-functions|jq'.Functions[].Environment'## Download & check the source codeawslambdaget-function--function-name"<func_name>"--query'Code.Location'wget-Olambda-function.zip<url-from-previous-query># Get Lambda URL (if any)awslambdalist-function-url-configs--function-name<function_name>awslambdaget-function-url-config--function-name<function_name># Get who has permissions to invoke the Lambdaawslambdaget-policy--function-name<function_name># Versions and Aliasesawslambdalist-versions-by-function--function-name<func_name>awslambdalist-aliases--function-name<func_name># List layersawslambdalist-layersawslambdalist-layer-versions--layer-name<name>awslambdaget-layer-version--layer-name<name>--version-number<ver>awslambdaget-layer-version-by-arn--arn<name>#Get external ARNs# List other metadataawslambdalist-event-source-mappingsawslambdalist-code-signing-configsawslambdalist-functions-by-code-signing-config--code-signing-config-arn<arn>
调用一个 lambda
手动
# Invoke functionawslambdainvoke--function-nameFUNCTION_NAME/tmp/out## Some functions will expect parameters, they will access them with something like:## target_policys = event['policy_names']## user_name = event['user_name']aws lambda invoke --function-name <name> --cli-binary-format raw-in-base64-out --payload '{"policy_names": ["AdministratorAccess], "user_name": "sdf"}' out.txt