Skip to content

Commit b4a5b56

Browse files
authored
Add explicit instructions for ruby and bundler versions
1 parent 9d8ca79 commit b4a5b56

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Running Ruby Sinatra on AWS Lambda
22

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.
44

55
Additional details can be found at: https://aws.amazon.com/blogs/compute/announcing-ruby-support-for-aws-lambda/
66

@@ -33,19 +33,21 @@ These directions assume you already have Ruby 2.5.x and [AWS CLI](https://docs.a
3333

3434
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/).
3535

36-
1. Install bundle
36+
1. Ensure you are using ruby version 2.5.x
3737

38-
$ gem install bundler
38+
2. Install bundle
3939

40-
2. Install Ruby dependencies for this service
40+
$ gem install bundler -v "~> 1.17"
41+
42+
3. Install Ruby dependencies for this service
4143

4244
$ bundle install
4345

44-
3. Download the Gems to the local vendor directory
46+
4. Download the Gems to the local vendor directory
4547

4648
$ bundle install --deployment
4749

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):
4951

5052
$ aws cloudformation package \
5153
--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
6062
--output-template-file serverless-output.yaml \
6163
--s3-bucket { your-bucket-name }
6264
63-
5. Deploying your application
65+
6. Deploying your application
6466

6567
$ aws cloudformation deploy --template-file serverless-output.yaml \
6668
--stack-name { your-stack-name } \
@@ -73,7 +75,7 @@ To work on the sample code, you'll need to clone your project's repository to yo
7375
--stack-name { your-stack-name } \
7476
--capabilities CAPABILITY_IAM
7577

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.
7779

7880
__Note__:
7981
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

Comments
 (0)