Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. AWS
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
CLI로 GetFunctionConfiguration 사용
다음 코드 예시는 GetFunctionConfiguration의 사용 방법을 보여 줍니다.
작업 예제는 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 다음 코드 예제에서는 컨텍스트 내에서 이 작업을 확인할 수 있습니다.
- CLI
-
- AWS CLI
-
Lambda 함수의 버전별 설정 가져오기
다음
get-function-configuration예시에서는my-function함수의 버전 2에 대한 설정을 표시합니다.aws lambda get-function-configuration \ --function-namemy-function:2출력:
{ "FunctionName": "my-function", "LastModified": "2019-09-26T20:28:40.438+0000", "RevisionId": "e52502d4-9320-4688-9cd6-152a6ab7490d", "MemorySize": 256, "Version": "2", "Role": "arn:aws:iam::123456789012:role/service-role/my-function-role-uy3l9qyq", "Timeout": 3, "Runtime": "nodejs10.x", "TracingConfig": { "Mode": "PassThrough" }, "CodeSha256": "5tT2qgzYUHaqwR716pZ2dpkn/0J1FrzJmlKidWoaCgk=", "Description": "", "VpcConfig": { "SubnetIds": [], "VpcId": "", "SecurityGroupIds": [] }, "CodeSize": 304, "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:my-function:2", "Handler": "index.handler" }자세한 내용은 AWS Lambda 개발자 안내서의 AWS Lambda 함수 구성을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetFunctionConfiguration
을 참조하세요.
-
- PowerShell
-
- Tools for PowerShell V4
-
예제 1: 이 예제에서는 Lambda 함수의 버전별 구성을 반환합니다.
Get-LMFunctionConfiguration -FunctionName "MylambdaFunction123" -Qualifier "PowershellAlias"출력:
CodeSha256 : uWOW0R7z+f0VyLuUg7+/D08hkMFsq0SF4seuyUZJ/R8= CodeSize : 1426 DeadLetterConfig : Amazon.Lambda.Model.DeadLetterConfig Description : Verson 3 to test Aliases Environment : Amazon.Lambda.Model.EnvironmentResponse FunctionArn : arn:aws:lambda:us-east-1:123456789012:function:MylambdaFunction123 :PowershellAlias FunctionName : MylambdaFunction123 Handler : lambda_function.launch_instance KMSKeyArn : LastModified : 2019-12-25T09:52:59.872+0000 LastUpdateStatus : Successful LastUpdateStatusReason : LastUpdateStatusReasonCode : Layers : {} MasterArn : MemorySize : 128 RevisionId : 5d7de38b-87f2-4260-8f8a-e87280e10c33 Role : arn:aws:iam::123456789012:role/service-role/lambda Runtime : python3.8 State : Active StateReason : StateReasonCode : Timeout : 600 TracingConfig : Amazon.Lambda.Model.TracingConfigResponse Version : 4 VpcConfig : Amazon.Lambda.Model.VpcConfigDetail-
API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)의 GetFunctionConfiguration을 참조하세요.
-
- Tools for PowerShell V5
-
예제 1: 이 예제에서는 Lambda 함수의 버전별 구성을 반환합니다.
Get-LMFunctionConfiguration -FunctionName "MylambdaFunction123" -Qualifier "PowershellAlias"출력:
CodeSha256 : uWOW0R7z+f0VyLuUg7+/D08hkMFsq0SF4seuyUZJ/R8= CodeSize : 1426 DeadLetterConfig : Amazon.Lambda.Model.DeadLetterConfig Description : Verson 3 to test Aliases Environment : Amazon.Lambda.Model.EnvironmentResponse FunctionArn : arn:aws:lambda:us-east-1:123456789012:function:MylambdaFunction123 :PowershellAlias FunctionName : MylambdaFunction123 Handler : lambda_function.launch_instance KMSKeyArn : LastModified : 2019-12-25T09:52:59.872+0000 LastUpdateStatus : Successful LastUpdateStatusReason : LastUpdateStatusReasonCode : Layers : {} MasterArn : MemorySize : 128 RevisionId : 5d7de38b-87f2-4260-8f8a-e87280e10c33 Role : arn:aws:iam::123456789012:role/service-role/lambda Runtime : python3.8 State : Active StateReason : StateReasonCode : Timeout : 600 TracingConfig : Amazon.Lambda.Model.TracingConfigResponse Version : 4 VpcConfig : Amazon.Lambda.Model.VpcConfigDetail-
API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)의 GetFunctionConfiguration을 참조하세요.
-
GetFunctionConcurrency
GetPolicy