@friggframework/devtools 2.0.0--canary.414.b92cb0b.0 → 2.0.0--canary.414.b21e7dc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -119,8 +119,6 @@ async function deployCommand(options) {
119
119
 
120
120
  // AWS discovery is now handled directly in serverless-template.js
121
121
  console.log('🚀 Deploying serverless application...');
122
- console.log('📋 Final environment variables being passed to serverless:');
123
- console.log(' ', Object.keys(integrationEnvironmentVariables).sort().join(', '));
124
122
  const backendPath = path.resolve(process.cwd());
125
123
  const infrastructurePath = 'infrastructure.js';
126
124
  const command = 'serverless';
@@ -21,20 +21,47 @@ const shouldRunDiscovery = (AppDefinition) => {
21
21
  const getAppEnvironmentVars = (AppDefinition) => {
22
22
  const envVars = {};
23
23
 
24
+ // AWS Lambda reserved environment variables that cannot be set (from official AWS docs)
25
+ const reservedVars = new Set([
26
+ '_HANDLER',
27
+ '_X_AMZN_TRACE_ID',
28
+ 'AWS_DEFAULT_REGION',
29
+ 'AWS_EXECUTION_ENV',
30
+ 'AWS_REGION',
31
+ 'AWS_LAMBDA_FUNCTION_NAME',
32
+ 'AWS_LAMBDA_FUNCTION_MEMORY_SIZE',
33
+ 'AWS_LAMBDA_FUNCTION_VERSION',
34
+ 'AWS_LAMBDA_INITIALIZATION_TYPE',
35
+ 'AWS_LAMBDA_LOG_GROUP_NAME',
36
+ 'AWS_LAMBDA_LOG_STREAM_NAME',
37
+ 'AWS_ACCESS_KEY',
38
+ 'AWS_ACCESS_KEY_ID',
39
+ 'AWS_SECRET_ACCESS_KEY',
40
+ 'AWS_SESSION_TOKEN'
41
+ ]);
42
+
24
43
  if (AppDefinition.environment) {
25
44
  console.log('📋 Loading environment variables from appDefinition...');
26
45
  const envKeys = [];
46
+ const skippedKeys = [];
27
47
 
28
48
  for (const [key, value] of Object.entries(AppDefinition.environment)) {
29
49
  if (value === true) {
30
- envVars[key] = `\${env:${key}, ''}`;
31
- envKeys.push(key);
50
+ if (reservedVars.has(key)) {
51
+ skippedKeys.push(key);
52
+ } else {
53
+ envVars[key] = `\${env:${key}, ''}`;
54
+ envKeys.push(key);
55
+ }
32
56
  }
33
57
  }
34
58
 
35
59
  if (envKeys.length > 0) {
36
60
  console.log(` Found ${envKeys.length} environment variables: ${envKeys.join(', ')}`);
37
61
  }
62
+ if (skippedKeys.length > 0) {
63
+ console.log(` ⚠️ Skipped ${skippedKeys.length} reserved AWS Lambda variables: ${skippedKeys.join(', ')}`);
64
+ }
38
65
  }
39
66
 
40
67
  return envVars;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/devtools",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.414.b92cb0b.0",
4
+ "version": "2.0.0--canary.414.b21e7dc.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-ec2": "^3.835.0",
7
7
  "@aws-sdk/client-kms": "^3.835.0",
@@ -9,8 +9,8 @@
9
9
  "@babel/eslint-parser": "^7.18.9",
10
10
  "@babel/parser": "^7.25.3",
11
11
  "@babel/traverse": "^7.25.3",
12
- "@friggframework/schemas": "2.0.0--canary.414.b92cb0b.0",
13
- "@friggframework/test": "2.0.0--canary.414.b92cb0b.0",
12
+ "@friggframework/schemas": "2.0.0--canary.414.b21e7dc.0",
13
+ "@friggframework/test": "2.0.0--canary.414.b21e7dc.0",
14
14
  "@hapi/boom": "^10.0.1",
15
15
  "@inquirer/prompts": "^5.3.8",
16
16
  "axios": "^1.7.2",
@@ -32,8 +32,8 @@
32
32
  "serverless-http": "^2.7.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@friggframework/eslint-config": "2.0.0--canary.414.b92cb0b.0",
36
- "@friggframework/prettier-config": "2.0.0--canary.414.b92cb0b.0",
35
+ "@friggframework/eslint-config": "2.0.0--canary.414.b21e7dc.0",
36
+ "@friggframework/prettier-config": "2.0.0--canary.414.b21e7dc.0",
37
37
  "prettier": "^2.7.1",
38
38
  "serverless": "3.39.0",
39
39
  "serverless-dotenv-plugin": "^6.0.0",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "b92cb0b1542956f6f2bab5b6e2cbe28605c6fc97"
68
+ "gitHead": "b21e7dca32191816455b2f899368281ce3c01f02"
69
69
  }