Skip to content

Commit f119447

Browse files
authored
Merge pull request #8 from mdevilliers/refresh-docs
Refresh documentation for release
2 parents c53a679 + 09d77db commit f119447

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

aws/lambda_function.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func ReduceUnAliasedVersions(svc *lambda.Lambda, maxVersions int, metadata deplo
138138

139139
drop := false
140140

141-
// $LATEST is a special poiter to the latest function
141+
// $LATEST is a special pointer to the latest function
142142
// helpfully it isn't returned in the list of aliases
143143
// so we need a special case here
144144
if *(version.Version) == "$LATEST" {

readme.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ Automate the deployment of lambda functions easily from either a developers mach
1111
Goals
1212
-----
1313

14-
- secure by default
15-
- upload and configure lambda functions with a minimum set of AWS permissions.
16-
- sensitive configuration information e.g. database connection credentials are not exposed to either a CI system, developer machine or (shock horror) Github!
17-
- easy to integrate CI or the developer workflow
18-
- integrate cleanly with existing AWS environments
14+
- Manage permissions and secrets :
15+
- AWS permissions are managed centrally with a minimum set exposed
16+
- Sensitive configuration information e.g. database connection credentials are not exposed to either a CI system, developer machine or (shock horror) Github!
17+
- Easy to integrate CI or the developer workflow
18+
- Integrate cleanly with existing AWS environments
19+
- Ability to automatically delete unused functions
1920

2021
Usage
2122
-----
@@ -38,6 +39,8 @@ module "auto_deployer" {
3839
s3_bucket_arn = "${aws_s3_bucket.deployment_uploads.arn}" // arn of the AWS S3 bucket to monitor for uploads
3940
s3_bucket_id = "${aws_s3_bucket.deployment_uploads.id}" // name of the AWS S3 bucket bucket to monitor for uploads
4041
42+
maximum_unaliased_versions = 10 // number of unused functions to be retained
43+
4144
env_vars = {
4245
variables = {
4346
FOO = "BAR" // variables to configure the lambda function with
@@ -61,7 +64,7 @@ export AWS_SECRET_ACCESS_KEY=***********************
6164
lambda-uploader-linux-amd64 up -b myS3Bucket \
6265
-a myAlias \
6366
-d "AUTOMATED DEPLOY" \
64-
-e handler.Handle \
67+
-e myEntry.Point \
6568
-r python2.7 \
6669
-n myFunction /path/to/function.zip
6770

terraform/modules/lamda-deployer/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ resource "aws_lambda_function" "deployer" {
7171

7272
environment {
7373
variables = {
74-
DEPLOYER_FUNCTION_ROLE_ARN = "${var.function_role_arn}"
75-
DEPLOYER_FUNCTION_ENV_VARS = "${jsonencode(var.env_vars["variables"])}"
74+
DEPLOYER_FUNCTION_ROLE_ARN = "${var.function_role_arn}"
75+
DEPLOYER_FUNCTION_ENV_VARS = "${jsonencode(var.env_vars["variables"])}"
7676
DEPLOYER_POLICY_MAX_UNALIASED_VERSIONS = "${var.maximum_unaliased_versions}"
7777
}
7878
}
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
## Inputs
22

3-
| Name | Description | Type | Default | Required |
4-
|------|-------------|:----:|:-----:|:-----:|
5-
| application | The name of the application | string | - | yes |
6-
| deployer_filepath | File path to a zip file containing the deployer | string | - | yes |
7-
| env_vars | A map of variables to be passed to the lambda function on deployment | map | `<map>` | no |
8-
| environment | The name of the environment | string | - | yes |
9-
| function_role_arn | The arn of the role the function will be deployed with | string | - | yes |
10-
| s3_bucket_arn | The arn of the S3 bucket to use for uploading applications from CI | string | - | yes |
11-
| s3_bucket_id | The id of the S3 bucket to use for uploading applications from CI | string | - | yes |
3+
| Name | Description | Type | Default | Required |
4+
| ------ | ------------- | :----: | :-----: | :-----: |
5+
| application | The name of the application | string | - | yes |
6+
| deployer_filepath | File path to a zip file containing the deployer | string | - | yes |
7+
| env_vars | A map of variables to be passed to the lambda function on deployment | map | `<map>` | no |
8+
| environment | The name of the environment | string | - | yes |
9+
| function_role_arn | The arn of the role the function will be deployed with | string | - | yes |
10+
| maximum_unaliased_versions | The number of versions without an alias to keep. A function with an alias is a function in use. | string | `3` | no |
11+
| s3_bucket_arn | The arn of the S3 bucket to use for uploading applications from CI | string | - | yes |
12+
| s3_bucket_id | The id of the S3 bucket to use for uploading applications from CI | string | - | yes |
13+

terraform/modules/lamda-deployer/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ variable "function_role_arn" {
2323
}
2424

2525
variable "env_vars" {
26-
type = "map"
26+
type = "map"
2727
description = "A map of variables to be passed to the lambda function on deployment"
28-
default = {}
28+
default = {}
2929
}
3030

3131
variable "maximum_unaliased_versions" {
32-
description = "The number of versions without an alias to keep. A function with an alias is a function in use."
33-
default = 3
32+
description = "The number of versions without an alias to keep. A function with an alias is a function in use."
33+
default = 3
3434
}

0 commit comments

Comments
 (0)