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
There were some conflicting configuration details, namely .env_sample,
and sendgrid.env. I've opted for .env_sample, as sendgrid.env
actually seemed to be incorrect.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ We welcome direct contributions to the sendgrid-python code base. Thank you!
62
62
### Development Environment ###
63
63
#### There are two ways to get set up: ####
64
64
#### 1. Using Docker ####
65
-
This is usually the easiest and fastest way to get set up.
65
+
This is usually the easiest and fastest way to get set up.
66
66
You can use our Docker image to avoid setting up the development environment yourself. See [USAGE.md](https://github.com/sendgrid/sendgrid-python/blob/master/docker/USAGE.md).
67
67
68
68
#### - OR - ####
@@ -87,9 +87,14 @@ First, get your free SendGrid account [here](https://sendgrid.com/free?source=se
87
87
Next, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).
SendGrid also supports local environment file `.env`. Copy or rename `.env_sample` into `.env` and update [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys) with your key.
57
53
58
54
Sendgrid also supports local environment file `.env`. Copy or rename `.env_sample` into `.env` and update [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys) with your key.
Copy file name to clipboardExpand all lines: use_cases/aws.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ Before starting this tutorial, you will need to have access to an AWS account in
19
19
## Getting Started
20
20
21
21
### Create AWS CodeStar Project
22
-
Log in to your AWS account and go to the AWS CodeStar service. Click "Start a project". For this tutorial we're going to choose a Python Web service, utilizing AWS Lambda. You can use the filters on the left hand side of the UI to narrow down the available choices.
22
+
Log in to your AWS account and go to the AWS CodeStar service. Click "Start a project". For this tutorial we're going to choose a Python Web service, utilizing AWS Lambda. You can use the filters on the left hand side of the UI to narrow down the available choices.
23
23
24
-
After you've selected the template, you're asked to provide a name for your project. Go ahead and name it "hello-email". Once you've entered a name, click "Create Project" in the lower right hand corner. You can then choose which tools you want to use to interact with the project. For this tutorial, we'll be choosing "Command Line".
24
+
After you've selected the template, you're asked to provide a name for your project. Go ahead and name it "hello-email". Once you've entered a name, click "Create Project" in the lower right hand corner. You can then choose which tools you want to use to interact with the project. For this tutorial, we'll be choosing "Command Line".
25
25
26
-
Once that is completed, you'll be given some basic steps to get Git installed and setup, and instructions for connecting to the AWS CodeCommit(git) repository. You can either use HTTPS, or SSH. Instructions for setting up either are provided.
26
+
Once that is completed, you'll be given some basic steps to get Git installed and setup, and instructions for connecting to the AWS CodeCommit(git) repository. You can either use HTTPS, or SSH. Instructions for setting up either are provided.
27
27
28
28
Go ahead and clone the Git repository link after it is created. You may need to click "Skip" in the lower right hand corner to proceed.
29
29
30
-
Once that's done, you've successfully created a CodeStar project! You should be at the dashboard, with a view of the wiki, change log, build pipeline, and application endpoint.
30
+
Once that's done, you've successfully created a CodeStar project! You should be at the dashboard, with a view of the wiki, change log, build pipeline, and application endpoint.
31
31
32
32
### Create SendGrid API Key
33
33
Log in to your SendGrid account. Click on your user name on the left hand side of the UI and choose "Setup Guide" from the drop-down menu. On the "Welcome" menu, choose "Send Your First Email", and then "Integrate using our Web API or SMTP relay." Choose "Web API" as the recommended option on the next screen, as we'll be using that for this tutorial. For more information about creating API keys, see https://sendgrid.com/docs/Classroom/Send/How_Emails_Are_Sent/api_keys.html
@@ -44,7 +44,7 @@ For the rest of the tutorial, we'll be working out of the git repository we clon
44
44
```
45
45
$ cd hello-email
46
46
```
47
-
note: this assumes you cloned the git repo inside your current directory. My directory is:
47
+
note: this assumes you cloned the Git repo inside your current directory. My directory is:
48
48
49
49
```
50
50
~/projects/hello-email
@@ -100,7 +100,7 @@ virtualenv venv
100
100
source ./venv/bin/activate
101
101
```
102
102
103
-
Prior to being able to deploy our Python code, we'll need to install the sendgrid Python module *locally*. One of the idiosyncracies of AWS Lambda is that all library and module dependencies that aren't part of the standard library have to be included with the code/build artifact. Virtual environments do not translate to the Lambda runtime environment.
103
+
Prior to being able to deploy our Python code, we'll need to install the sendgrid Python module *locally*. One of the idiosyncracies of AWS Lambda is that all library and module dependencies that aren't part of the standard library have to be included with the code/build artifact. Virtual environments do not translate to the Lambda runtime environment.
104
104
105
105
In the root project directory, run the following command:
Once the code is successfully pushed, head back to the AWS CodeStar dashboard for your project. After your commit successfully registers, an automated build and deployment process should kick off.
160
+
Once the code is successfully pushed, head back to the AWS CodeStar dashboard for your project. After your commit successfully registers, an automated build and deployment process should kick off.
161
161
162
162
One more step left before our application will work correctly. After your code has bee deployed, head to the AWS Lambda console. Click on your function name, which should start with `awscodestar-hello-email-lambda-`, or similar.
163
163
164
-
Scroll down to the "Environment Variables" section. Here we need to populate our SendGrid API key. Copy the value from the `sendgrid.env` file you created earlier, ensuring to capture the entire value. Make sure the key is titled:
164
+
Scroll down to the "Environment Variables" section. Here we need to populate our SendGrid API key. Copy the value from the `.env` file you created earlier, ensuring to capture the entire value. Make sure the key is titled:
165
165
166
166
```
167
167
SENDGRID_API_KEY
168
168
```
169
169
170
-
Now, go back to your project dashboard in CodeStar. Click on the link under "Application endpoints". After a moment, you should be greeted with JSON output indicating an email was successfully sent.
170
+
Now, go back to your project dashboard in CodeStar. Click on the link under "Application endpoints". After a moment, you should be greeted with JSON output indicating an email was successfully sent.
171
171
172
-
Congratulations, you've just used serverless technology to create an email sending app in AWS!
172
+
Congratulations, you've just used serverless technology to create an email sending app in AWS!
0 commit comments