コード例 #1
0
        public void LambdaPublishVersion()
        {
            #region to-publish-a-version-of-a-lambda-function-1481650704986

            var response = client.PublishVersion(new PublishVersionRequest 
            {
                CodeSha256 = "",
                Description = "",
                FunctionName = "myFunction"
            });

            string codeSha256 = response.CodeSha256;
            long codeSize = response.CodeSize;
            string description = response.Description;
            string functionArn = response.FunctionArn;
            string functionName = response.FunctionName;
            string handler = response.Handler;
            string lastModified = response.LastModified;
            int memorySize = response.MemorySize;
            string role = response.Role;
            string runtime = response.Runtime;
            int timeout = response.Timeout;
            string version = response.Version;
            VpcConfigDetail vpcConfig = response.VpcConfig;

            #endregion
        }
コード例 #2
0
        public void LambdaCreateFunction()
        {
            #region create-function-1474653449931

            var response = client.CreateFunction(new CreateFunctionRequest 
            {
                Code = new FunctionCode {  },
                Description = "",
                FunctionName = "MyFunction",
                Handler = "souce_file.handler_name", // is of the form of the name of your source file and then name of your function handler
                MemorySize = 128,
                Publish = true,
                Role = "arn:aws:iam::123456789012:role/service-role/role-name", // replace with the actual arn of the execution role you created
                Runtime = "nodejs8.10",
                Timeout = 15,
                VpcConfig = new VpcConfig {  }
            });

            string codeSha256 = response.CodeSha256;
            long codeSize = response.CodeSize;
            string description = response.Description;
            string functionArn = response.FunctionArn;
            string functionName = response.FunctionName;
            string handler = response.Handler;
            string lastModified = response.LastModified;
            int memorySize = response.MemorySize;
            string role = response.Role;
            string runtime = response.Runtime;
            int timeout = response.Timeout;
            string version = response.Version;
            VpcConfigDetail vpcConfig = response.VpcConfig;

            #endregion
        }
コード例 #3
0
        public void LambdaGetFunctionConfiguration()
        {
            #region to-retrieve-a-lambda-functions-event-source-mapping-1481661622799

            var response = client.GetFunctionConfiguration(new GetFunctionConfigurationRequest 
            {
                FunctionName = "myFunction",
                Qualifier = "1"
            });

            string codeSha256 = response.CodeSha256;
            long codeSize = response.CodeSize;
            DeadLetterConfig deadLetterConfig = response.DeadLetterConfig;
            string description = response.Description;
            EnvironmentResponse environment = response.Environment;
            string functionArn = response.FunctionArn;
            string functionName = response.FunctionName;
            string handler = response.Handler;
            string kmsKeyArn = response.KMSKeyArn;
            string lastModified = response.LastModified;
            int memorySize = response.MemorySize;
            string role = response.Role;
            string runtime = response.Runtime;
            int timeout = response.Timeout;
            string version = response.Version;
            VpcConfigDetail vpcConfig = response.VpcConfig;

            #endregion
        }