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: examples/README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ This directory contains examples of how to use the Nylas Node.js SDK to interact
17
17
-[Cloudflare Vite Calendars](./cloudflare-vite-calendars/README.md) - Modern Cloudflare Workers example using Vite for building a calendar event manager. Showcases listing and creating events with a beautiful web interface.
18
18
-[Edge Environment](./edge-environment/README.md) - Standard Cloudflare Workers example for sending email attachments. Demonstrates file upload handling and email sending on the edge.
19
19
20
+
### AWS Lambda Examples
21
+
22
+
-[AWS Lambda Attachments](./aws-lambda/README.md) - AWS Lambda example for sending email attachments using the Nylas SDK. Demonstrates how to handle multiple file uploads (including 2+ attachments over 3MB total) without Lambda freezing. Includes interactive setup CLI and Serverless Framework deployment.
23
+
20
24
### Module System Examples
21
25
22
26
-[ESM Only](./esm-only/) - Example of using the SDK with ES Modules
@@ -101,6 +105,42 @@ The Cloudflare Workers examples are self-contained and have their own setup:
101
105
102
106
Each Cloudflare example has its own comprehensive README with detailed instructions.
103
107
108
+
### AWS Lambda Examples
109
+
110
+
The AWS Lambda example is self-contained and has its own setup:
111
+
112
+
1. Navigate to the example directory:
113
+
```bash
114
+
cd examples/aws-lambda
115
+
```
116
+
117
+
2. Run the interactive setup:
118
+
```bash
119
+
npm run setup
120
+
```
121
+
122
+
This will guide you through:
123
+
- Prerequisites checking
124
+
- Nylas credentials configuration
125
+
- AWS credentials setup
126
+
- Environment variable configuration
127
+
- Optional immediate deployment
128
+
129
+
3. Or set up manually:
130
+
```bash
131
+
npm install
132
+
# Create .env file with your Nylas credentials
133
+
# Configure AWS credentials
134
+
npm run deploy
135
+
```
136
+
137
+
4. Test the deployed function:
138
+
- Visit the API Gateway URL displayed after deployment
139
+
- Upload multiple files and send emails
140
+
- Test with files totaling over 3MB to verify the bug fix
141
+
142
+
The AWS Lambda example includes a comprehensive README with detailed instructions and troubleshooting.
143
+
104
144
## Documentation
105
145
106
146
For more information, see the [Nylas API Documentation](https://developer.nylas.com/).
0 commit comments