Skip to content

Commit

Permalink
CMDCT-4254 - deploying largely unaffected stack
Browse files Browse the repository at this point in the history
  • Loading branch information
peoplespete committed Jan 23, 2025
1 parent 4e5238c commit ffa828f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
13 changes: 8 additions & 5 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ custom:
tsConfigFileLocation: "./tsconfig.json"
stage: ${sls:stage}
region: ${aws:region}
wafPlugin:
name: ${self:service}-${self:custom.stage}-webacl-waf
wafExcludeRules:
awsCommon:
- "SizeRestrictions_BODY"
serverlessTerminationProtection:
stages:
- main
Expand All @@ -41,6 +36,11 @@ custom:
webAclName: ${self:service}-${self:custom.stage}-webacl-waf
associateWaf:
name: ${self:custom.webAclName}
wafPlugin:
name: ${self:custom.webAclName}
wafExcludeRules:
awsCommon:
- "SizeRestrictions_BODY"
version: V2
serverlessApiClientCertificate:
rotateCerts: true
Expand All @@ -54,6 +54,9 @@ provider:
name: aws
runtime: nodejs20.x
region: us-east-1
stackTags:
PROJECT: ${self:custom.project}
SERVICE: ${self:service}
tracing:
apiGateway: true
logs:
Expand Down
10 changes: 4 additions & 6 deletions services/ui-auth/handlers/createUsers.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as cognitolib from "../libs/cognito-lib";
import * as cognitolib from "../libs/cognito-lib.js";
const userPoolId = process.env.userPoolId;
const users = require("../libs/users.json");
import users from "../libs/users.json" assert { type: "json" };

async function myHandler(_event, _context, _callback) {
export const handler = async (_event, _context, _callback) => {
for (var i = 0; i < users.length; i++) {
var poolData = {
UserPoolId: userPoolId,
Expand Down Expand Up @@ -43,6 +43,4 @@ async function myHandler(_event, _context, _callback) {
/* swallow this exception and continue */
}
}
}

exports.handler = myHandler;
};
1 change: 1 addition & 0 deletions services/ui-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ui-auth",
"description": "",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
8 changes: 8 additions & 0 deletions services/ui-src/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ custom:
export LOCAL_LOGIN=false
./scripts/configure-env.sh
cp public/env-config.js build/env-config.js

resources:
Resources:
Honk: # this is just because it won't deploy unless we have some resource being created
Type: AWS::SSM::Parameter
Properties:
Type: String
Value: 'honk'
3 changes: 3 additions & 0 deletions services/ui/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ resources:
RestrictPublicBuckets: true
VersioningConfiguration:
Status: Enabled
LoggingConfiguration:
DestinationBucketName: ${env:LOGGING_BUCKET, ssm:/configuration/${self:custom.stage}/s3/accessLogsBucket, ssm:/configuration/default/s3/accessLogsBucket}
LogFilePrefix: ${env:LOGGING_BUCKET, ssm:/configuration/${self:custom.stage}/s3/accessLogsPrefix, ssm:/configuration/default/s3/accessLogsPrefix}
DeletionPolicy: Delete
BucketPolicy:
Type: AWS::S3::BucketPolicy
Expand Down

0 comments on commit ffa828f

Please sign in to comment.