You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Running Ruby Sinatra on AWS Lambda
2
2
3
-
This sample code helps get you started with a simple Sinatra web app deployed on AWS Lambda. It is tested with Ruby 2.5.x.
3
+
This sample code helps get you started with a simple Sinatra web app deployed on AWS Lambda. It is tested with Ruby 2.5.x and bundler-1.17.x.
4
4
5
5
Additional details can be found at: https://aws.amazon.com/blogs/compute/announcing-ruby-support-for-aws-lambda/
6
6
@@ -33,19 +33,21 @@ These directions assume you already have Ruby 2.5.x and [AWS CLI](https://docs.a
33
33
34
34
To work on the sample code, you'll need to clone your project's repository to your local computer. If you haven't, do that first. You can find a guide [here](https://help.github.com/articles/cloning-a-repository/).
35
35
36
-
1.Install bundle
36
+
1.Ensure you are using ruby version 2.5.x
37
37
38
-
$ gem install bundler
38
+
2. Install bundle
39
39
40
-
2. Install Ruby dependencies for this service
40
+
$ gem install bundler -v "~> 1.17"
41
+
42
+
3. Install Ruby dependencies for this service
41
43
42
44
$ bundle install
43
45
44
-
3. Download the Gems to the local vendor directory
46
+
4. Download the Gems to the local vendor directory
45
47
46
48
$ bundle install --deployment
47
49
48
-
4. Create the deployment package (note: if you don't have a S3 bucket, you need to create one):
50
+
5. Create the deployment package (note: if you don't have a S3 bucket, you need to create one):
49
51
50
52
$ aws cloudformation package \
51
53
--template-file template.yaml \
@@ -60,7 +62,7 @@ To work on the sample code, you'll need to clone your project's repository to yo
@@ -73,7 +75,7 @@ To work on the sample code, you'll need to clone your project's repository to yo
73
75
--stack-name { your-stack-name } \
74
76
--capabilities CAPABILITY_IAM
75
77
76
-
6. Once the deployment is complete, you can find the application endpoint from the CloudFormation outputs tab. Alternatively, you can find it under the Stages link from the API gateway console.
78
+
7. Once the deployment is complete, you can find the application endpoint from the CloudFormation outputs tab. Alternatively, you can find it under the Stages link from the API gateway console.
77
79
78
80
__Note__:
79
81
You can also use an [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/features/#Details_for_Elastic_Load_Balancing_Products) instead of API gateway.
0 commit comments