AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

Lambda

import "github.com/aws/aws-sdk-go/service/lambda"

type Lambda struct { *client.Client }

Lambda provides the API operation methods for making requests to AWS Lambda. See this package's package overview docs for details on the service.

Lambda methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

AddLayerVersionPermission

func (c *Lambda) AddLayerVersionPermission(input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error)

AddLayerVersionPermission API operation for AWS Lambda.

Adds permissions to the resource-based policy of a version of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.

To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation AddLayerVersionPermission for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodePolicyLengthExceededException "PolicyLengthExceededException" Lambda function access policy is limited to 20 KB.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission

AddLayerVersionPermissionRequest

func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissionInput) (req *request.Request, output *AddLayerVersionPermissionOutput)

AddLayerVersionPermissionRequest generates a "aws/request.Request" representing the client's request for the AddLayerVersionPermission operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AddLayerVersionPermission for more information on using the AddLayerVersionPermission API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AddLayerVersionPermissionRequest method. req, resp := client.AddLayerVersionPermissionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission

AddLayerVersionPermissionWithContext

func (c *Lambda) AddLayerVersionPermissionWithContext(ctx aws.Context, input *AddLayerVersionPermissionInput, opts ...request.Option) (*AddLayerVersionPermissionOutput, error)

AddLayerVersionPermissionWithContext is the same as AddLayerVersionPermission with the addition of the ability to pass a context and additional request options.

See AddLayerVersionPermission for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

AddPermission

func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error)

AddPermission API operation for AWS Lambda.

Grants an AWS service or another account permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.

To grant permission to another account, specify the account ID as the Principal. For AWS services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you can also specify the ARN or owning account of the associated resource as the SourceArn or SourceAccount. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

This action adds a statement to a resource-based permission policy for the function. For more information about function policies, see Lambda Function Policies (https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation AddPermission for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodePolicyLengthExceededException "PolicyLengthExceededException" Lambda function access policy is limited to 20 KB.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission

Example

Lambda AddPermission shared00

add-permission

This example adds a permission for an S3 bucket to invoke a Lambda function.

{ svc := lambda.New(session.New()) input := &lambda.AddPermissionInput{ Action: aws.String("lambda:InvokeFunction"), FunctionName: aws.String("MyFunction"), Principal: aws.String("s3.amazonaws.com"), SourceAccount: aws.String("123456789012"), SourceArn: aws.String("arn:aws:s3:::examplebucket/*"), StatementId: aws.String("ID-1"), } result, err := svc.AddPermission(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeResourceConflictException: fmt.Println(lambda.ErrCodeResourceConflictException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodePolicyLengthExceededException: fmt.Println(lambda.ErrCodePolicyLengthExceededException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

AddPermissionRequest

func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput)

AddPermissionRequest generates a "aws/request.Request" representing the client's request for the AddPermission operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AddPermission for more information on using the AddPermission API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AddPermissionRequest method. req, resp := client.AddPermissionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission

AddPermissionWithContext

func (c *Lambda) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error)

AddPermissionWithContext is the same as AddPermission with the addition of the ability to pass a context and additional request options.

See AddPermission for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateAlias

func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error)

CreateAlias API operation for AWS Lambda.

Creates an alias (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation CreateAlias for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias

CreateAliasRequest

func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration)

CreateAliasRequest generates a "aws/request.Request" representing the client's request for the CreateAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateAlias for more information on using the CreateAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateAliasRequest method. req, resp := client.CreateAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias

CreateAliasWithContext

func (c *Lambda) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*AliasConfiguration, error)

CreateAliasWithContext is the same as CreateAlias with the addition of the ability to pass a context and additional request options.

See CreateAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateEventSourceMapping

func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error)

CreateEventSourceMapping API operation for AWS Lambda.

Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.

For details about each event source type, see the following topics.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation CreateEventSourceMapping for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping

CreateEventSourceMappingRequest

func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration)

CreateEventSourceMappingRequest generates a "aws/request.Request" representing the client's request for the CreateEventSourceMapping operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateEventSourceMapping for more information on using the CreateEventSourceMapping API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateEventSourceMappingRequest method. req, resp := client.CreateEventSourceMappingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping

CreateEventSourceMappingWithContext

func (c *Lambda) CreateEventSourceMappingWithContext(ctx aws.Context, input *CreateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error)

CreateEventSourceMappingWithContext is the same as CreateEventSourceMapping with the addition of the ability to pass a context and additional request options.

See CreateEventSourceMapping for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateFunction

func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error)

CreateFunction API operation for AWS Lambda.

Creates a Lambda function. To create a function, you need a deployment package (https://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html) and an execution role (https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). The deployment package contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.

A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the Publish parameter to create version 1 of your function from its initial configuration.

The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).

If another account or an AWS service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.

To invoke your function directly, use Invoke. To invoke your function in response to events in other AWS services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions (https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-functions.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation CreateFunction for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction

Example

Lambda CreateFunction shared00

create-function

This example creates a Lambda function.

{ svc := lambda.New(session.New()) input := &lambda.CreateFunctionInput{ Code: &lambda.FunctionCode{}, Description: aws.String(""), FunctionName: aws.String("MyFunction"), Handler: aws.String("souce_file.handler_name"), MemorySize: aws.Int64(128), Publish: aws.Bool(true), Role: aws.String("arn:aws:iam::123456789012:role/service-role/role-name"), Runtime: aws.String("nodejs8.10"), Timeout: aws.Int64(15), VpcConfig: &lambda.VpcConfig{}, } result, err := svc.CreateFunction(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeResourceConflictException: fmt.Println(lambda.ErrCodeResourceConflictException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeCodeStorageExceededException: fmt.Println(lambda.ErrCodeCodeStorageExceededException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateFunctionRequest

func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration)

CreateFunctionRequest generates a "aws/request.Request" representing the client's request for the CreateFunction operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateFunction for more information on using the CreateFunction API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateFunctionRequest method. req, resp := client.CreateFunctionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction

CreateFunctionWithContext

func (c *Lambda) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*FunctionConfiguration, error)

CreateFunctionWithContext is the same as CreateFunction with the addition of the ability to pass a context and additional request options.

See CreateFunction for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteAlias

func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error)

DeleteAlias API operation for AWS Lambda.

Deletes a Lambda function alias (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation DeleteAlias for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias

Example

Lambda DeleteAlias shared00

To delete a Lambda function alias

This operation deletes a Lambda function alias

{ svc := lambda.New(session.New()) input := &lambda.DeleteAliasInput{ FunctionName: aws.String("myFunction"), Name: aws.String("alias"), } result, err := svc.DeleteAlias(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteAliasRequest

func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput)

DeleteAliasRequest generates a "aws/request.Request" representing the client's request for the DeleteAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteAlias for more information on using the DeleteAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteAliasRequest method. req, resp := client.DeleteAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias

DeleteAliasWithContext

func (c *Lambda) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error)

DeleteAliasWithContext is the same as DeleteAlias with the addition of the ability to pass a context and additional request options.

See DeleteAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteEventSourceMapping

func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error)

DeleteEventSourceMapping API operation for AWS Lambda.

Deletes an event source mapping (https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html). You can get the identifier of a mapping from the output of ListEventSourceMappings.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation DeleteEventSourceMapping for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to update an EventSource Mapping in CREATING, or tried to delete a EventSource mapping currently in the UPDATING state.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping

Example

Lambda DeleteEventSourceMapping shared00

To delete a Lambda function event source mapping

This operation deletes a Lambda function event source mapping

{ svc := lambda.New(session.New()) input := &lambda.DeleteEventSourceMappingInput{ UUID: aws.String("12345kxodurf3443"), } result, err := svc.DeleteEventSourceMapping(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeResourceInUseException: fmt.Println(lambda.ErrCodeResourceInUseException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteEventSourceMappingRequest

func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration)

DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the client's request for the DeleteEventSourceMapping operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteEventSourceMapping for more information on using the DeleteEventSourceMapping API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteEventSourceMappingRequest method. req, resp := client.DeleteEventSourceMappingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping

DeleteEventSourceMappingWithContext

func (c *Lambda) DeleteEventSourceMappingWithContext(ctx aws.Context, input *DeleteEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error)

DeleteEventSourceMappingWithContext is the same as DeleteEventSourceMapping with the addition of the ability to pass a context and additional request options.

See DeleteEventSourceMapping for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteFunction

func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error)

DeleteFunction API operation for AWS Lambda.

Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For AWS services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation DeleteFunction for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction

Example

Lambda DeleteFunction shared00

To delete a Lambda function

This operation deletes a Lambda function

{ svc := lambda.New(session.New()) input := &lambda.DeleteFunctionInput{ FunctionName: aws.String("myFunction"), Qualifier: aws.String("1"), } result, err := svc.DeleteFunction(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeResourceConflictException: fmt.Println(lambda.ErrCodeResourceConflictException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteFunctionConcurrency

func (c *Lambda) DeleteFunctionConcurrency(input *DeleteFunctionConcurrencyInput) (*DeleteFunctionConcurrencyOutput, error)

DeleteFunctionConcurrency API operation for AWS Lambda.

Removes a concurrent execution limit from a function.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation DeleteFunctionConcurrency for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency

DeleteFunctionConcurrencyRequest

func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurrencyInput) (req *request.Request, output *DeleteFunctionConcurrencyOutput)

DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the client's request for the DeleteFunctionConcurrency operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteFunctionConcurrency for more information on using the DeleteFunctionConcurrency API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteFunctionConcurrencyRequest method. req, resp := client.DeleteFunctionConcurrencyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency

DeleteFunctionConcurrencyWithContext

func (c *Lambda) DeleteFunctionConcurrencyWithContext(ctx aws.Context, input *DeleteFunctionConcurrencyInput, opts ...request.Option) (*DeleteFunctionConcurrencyOutput, error)

DeleteFunctionConcurrencyWithContext is the same as DeleteFunctionConcurrency with the addition of the ability to pass a context and additional request options.

See DeleteFunctionConcurrency for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteFunctionRequest

func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput)

DeleteFunctionRequest generates a "aws/request.Request" representing the client's request for the DeleteFunction operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteFunction for more information on using the DeleteFunction API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteFunctionRequest method. req, resp := client.DeleteFunctionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction

DeleteFunctionWithContext

func (c *Lambda) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error)

DeleteFunctionWithContext is the same as DeleteFunction with the addition of the ability to pass a context and additional request options.

See DeleteFunction for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteLayerVersion

func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error)

DeleteLayerVersion API operation for AWS Lambda.

Deletes a version of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation DeleteLayerVersion for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion

DeleteLayerVersionRequest

func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req *request.Request, output *DeleteLayerVersionOutput)

DeleteLayerVersionRequest generates a "aws/request.Request" representing the client's request for the DeleteLayerVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteLayerVersion for more information on using the DeleteLayerVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteLayerVersionRequest method. req, resp := client.DeleteLayerVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion

DeleteLayerVersionWithContext

func (c *Lambda) DeleteLayerVersionWithContext(ctx aws.Context, input *DeleteLayerVersionInput, opts ...request.Option) (*DeleteLayerVersionOutput, error)

DeleteLayerVersionWithContext is the same as DeleteLayerVersion with the addition of the ability to pass a context and additional request options.

See DeleteLayerVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetAccountSettings

func (c *Lambda) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error)

GetAccountSettings API operation for AWS Lambda.

Retrieves details about your account's limits (https://docs.aws.amazon.com/lambda/latest/dg/limits.html) and usage in an AWS Region.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetAccountSettings for usage and error information.

Returned Error Codes:

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings

Example

Lambda GetAccountSettings shared00

To retrieves a Lambda customer's account settings

This operation retrieves a Lambda customer's account settings

{ svc := lambda.New(session.New()) input := &lambda.GetAccountSettingsInput{} result, err := svc.GetAccountSettings(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetAccountSettingsRequest

func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput)

GetAccountSettingsRequest generates a "aws/request.Request" representing the client's request for the GetAccountSettings operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetAccountSettings for more information on using the GetAccountSettings API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetAccountSettingsRequest method. req, resp := client.GetAccountSettingsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings

GetAccountSettingsWithContext

func (c *Lambda) GetAccountSettingsWithContext(ctx aws.Context, input *GetAccountSettingsInput, opts ...request.Option) (*GetAccountSettingsOutput, error)

GetAccountSettingsWithContext is the same as GetAccountSettings with the addition of the ability to pass a context and additional request options.

See GetAccountSettings for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetAlias

func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error)

GetAlias API operation for AWS Lambda.

Returns details about a Lambda function alias (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetAlias for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias

Example

Lambda GetAlias shared00

To retrieve a Lambda function alias

This operation retrieves a Lambda function alias

{ svc := lambda.New(session.New()) input := &lambda.GetAliasInput{ FunctionName: aws.String("myFunction"), Name: aws.String("myFunctionAlias"), } result, err := svc.GetAlias(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetAliasRequest

func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration)

GetAliasRequest generates a "aws/request.Request" representing the client's request for the GetAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetAlias for more information on using the GetAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetAliasRequest method. req, resp := client.GetAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias

GetAliasWithContext

func (c *Lambda) GetAliasWithContext(ctx aws.Context, input *GetAliasInput, opts ...request.Option) (*AliasConfiguration, error)

GetAliasWithContext is the same as GetAlias with the addition of the ability to pass a context and additional request options.

See GetAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetEventSourceMapping

func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error)

GetEventSourceMapping API operation for AWS Lambda.

Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetEventSourceMapping for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping

Example

Lambda GetEventSourceMapping shared00

To retrieve a Lambda function's event source mapping

This operation retrieves a Lambda function's event source mapping

{ svc := lambda.New(session.New()) input := &lambda.GetEventSourceMappingInput{ UUID: aws.String("123489-xxxxx-kdla8d89d7"), } result, err := svc.GetEventSourceMapping(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetEventSourceMappingRequest

func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration)

GetEventSourceMappingRequest generates a "aws/request.Request" representing the client's request for the GetEventSourceMapping operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetEventSourceMapping for more information on using the GetEventSourceMapping API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetEventSourceMappingRequest method. req, resp := client.GetEventSourceMappingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping

GetEventSourceMappingWithContext

func (c *Lambda) GetEventSourceMappingWithContext(ctx aws.Context, input *GetEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error)

GetEventSourceMappingWithContext is the same as GetEventSourceMapping with the addition of the ability to pass a context and additional request options.

See GetEventSourceMapping for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFunction

func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error)

GetFunction API operation for AWS Lambda.

Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetFunction for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction

Example

Lambda GetFunction shared00

To retrieve a Lambda function's event source mapping

This operation retrieves a Lambda function's event source mapping

{ svc := lambda.New(session.New()) input := &lambda.GetFunctionInput{ FunctionName: aws.String("myFunction"), Qualifier: aws.String("1"), } result, err := svc.GetFunction(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetFunctionConfiguration

func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error)

GetFunctionConfiguration API operation for AWS Lambda.

Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use UpdateFunctionConfiguration.

To get all of a function's details, including function-level settings, use GetFunction.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetFunctionConfiguration for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration

Example

Lambda GetFunctionConfiguration shared00

To retrieve a Lambda function's event source mapping

This operation retrieves a Lambda function's event source mapping

{ svc := lambda.New(session.New()) input := &lambda.GetFunctionConfigurationInput{ FunctionName: aws.String("myFunction"), Qualifier: aws.String("1"), } result, err := svc.GetFunctionConfiguration(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetFunctionConfigurationRequest

func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration)

GetFunctionConfigurationRequest generates a "aws/request.Request" representing the client's request for the GetFunctionConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFunctionConfiguration for more information on using the GetFunctionConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFunctionConfigurationRequest method. req, resp := client.GetFunctionConfigurationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration

GetFunctionConfigurationWithContext

func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *GetFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error)

GetFunctionConfigurationWithContext is the same as GetFunctionConfiguration with the addition of the ability to pass a context and additional request options.

See GetFunctionConfiguration for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFunctionRequest

func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput)

GetFunctionRequest generates a "aws/request.Request" representing the client's request for the GetFunction operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFunction for more information on using the GetFunction API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFunctionRequest method. req, resp := client.GetFunctionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction

GetFunctionWithContext

func (c *Lambda) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error)

GetFunctionWithContext is the same as GetFunction with the addition of the ability to pass a context and additional request options.

See GetFunction for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetLayerVersion

func (c *Lambda) GetLayerVersion(input *GetLayerVersionInput) (*GetLayerVersionOutput, error)

GetLayerVersion API operation for AWS Lambda.

Returns information about a version of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html), with a link to download the layer archive that's valid for 10 minutes.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetLayerVersion for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion

GetLayerVersionPolicy

func (c *Lambda) GetLayerVersionPolicy(input *GetLayerVersionPolicyInput) (*GetLayerVersionPolicyOutput, error)

GetLayerVersionPolicy API operation for AWS Lambda.

Returns the permission policy for a version of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). For more information, see AddLayerVersionPermission.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetLayerVersionPolicy for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy

GetLayerVersionPolicyRequest

func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput)

GetLayerVersionPolicyRequest generates a "aws/request.Request" representing the client's request for the GetLayerVersionPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetLayerVersionPolicy for more information on using the GetLayerVersionPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetLayerVersionPolicyRequest method. req, resp := client.GetLayerVersionPolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy

GetLayerVersionPolicyWithContext

func (c *Lambda) GetLayerVersionPolicyWithContext(ctx aws.Context, input *GetLayerVersionPolicyInput, opts ...request.Option) (*GetLayerVersionPolicyOutput, error)

GetLayerVersionPolicyWithContext is the same as GetLayerVersionPolicy with the addition of the ability to pass a context and additional request options.

See GetLayerVersionPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetLayerVersionRequest

func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput)

GetLayerVersionRequest generates a "aws/request.Request" representing the client's request for the GetLayerVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetLayerVersion for more information on using the GetLayerVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetLayerVersionRequest method. req, resp := client.GetLayerVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion

GetLayerVersionWithContext

func (c *Lambda) GetLayerVersionWithContext(ctx aws.Context, input *GetLayerVersionInput, opts ...request.Option) (*GetLayerVersionOutput, error)

GetLayerVersionWithContext is the same as GetLayerVersion with the addition of the ability to pass a context and additional request options.

See GetLayerVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetPolicy

func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error)

GetPolicy API operation for AWS Lambda.

Returns the resource-based IAM policy (https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) for a function, version, or alias.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation GetPolicy for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy

Example

Lambda GetPolicy shared00

To retrieve a Lambda function policy

This operation retrieves a Lambda function policy

{ svc := lambda.New(session.New()) input := &lambda.GetPolicyInput{ FunctionName: aws.String("myFunction"), Qualifier: aws.String("1"), } result, err := svc.GetPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetPolicyRequest

func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput)

GetPolicyRequest generates a "aws/request.Request" representing the client's request for the GetPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetPolicy for more information on using the GetPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetPolicyRequest method. req, resp := client.GetPolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy

GetPolicyWithContext

func (c *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error)

GetPolicyWithContext is the same as GetPolicy with the addition of the ability to pass a context and additional request options.

See GetPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

Invoke

func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error)

Invoke API operation for AWS Lambda.

Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log (https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html) and trace (https://docs.aws.amazon.com/lambda/latest/dg/dlq.html). To record function errors for asynchronous invocations, configure your function with a dead letter queue (https://docs.aws.amazon.com/lambda/latest/dg/dlq.html).

The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors (https://docs.aws.amazon.com/lambda/latest/dg/limits.html), or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).

For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.

This operation requires permission for the lambda:InvokeFunction action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation Invoke for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidRequestContentException "InvalidRequestContentException" The request body could not be parsed as JSON.

  • ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException" The content type of the Invoke request body is not JSON.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeEC2UnexpectedException "EC2UnexpectedException" AWS Lambda received an unexpected EC2 client exception while setting up for the Lambda function.

  • ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException" AWS Lambda was not able to set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.

  • ErrCodeENILimitReachedException "ENILimitReachedException" AWS Lambda was not able to create an Elastic Network Interface (ENI) in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached.

  • ErrCodeEC2ThrottledException "EC2ThrottledException" AWS Lambda was throttled by Amazon EC2 during Lambda function initialization using the execution role provided for the Lambda function.

  • ErrCodeEC2AccessDeniedException "EC2AccessDeniedException" Need additional permissions to configure VPC settings.

  • ErrCodeInvalidSubnetIDException "InvalidSubnetIDException" The Subnet ID provided in the Lambda function VPC configuration is invalid.

  • ErrCodeInvalidSecurityGroupIDException "InvalidSecurityGroupIDException" The Security Group ID provided in the Lambda function VPC configuration is invalid.

  • ErrCodeInvalidZipFileException "InvalidZipFileException" AWS Lambda could not unzip the deployment package.

  • ErrCodeKMSDisabledException "KMSDisabledException" Lambda was unable to decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.

  • ErrCodeKMSInvalidStateException "KMSInvalidStateException" Lambda was unable to decrypt the environment variables because the KMS key used is in an invalid state for Decrypt. Check the function's KMS key settings.

  • ErrCodeKMSAccessDeniedException "KMSAccessDeniedException" Lambda was unable to decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.

  • ErrCodeKMSNotFoundException "KMSNotFoundException" Lambda was unable to decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.

  • ErrCodeInvalidRuntimeException "InvalidRuntimeException" The runtime or runtime version specified is not supported.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke

Example

Lambda Invoke shared00

To invoke a Lambda function

This operation invokes a Lambda function

{ svc := lambda.New(session.New()) input := &lambda.InvokeInput{ ClientContext: aws.String("MyApp"), FunctionName: aws.String("MyFunction"), InvocationType: aws.String("Event"), LogType: aws.String("Tail"), Payload: []byte("fileb://file-path/input.json"), Qualifier: aws.String("1"), } result, err := svc.Invoke(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidRequestContentException: fmt.Println(lambda.ErrCodeInvalidRequestContentException, aerr.Error()) case lambda.ErrCodeRequestTooLargeException: fmt.Println(lambda.ErrCodeRequestTooLargeException, aerr.Error()) case lambda.ErrCodeUnsupportedMediaTypeException: fmt.Println(lambda.ErrCodeUnsupportedMediaTypeException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeEC2UnexpectedException: fmt.Println(lambda.ErrCodeEC2UnexpectedException, aerr.Error()) case lambda.ErrCodeSubnetIPAddressLimitReachedException: fmt.Println(lambda.ErrCodeSubnetIPAddressLimitReachedException, aerr.Error()) case lambda.ErrCodeENILimitReachedException: fmt.Println(lambda.ErrCodeENILimitReachedException, aerr.Error()) case lambda.ErrCodeEC2ThrottledException: fmt.Println(lambda.ErrCodeEC2ThrottledException, aerr.Error()) case lambda.ErrCodeEC2AccessDeniedException: fmt.Println(lambda.ErrCodeEC2AccessDeniedException, aerr.Error()) case lambda.ErrCodeInvalidSubnetIDException: fmt.Println(lambda.ErrCodeInvalidSubnetIDException, aerr.Error()) case lambda.ErrCodeInvalidSecurityGroupIDException: fmt.Println(lambda.ErrCodeInvalidSecurityGroupIDException, aerr.Error()) case lambda.ErrCodeInvalidZipFileException: fmt.Println(lambda.ErrCodeInvalidZipFileException, aerr.Error()) case lambda.ErrCodeKMSDisabledException: fmt.Println(lambda.ErrCodeKMSDisabledException, aerr.Error()) case lambda.ErrCodeKMSInvalidStateException: fmt.Println(lambda.ErrCodeKMSInvalidStateException, aerr.Error()) case lambda.ErrCodeKMSAccessDeniedException: fmt.Println(lambda.ErrCodeKMSAccessDeniedException, aerr.Error()) case lambda.ErrCodeKMSNotFoundException: fmt.Println(lambda.ErrCodeKMSNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidRuntimeException: fmt.Println(lambda.ErrCodeInvalidRuntimeException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

InvokeAsync

func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error)

InvokeAsync API operation for AWS Lambda.

For asynchronous function invocation, use Invoke.

Invokes a function asynchronously.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation InvokeAsync for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidRequestContentException "InvalidRequestContentException" The request body could not be parsed as JSON.

  • ErrCodeInvalidRuntimeException "InvalidRuntimeException" The runtime or runtime version specified is not supported.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync

Deprecated: InvokeAsync has been deprecated

Example

Lambda InvokeAsync shared00

To invoke a Lambda function asynchronously

This operation invokes a Lambda function asynchronously

{ svc := lambda.New(session.New()) input := &lambda.InvokeAsyncInput{ FunctionName: aws.String("myFunction"), InvokeArgs: aws.ReadSeekCloser(strings.NewReader("fileb://file-path/input.json")), } result, err := svc.InvokeAsync(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidRequestContentException: fmt.Println(lambda.ErrCodeInvalidRequestContentException, aerr.Error()) case lambda.ErrCodeInvalidRuntimeException: fmt.Println(lambda.ErrCodeInvalidRuntimeException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

InvokeAsyncRequest

func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput)

InvokeAsyncRequest generates a "aws/request.Request" representing the client's request for the InvokeAsync operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See InvokeAsync for more information on using the InvokeAsync API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the InvokeAsyncRequest method. req, resp := client.InvokeAsyncRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync

Deprecated: InvokeAsync has been deprecated

InvokeAsyncWithContext

func (c *Lambda) InvokeAsyncWithContext(ctx aws.Context, input *InvokeAsyncInput, opts ...request.Option) (*InvokeAsyncOutput, error)

InvokeAsyncWithContext is the same as InvokeAsync with the addition of the ability to pass a context and additional request options.

See InvokeAsync for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

Deprecated: InvokeAsyncWithContext has been deprecated

See Also

For more information about using this API, see AWS API Documentation.

InvokeRequest

func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput)

InvokeRequest generates a "aws/request.Request" representing the client's request for the Invoke operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See Invoke for more information on using the Invoke API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the InvokeRequest method. req, resp := client.InvokeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke

InvokeWithContext

func (c *Lambda) InvokeWithContext(ctx aws.Context, input *InvokeInput, opts ...request.Option) (*InvokeOutput, error)

InvokeWithContext is the same as Invoke with the addition of the ability to pass a context and additional request options.

See Invoke for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListAliases

func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error)

ListAliases API operation for AWS Lambda.

Returns a list of aliases (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) for a Lambda function.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListAliases for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases

Example

Lambda ListAliases shared00

To retrieve a Lambda function aliases

This operation retrieves a Lambda function's aliases

{ svc := lambda.New(session.New()) input := &lambda.ListAliasesInput{ FunctionName: aws.String("myFunction"), FunctionVersion: aws.String("1"), Marker: aws.String(""), MaxItems: aws.Int64(123), } result, err := svc.ListAliases(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListAliasesRequest

func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput)

ListAliasesRequest generates a "aws/request.Request" representing the client's request for the ListAliases operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListAliases for more information on using the ListAliases API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListAliasesRequest method. req, resp := client.ListAliasesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases

ListAliasesWithContext

func (c *Lambda) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error)

ListAliasesWithContext is the same as ListAliases with the addition of the ability to pass a context and additional request options.

See ListAliases for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListEventSourceMappings

func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error)

ListEventSourceMappings API operation for AWS Lambda.

Lists event source mappings. Specify an EventSourceArn to only show event source mappings for a single event source.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListEventSourceMappings for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings

ListEventSourceMappingsPages

func (c *Lambda) ListEventSourceMappingsPages(input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool) error

ListEventSourceMappingsPages iterates over the pages of a ListEventSourceMappings operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListEventSourceMappings method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListEventSourceMappings operation. pageNum := 0 err := client.ListEventSourceMappingsPages(params, func(page *ListEventSourceMappingsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListEventSourceMappingsPagesWithContext

func (c *Lambda) ListEventSourceMappingsPagesWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool, opts ...request.Option) error

ListEventSourceMappingsPagesWithContext same as ListEventSourceMappingsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListEventSourceMappingsRequest

func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput)

ListEventSourceMappingsRequest generates a "aws/request.Request" representing the client's request for the ListEventSourceMappings operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListEventSourceMappings for more information on using the ListEventSourceMappings API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListEventSourceMappingsRequest method. req, resp := client.ListEventSourceMappingsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings

ListEventSourceMappingsWithContext

func (c *Lambda) ListEventSourceMappingsWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, opts ...request.Option) (*ListEventSourceMappingsOutput, error)

ListEventSourceMappingsWithContext is the same as ListEventSourceMappings with the addition of the ability to pass a context and additional request options.

See ListEventSourceMappings for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListFunctions

func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error)

ListFunctions API operation for AWS Lambda.

Returns a list of Lambda functions, with the version-specific configuration of each.

Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version. To get more information about a function or version, use GetFunction.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListFunctions for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions

Example

Lambda ListFunctions shared00

To retrieve a list of Lambda functions

This operation retrieves a Lambda functions

{ svc := lambda.New(session.New()) input := &lambda.ListFunctionsInput{ Marker: aws.String(""), MaxItems: aws.Int64(123), } result, err := svc.ListFunctions(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListFunctionsPages

func (c *Lambda) ListFunctionsPages(input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool) error

ListFunctionsPages iterates over the pages of a ListFunctions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListFunctions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListFunctions operation. pageNum := 0 err := client.ListFunctionsPages(params, func(page *ListFunctionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListFunctionsPagesWithContext

func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool, opts ...request.Option) error

ListFunctionsPagesWithContext same as ListFunctionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListFunctionsRequest

func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput)

ListFunctionsRequest generates a "aws/request.Request" representing the client's request for the ListFunctions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListFunctions for more information on using the ListFunctions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListFunctionsRequest method. req, resp := client.ListFunctionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions

ListFunctionsWithContext

func (c *Lambda) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error)

ListFunctionsWithContext is the same as ListFunctions with the addition of the ability to pass a context and additional request options.

See ListFunctions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListLayerVersions

func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error)

ListLayerVersions API operation for AWS Lambda.

Lists the versions of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). Versions that have been deleted aren't listed. Specify a runtime identifier (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list only versions that indicate that they're compatible with that runtime.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListLayerVersions for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions

ListLayerVersionsRequest

func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput)

ListLayerVersionsRequest generates a "aws/request.Request" representing the client's request for the ListLayerVersions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListLayerVersions for more information on using the ListLayerVersions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListLayerVersionsRequest method. req, resp := client.ListLayerVersionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions

ListLayerVersionsWithContext

func (c *Lambda) ListLayerVersionsWithContext(ctx aws.Context, input *ListLayerVersionsInput, opts ...request.Option) (*ListLayerVersionsOutput, error)

ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of the ability to pass a context and additional request options.

See ListLayerVersions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListLayers

func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error)

ListLayers API operation for AWS Lambda.

Lists AWS Lambda layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) and shows information about the latest version of each. Specify a runtime identifier (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list only layers that indicate that they're compatible with that runtime.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListLayers for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers

ListLayersRequest

func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput)

ListLayersRequest generates a "aws/request.Request" representing the client's request for the ListLayers operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListLayers for more information on using the ListLayers API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListLayersRequest method. req, resp := client.ListLayersRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers

ListLayersWithContext

func (c *Lambda) ListLayersWithContext(ctx aws.Context, input *ListLayersInput, opts ...request.Option) (*ListLayersOutput, error)

ListLayersWithContext is the same as ListLayers with the addition of the ability to pass a context and additional request options.

See ListLayers for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTags

func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error)

ListTags API operation for AWS Lambda.

Returns a function's tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html). You can also view tags with GetFunction.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListTags for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags

ListTagsRequest

func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput)

ListTagsRequest generates a "aws/request.Request" representing the client's request for the ListTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTags for more information on using the ListTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTagsRequest method. req, resp := client.ListTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags

ListTagsWithContext

func (c *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error)

ListTagsWithContext is the same as ListTags with the addition of the ability to pass a context and additional request options.

See ListTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListVersionsByFunction

func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error)

ListVersionsByFunction API operation for AWS Lambda.

Returns a list of versions (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html), with the version-specific configuration of each.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation ListVersionsByFunction for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction

Example

Lambda ListVersionsByFunction shared00

To retrieve a list of Lambda function versions

This operation retrieves a Lambda function versions

{ svc := lambda.New(session.New()) input := &lambda.ListVersionsByFunctionInput{ FunctionName: aws.String("myFunction"), Marker: aws.String(""), MaxItems: aws.Int64(123), } result, err := svc.ListVersionsByFunction(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListVersionsByFunctionRequest

func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput)

ListVersionsByFunctionRequest generates a "aws/request.Request" representing the client's request for the ListVersionsByFunction operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListVersionsByFunction for more information on using the ListVersionsByFunction API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListVersionsByFunctionRequest method. req, resp := client.ListVersionsByFunctionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction

ListVersionsByFunctionWithContext

func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error)

ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of the ability to pass a context and additional request options.

See ListVersionsByFunction for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PublishLayerVersion

func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error)

PublishLayerVersion API operation for AWS Lambda.

Creates an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) from a ZIP archive. Each time you call PublishLayerVersion with the same version name, a new version is created.

Add layers to your function with CreateFunction or UpdateFunctionConfiguration.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation PublishLayerVersion for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion

PublishLayerVersionRequest

func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput)

PublishLayerVersionRequest generates a "aws/request.Request" representing the client's request for the PublishLayerVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PublishLayerVersion for more information on using the PublishLayerVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PublishLayerVersionRequest method. req, resp := client.PublishLayerVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion

PublishLayerVersionWithContext

func (c *Lambda) PublishLayerVersionWithContext(ctx aws.Context, input *PublishLayerVersionInput, opts ...request.Option) (*PublishLayerVersionOutput, error)

PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of the ability to pass a context and additional request options.

See PublishLayerVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PublishVersion

func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error)

PublishVersion API operation for AWS Lambda.

Creates a version (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.

AWS Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration to update the function before publishing a version.

Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation PublishVersion for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion

Example

Lambda PublishVersion shared00

To publish a version of a Lambda function

This operation publishes a version of a Lambda function

{ svc := lambda.New(session.New()) input := &lambda.PublishVersionInput{ CodeSha256: aws.String(""), Description: aws.String(""), FunctionName: aws.String("myFunction"), } result, err := svc.PublishVersion(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeCodeStorageExceededException: fmt.Println(lambda.ErrCodeCodeStorageExceededException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

PublishVersionRequest

func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration)

PublishVersionRequest generates a "aws/request.Request" representing the client's request for the PublishVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PublishVersion for more information on using the PublishVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PublishVersionRequest method. req, resp := client.PublishVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion

PublishVersionWithContext

func (c *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error)

PublishVersionWithContext is the same as PublishVersion with the addition of the ability to pass a context and additional request options.

See PublishVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutFunctionConcurrency

func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error)

PutFunctionConcurrency API operation for AWS Lambda.

Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level.

Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use GetFunction to see the current setting for a function.

Use GetAccountSettings to see your regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see Managing Concurrency (https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation PutFunctionConcurrency for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency

PutFunctionConcurrencyRequest

func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput)

PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the client's request for the PutFunctionConcurrency operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutFunctionConcurrency for more information on using the PutFunctionConcurrency API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutFunctionConcurrencyRequest method. req, resp := client.PutFunctionConcurrencyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency

PutFunctionConcurrencyWithContext

func (c *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error)

PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of the ability to pass a context and additional request options.

See PutFunctionConcurrency for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RemoveLayerVersionPermission

func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error)

RemoveLayerVersionPermission API operation for AWS Lambda.

Removes a statement from the permissions policy for a version of an AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). For more information, see AddLayerVersionPermission.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation RemoveLayerVersionPermission for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission

RemoveLayerVersionPermissionRequest

func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput)

RemoveLayerVersionPermissionRequest generates a "aws/request.Request" representing the client's request for the RemoveLayerVersionPermission operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RemoveLayerVersionPermission for more information on using the RemoveLayerVersionPermission API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RemoveLayerVersionPermissionRequest method. req, resp := client.RemoveLayerVersionPermissionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission

RemoveLayerVersionPermissionWithContext

func (c *Lambda) RemoveLayerVersionPermissionWithContext(ctx aws.Context, input *RemoveLayerVersionPermissionInput, opts ...request.Option) (*RemoveLayerVersionPermissionOutput, error)

RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of the ability to pass a context and additional request options.

See RemoveLayerVersionPermission for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RemovePermission

func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error)

RemovePermission API operation for AWS Lambda.

Revokes function-use permission from an AWS service or another account. You can get the ID of the statement from the output of GetPolicy.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation RemovePermission for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission

Example

Lambda RemovePermission shared00

To remove a Lambda function's permissions

This operation removes a Lambda function's permissions

{ svc := lambda.New(session.New()) input := &lambda.RemovePermissionInput{ FunctionName: aws.String("myFunction"), Qualifier: aws.String("1"), StatementId: aws.String("role-statement-id"), } result, err := svc.RemovePermission(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

RemovePermissionRequest

func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput)

RemovePermissionRequest generates a "aws/request.Request" representing the client's request for the RemovePermission operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RemovePermission for more information on using the RemovePermission API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RemovePermissionRequest method. req, resp := client.RemovePermissionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission

RemovePermissionWithContext

func (c *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error)

RemovePermissionWithContext is the same as RemovePermission with the addition of the ability to pass a context and additional request options.

See RemovePermission for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TagResource

func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error)

TagResource API operation for AWS Lambda.

Adds tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a function.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation TagResource for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource

TagResourceRequest

func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput)

TagResourceRequest generates a "aws/request.Request" representing the client's request for the TagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TagResource for more information on using the TagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TagResourceRequest method. req, resp := client.TagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource

TagResourceWithContext

func (c *Lambda) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error)

TagResourceWithContext is the same as TagResource with the addition of the ability to pass a context and additional request options.

See TagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UntagResource

func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error)

UntagResource API operation for AWS Lambda.

Removes tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from a function.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation UntagResource for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource

UntagResourceRequest

func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput)

UntagResourceRequest generates a "aws/request.Request" representing the client's request for the UntagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UntagResource for more information on using the UntagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UntagResourceRequest method. req, resp := client.UntagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource

UntagResourceWithContext

func (c *Lambda) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error)

UntagResourceWithContext is the same as UntagResource with the addition of the ability to pass a context and additional request options.

See UntagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateAlias

func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error)

UpdateAlias API operation for AWS Lambda.

Updates the configuration of a Lambda function alias (https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation UpdateAlias for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias

Example

Lambda UpdateAlias shared00

To update a Lambda function alias

This operation updates a Lambda function alias

{ svc := lambda.New(session.New()) input := &lambda.UpdateAliasInput{ Description: aws.String(""), FunctionName: aws.String("myFunction"), FunctionVersion: aws.String("1"), Name: aws.String("functionAlias"), } result, err := svc.UpdateAlias(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateAliasRequest

func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration)

UpdateAliasRequest generates a "aws/request.Request" representing the client's request for the UpdateAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateAlias for more information on using the UpdateAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateAliasRequest method. req, resp := client.UpdateAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias

UpdateAliasWithContext

func (c *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error)

UpdateAliasWithContext is the same as UpdateAlias with the addition of the ability to pass a context and additional request options.

See UpdateAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateEventSourceMapping

func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error)

UpdateEventSourceMapping API operation for AWS Lambda.

Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation UpdateEventSourceMapping for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to update an EventSource Mapping in CREATING, or tried to delete a EventSource mapping currently in the UPDATING state.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping

Example

Lambda UpdateEventSourceMapping shared00

To update a Lambda function event source mapping

This operation updates a Lambda function event source mapping

{ svc := lambda.New(session.New()) input := &lambda.UpdateEventSourceMappingInput{ BatchSize: aws.Int64(123), Enabled: aws.Bool(true), FunctionName: aws.String("myFunction"), UUID: aws.String("1234xCy789012"), } result, err := svc.UpdateEventSourceMapping(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeResourceConflictException: fmt.Println(lambda.ErrCodeResourceConflictException, aerr.Error()) case lambda.ErrCodeResourceInUseException: fmt.Println(lambda.ErrCodeResourceInUseException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateEventSourceMappingRequest

func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration)

UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the client's request for the UpdateEventSourceMapping operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateEventSourceMappingRequest method. req, resp := client.UpdateEventSourceMappingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping

UpdateEventSourceMappingWithContext

func (c *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error)

UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of the ability to pass a context and additional request options.

See UpdateEventSourceMapping for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateFunctionCode

func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error)

UpdateFunctionCode API operation for AWS Lambda.

Updates a Lambda function's code.

The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation UpdateFunctionCode for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode

Example

Lambda UpdateFunctionCode shared00

To update a Lambda function's code

This operation updates a Lambda function's code

{ svc := lambda.New(session.New()) input := &lambda.UpdateFunctionCodeInput{ FunctionName: aws.String("myFunction"), Publish: aws.Bool(true), S3Bucket: aws.String("myBucket"), S3Key: aws.String("myKey"), S3ObjectVersion: aws.String("1"), ZipFile: []byte("fileb://file-path/file.zip"), } result, err := svc.UpdateFunctionCode(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeCodeStorageExceededException: fmt.Println(lambda.ErrCodeCodeStorageExceededException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateFunctionCodeRequest

func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration)

UpdateFunctionCodeRequest generates a "aws/request.Request" representing the client's request for the UpdateFunctionCode operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateFunctionCode for more information on using the UpdateFunctionCode API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateFunctionCodeRequest method. req, resp := client.UpdateFunctionCodeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode

UpdateFunctionCodeWithContext

func (c *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error)

UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of the ability to pass a context and additional request options.

See UpdateFunctionCode for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateFunctionConfiguration

func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error)

UpdateFunctionConfiguration API operation for AWS Lambda.

Modify the version-specifc settings of a Lambda function.

These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.

To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an account or AWS service, use AddPermission.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Lambda's API operation UpdateFunctionConfiguration for usage and error information.

Returned Error Codes:

  • ErrCodeServiceException "ServiceException" The AWS Lambda service encountered an internal error.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.

  • ErrCodeInvalidParameterValueException "InvalidParameterValueException" One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.

  • ErrCodeTooManyRequestsException "TooManyRequestsException" Request throughput limit exceeded.

  • ErrCodeResourceConflictException "ResourceConflictException" The resource already exists.

  • ErrCodePreconditionFailedException "PreconditionFailedException" The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias API to retrieve the latest RevisionId for your resource.

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration

Example

Lambda UpdateFunctionConfiguration shared00

To update a Lambda function's configuration

This operation updates a Lambda function's configuration

{ svc := lambda.New(session.New()) input := &lambda.UpdateFunctionConfigurationInput{ Description: aws.String(""), FunctionName: aws.String("myFunction"), Handler: aws.String("index.handler"), MemorySize: aws.Int64(128), Role: aws.String("arn:aws:iam::123456789012:role/lambda_basic_execution"), Runtime: aws.String("python2.7"), Timeout: aws.Int64(123), VpcConfig: &lambda.VpcConfig{}, } result, err := svc.UpdateFunctionConfiguration(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lambda.ErrCodeServiceException: fmt.Println(lambda.ErrCodeServiceException, aerr.Error()) case lambda.ErrCodeResourceNotFoundException: fmt.Println(lambda.ErrCodeResourceNotFoundException, aerr.Error()) case lambda.ErrCodeInvalidParameterValueException: fmt.Println(lambda.ErrCodeInvalidParameterValueException, aerr.Error()) case lambda.ErrCodeTooManyRequestsException: fmt.Println(lambda.ErrCodeTooManyRequestsException, aerr.Error()) case lambda.ErrCodeResourceConflictException: fmt.Println(lambda.ErrCodeResourceConflictException, aerr.Error()) case lambda.ErrCodePreconditionFailedException: fmt.Println(lambda.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateFunctionConfigurationRequest

func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration)

UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the client's request for the UpdateFunctionConfiguration operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateFunctionConfigurationRequest method. req, resp := client.UpdateFunctionConfigurationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration

UpdateFunctionConfigurationWithContext

func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error)

UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of the ability to pass a context and additional request options.

See UpdateFunctionConfiguration for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: