The typical deployment workflow comprises one mandatory and two optional phases:
upload the application source code (the 'Deployment Package') – see the Upload File(s) action of the Amazon S3 Object task
create a function – see the Create Function action of the AWS Lambda Function task
(optional) invoke the function – see the Invoke Function action of the AWS Lambda Function task
This effectively comprises a custom Bamboo task, which allows you to implement arbitrary functionality running in AWS Lambda instead of a dedicated task. |
(optional) create an appropriate event source via AWS CloudFormation, e.g. an Amazon Kinesis stream, an Amazon DynamoDB table, or an Amazon SQS queue – see the Create Stack action of the AWS CloudFormation Stack task
create an event source mapping – see the Create Event Source Mapping action of the AWS Lambda Event Source Mapping task
Kinesis and DynamoDB streams can create a huge amount of events in a short time, so you might want to create an event source mapping in the Disabled state and update it to Enabled explicitly at a later stage once the deployment is properly tested. |
(optional) update an event source mapping – see the Update Event Source Mapping action of the AWS Lambda Event Source Mapping task
the event source mapping can be adjusted at any time during its lifetime, for example to enable/disable it during maintenance
add appropriate permissions for the AWS resource to invoke the function – see the Add Permission action of the AWS Lambda Function task
As an alternative to using the AWS Lambda tasks built into Tasks for AWS, it is also possible to provision the Lambda components directly via the AWS CloudFormation Stack task and the corresponding CloudFormation resource types:
A typical workflow based on CloudFormation might look as follows: