lamby 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +26 -1
- data/lib/lamby/templates/api_gateway.rb +1 -1
- data/lib/lamby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcbbfe7eddb8acad415555fea80e62f2bd9e7dd265e2c48ec5921e9f97f1e436
|
4
|
+
data.tar.gz: 5c27a927c94e8e49117f384cf17e657be0f75c570fe4d162111ed9775cf66e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a251f3fc0441f08fc8dbcb12a52aef07b10c200fa27728406d53fdc2a15df8dfc5c711fd5c37c313e7ad2663b82c6d481cfe25883c344dff5713b63628b9072
|
7
|
+
data.tar.gz: 40ceda09d0393eadc9e457d3c4f55c9c3812c366f9b63185846be31d848a288139a37f0adecd694f153a683842d60c2d47a8e9511c6cb1dce685469000d84308
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -89,7 +89,7 @@ aws s3 mb "s3://lamby.cloudformation.$(whoami)"
|
|
89
89
|
|
90
90
|
#### Configuration
|
91
91
|
|
92
|
-
We recommend using [Rails Credentials](https://guides.rubyonrails.org/security.html#environmental-security) by setting the `RAILS_MASTER_KEY` environment variable in your `app.rb` file. The value be read from AWS Systems Manager [Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) which Lamby has a client wrapper for. To set
|
92
|
+
We recommend getting started using [Rails Credentials](https://guides.rubyonrails.org/security.html#environmental-security) by setting the `RAILS_MASTER_KEY` environment variable in your `app.rb` file. The value be read from AWS Systems Manager [Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) which Lamby has a client wrapper for. To set the master key value, use the following AWS CLI command.
|
93
93
|
|
94
94
|
```shell
|
95
95
|
aws ssm put-parameter \
|
@@ -105,6 +105,22 @@ ENV['RAILS_MASTER_KEY'] =
|
|
105
105
|
Lamby::SsmParameterStore.get!('/config/my_awesome_lambda/env/RAILS_MASTER_KEY')
|
106
106
|
```
|
107
107
|
|
108
|
+
Finally, updated your `template.yaml` CloudFormation/SAM file by adding this to the `Properties` section of your `RailsFunction`. This addition allows your Lambda's runtime policy to read configs from SSM Parameter store.
|
109
|
+
|
110
|
+
```yaml
|
111
|
+
Policies:
|
112
|
+
- Version: "2012-10-17"
|
113
|
+
Statement:
|
114
|
+
- Effect: Allow
|
115
|
+
Action:
|
116
|
+
- ssm:GetParameter
|
117
|
+
- ssm:GetParameters
|
118
|
+
- ssm:GetParametersByPath
|
119
|
+
- ssm:GetParameterHistory
|
120
|
+
Resource:
|
121
|
+
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/config/my_awesome_lambda/*
|
122
|
+
```
|
123
|
+
|
108
124
|
#### First Deploy!
|
109
125
|
|
110
126
|
Now your Rails app is ready to be deployed to AWS Lambda via CloudFormation & SAM.
|
@@ -113,6 +129,15 @@ Now your Rails app is ready to be deployed to AWS Lambda via CloudFormation & SA
|
|
113
129
|
$ ./bin/deploy
|
114
130
|
```
|
115
131
|
|
132
|
+
To see your newly created Lambda's API Gateway URL, log into the AWS Console or run the following command. This will describe the CloudFormation stack we just deployed and the `Outputs` from that template.
|
133
|
+
|
134
|
+
```shell
|
135
|
+
aws cloudformation describe-stacks \
|
136
|
+
--stack-name "awesomebotlambda-production-us-east-1" | \
|
137
|
+
grep OutputValue | \
|
138
|
+
grep https
|
139
|
+
```
|
140
|
+
|
116
141
|
|
117
142
|
## Additional Documentation
|
118
143
|
|
data/lib/lamby/version.rb
CHANGED