AWS Container Plugin
The AWS container plugin allows you to create, update, invoke, and delete Lambda functions using packages such as .zip files or container images.
You must set up a connection to the AWS server before adding AWS tasks. For more information, see Set up Connection to AWS Server.
In the release flow editor, Container tasks have a blue border.
AWS provides the following features:
- Create Function and Update Function using Image
- Create Function and Update Function using S3 zip
- Delete Function and Invoke Function
Prerequisites
For AWS integration, you need the following:
- AWS server running and accessible via HTTP(s)
- Remote runner setup to run the container tasks
Set up Connection to AWS Server
- From the navigation pane, under CONFIGURATION, click Connections.
- Under HTTP Server connections, next to AWS: Server (Container), click . The New AWS: Server (Container) page opens.
- In the Title field, enter a name for the configuration.
- In the Access Key ID field, enter the AWS access key id.
- In the Secret Access Key field, enter the AWS secret access key.
- If required, enter proxy details.
- To test the connection, click Test.
- To save the configuration, click Save.
Create Function Using Image (Container)
The Create Function Using Image (Container) task creates a Lambda function using the image.
- In the release flow tab of a Release template, add a task of type AWS > Create Function Using Image (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name.
- In the Function Description field, enter a description for the AWS Lambda function.
- In the Role field, enter the Amazon Resource Name (ARN) of the IAM role.
- In the Image Uri field, enter the URI of a container image in the Amazon ECR registry.
- If you want to wait for the function to become active, turn on the Wait for Active State toggle button.
- In the Wait Interval field, enter the value in seconds to define the wait interval between each attempt.
- In the ENTRYPOINT Override field, enter a value to override the entry point value in the image configuration.
- In the CMD Override field, enter a value to override the cmd value in the image configuration.
- In the WORKDIR Override field, enter a value to override the workdir value in the image configuration.
- In the Subnet Ids field, enter one or multiple VPC subnet IDs, separating them using commas.
- In the Security Group Ids field, enter one or multiple VPC security group IDs, separating them using commas.
- In the Timeout field, enter the timeout in seconds.
- In the Memory Size field, enter the memory capacity given to the Lambda function in MB.
- In the Environment table, add the environments in key-value pairs that are accessible from function code during execution.
- If you want to publish the first version of the function during creation, turn on the Publish toggle button.
- In the Tags table, add the tags in key-value pairs that are assigned to the new function.
Update Function Using Image (Container)
The Update Function Using Image (Container) task updates a Lambda function using the image.
- In the release flow tab of a Release template, add a task of type AWS > Update Function Using Image (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name.
- In the Image Uri field, enter the URI of a container image in the Amazon ECR registry.
- If you want to wait for the function to get updated and become successful, turn on the Wait for Successful Status toggle button.
- In the Wait Interval field, enter the value in seconds to define the wait interval between each attempt.
- If you want to publish the new version of the function after update, turn on the Publish toggle button.
Create Function Using S3 Zip (Container)
The Create Function Using S3 Zip (Container) task creates a Lambda function using the S3 zip.
- In the release flow tab of a Release template, add a task of type AWS > Create Function Using S3 Zip (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name.
- In the Function Description field, enter a description for the AWS Lambda function.
- In the S3 Bucket Name field, enter the S3 bucket name where the .zip file containing your deployment package is stored.
- In the S3 Object Key field, enter the path to you .zip file containing your deployment package.
- In the S3 Object Version field, enter the version of your deployment package.
- In the Runtime field, enter the runtime environment for execution.
- In the Role field, enter the Amazon Resource Name (ARN) of the IAM role.
- In the Handler field, enter the function within your code that Lambda calls to begin the execution.
- If you want to wait for the function to become active, turn on the Wait for Active State toggle button.
- In the Wait Interval field, enter the value in seconds to define the wait interval between each attempt.
- In the Timeout field, enter the timeout in seconds.
- In the Subnet Ids field, enter one or multiple VPC subnet IDs, separating them using commas.
- In the Security Group Ids field, enter one or multiple VPC security group IDs, separating them using commas.
- In the Memory Size field, enter the memory capacity given to the Lambda function in MB.
- In the Environment table, add the environments in key-value pairs that are accessible from function code during execution.
- If you want to publish the first version of the function during creation, turn on the Publish toggle button.
- In the Tags table, add the tags in key-value pairs that are assigned to the new function.
Update Function Using S3 Zip (Container)
The Update Function Using S3 Zip (Container) task updates a lambda function using the S3 zip.
- In the release flow tab of a Release template, add a task of type AWS > Update Function Using S3 Zip (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name that must be updated.
- In the S3 Bucket Name field, enter the S3 bucket name where the .zip file containing your deployment package is stored.
- In the S3 Object Key field, enter the path to you .zip file containing your deployment package.
- In the S3 Object Version field, enter the version of your deployment package.
- If you want to wait for the function to get updated and become successful, turn on the Wait for Successful Status toggle button.
- In the Wait Interval field, enter the value in seconds to define the wait interval between each attempt.
- If you want to publish the new version of the function after update, turn on the Publish toggle button.
Invoke Function (Container)
The Invoke Function Using S3 Zip (Container) task invokes a Lambda function.
- In the release flow tab of a Release template, add a task of type AWS > Invoke Function (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name that you want to invoke.
- In the Invocation Type field, select a type from the drop-down list. This types defines how the function is invoked.
- In the Paylod field, enter the JSON that you want to provide to your Lambda function as input.
- In the Client Context field, enter the value of the client context.
- In the Qualifier field, specify a version or alias to invoke a published version of the function.
Delete Function (Container)
The Delete Function Using S3 Zip (Container) task deletes a Lambda function.
- In the release flow tab of a Release template, add a task of type AWS > Delete Function (Container).
- Click the added task to open it.
- In the Capabilities field, enter a value that matches the capability set for your remote runner. This will help you to route jobs to that particular remote runner.
- In the AWS Server field, select the configured AWS server.
- In the Region field, enter the AWS region to be used.
- In the Function Name field, enter the AWS Lambda function name that you want to delete.
- In the Qualifier field, specify a version of the function that you want to delete.