-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull request for the first lab #1
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Daghan Acay <[email protected]>
Signed-off-by: Daghan Acay <[email protected]>
Signed-off-by: Daghan Acay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few spelling and grammar changes and it'll be ready for a merge
.gitignore
Outdated
@@ -1,6 +1,3 @@ | |||
.env | |||
.envrc | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to keep these in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
back
Lab_1_-_First_Function/README.MD
Outdated
1. Create a new project using the Serverless framework create command | ||
### Steps: Create a lambda function | ||
|
||
1. Go to the root folder, e.g. Serverless-AWS-CRUD-Workshop/ and create a new project using the Serverless framework create command where [your service name] is something you call to your service e.g. myTestService. Make sure you do not use speciala characters like underscore "_". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the word "special"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
``` | ||
sls create --template aws-nodejs --name [your service name] | ||
``` | ||
|
||
2. Open the `serverless.yml` file and add the following to the bottom of the configuration file to create a new hello Function: | ||
2. Open the `Serverless-AWS-CRUD-Workshop/serverless.yml` set up the AWS environment by replacing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Open the
Serverless-AWS-CRUD-Workshop/serverless.yml
file. This file contains all the configuration and resources for your serverless project. To tell the serverless framework to use AWS, replace everything in the document with the configuration as follows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
```yaml | ||
provider: | ||
name: aws | ||
runtime: nodejs6.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be nodejs8.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
timeout: 30 | ||
versionFunctions: false | ||
``` | ||
This will tell the serverless that you want your service to be deployed to Syndey region (you can choose others off course). Now find and replace the following |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration above will tell the serverless framework that you want to deploy your service in the Sydney region.
Next, we're going to specify our functions to deploy.
Paste the configuration below under the previous configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
9. If you're able to get a response back, congratulations! You've deployed your first lambda function. | ||
### Adding an API to the function | ||
|
||
9. If you're able to get a response back, congratulations! You've deployed your first lambda function. You can see where your lmbad function bgy loging into AWS console and your lambda functions under Sydney region. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few spelling errors
9. If you're able to get a response back, congratulations! You've deployed your first lambda function. You can see where your lambda function by logging into AWS console and your lambda functions in the Sydney region.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
@@ -90,10 +126,11 @@ functions: | |||
sls deploy -v | |||
``` | |||
|
|||
11. After the deployment completes. You should see an api endpoint under `endpoints`. Click on this link to open it in the browser. | |||
11. After the deployment completes. You should see an api endpoint under `endpoints`. Click on this link to open it in the browser. You can see your deployed endpoint at AWS console under `API gateway` under dev-myTestService and he you can find the API url under Stages->dev called Invoke URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see your deployed endpoint at AWS console under API gateway
under dev-myTestService. You can find the API url under Stages->dev called Invoke URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
|
||
After you have deployed the book endpoints you can test your work using Postman. Import the `AWS Serverless CRUD.postman_collection.json` into postman. | ||
- create a new environment called "meetup-book" | ||
- in the invironment define variable "API_ENDPOINT" and asign it to your API URL eg https://XXXXXX.execute-api.ap-southeast-2.amazonaws.com/dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the environment, define a new variable called "API_ENDPOINT" and assign it to your API URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lab_1_-_First_Function/README.MD
Outdated
After you have deployed the book endpoints you can test your work using Postman. Import the `AWS Serverless CRUD.postman_collection.json` into postman. | ||
- create a new environment called "meetup-book" | ||
- in the invironment define variable "API_ENDPOINT" and asign it to your API URL eg https://XXXXXX.execute-api.ap-southeast-2.amazonaws.com/dev | ||
- Now you can chose any of the endpoint under "AWS Serverless CRUD" collection and see if it works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now you can choose any of the function endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Please see my changes, I have added quite a bit but I think it makes things little more clear. Let me know if you wish me to contribute to Lab 2 and 3