Skip to content

Commit

Permalink
fix: fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
harshAtMri committed Mar 23, 2024
1 parent f8000d2 commit ceed6ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SecureParameterProvider extends Construct {
const lambdaName = nameGenerator.getPrefixedName('handler');
const customResourceProviderName = nameGenerator.getPrefixedName('customResourceProvider');
const handlerPath = path.join(path.dirname(__dirname), 'functions');
const iamResourceName = name.startsWith("/") ? name.substring(1) : name;
const iamResourceName = name && name.startsWith('/') ? name.substring(1) : name;

const onEvent = new Function(scope, lambdaName, {
handler: 'index.handler',
Expand All @@ -66,7 +66,9 @@ class SecureParameterProvider extends Construct {
new PolicyStatement({
actions: ['ssm:*'],
resources: [
`arn:aws:ssm:${Stack.of(scope).region}:${Stack.of(scope).account}:parameter/${iamResourceName}`,
`arn:aws:ssm:${Stack.of(scope).region}:${
Stack.of(scope).account
}:parameter/${iamResourceName}`,
],
}),
],
Expand Down

0 comments on commit ceed6ee

Please sign in to comment.