diff --git a/API.md b/API.md
index 7c65d08c..1630268e 100644
--- a/API.md
+++ b/API.md
@@ -153,7 +153,7 @@ Name | Type | Description
-----|------|-------------
**secret** | [aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret)
| Reference to secret where credentials are stored.
**passwordKey**? | string
| Key containing password.
__*Optional*__
-**usenameKey**? | string
| Key containing username.
__*Optional*__
+**usernameKey**? | string
| Key containing username.
__*Optional*__
diff --git a/src/types.ts b/src/types.ts
index 0b1ebc1c..401e2e61 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -126,7 +126,7 @@ export interface ISecret {
/**
* Key containing username
*/
- usenameKey?: string;
+ usernameKey?: string;
/**
* Key containing password
*/
diff --git a/src/utils.ts b/src/utils.ts
index 667b4a2e..394f445c 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -4,6 +4,6 @@ import { ICredentials, LambdaCredentials } from './types';
export const formatCredentials = (creds?: ICredentials): LambdaCredentials => ({
plainText: creds?.plainText ? `${creds?.plainText?.userName}:${creds?.plainText?.password}` : undefined,
secretArn: creds?.secretManager?.secret.secretArn,
- usernameKey: creds?.secretManager?.usenameKey,
+ usernameKey: creds?.secretManager?.usernameKey,
passwordKey: creds?.secretManager?.passwordKey,
});
\ No newline at end of file
diff --git a/test/__snapshots__/index.test.ts.snap b/test/__snapshots__/index.test.ts.snap
index cdf1105c..df74d69d 100644
--- a/test/__snapshots__/index.test.ts.snap
+++ b/test/__snapshots__/index.test.ts.snap
@@ -20,7 +20,7 @@ Object {
"S3Bucket": Object {
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
},
- "S3Key": "5102bb1318c08893eb56f912541f0b197db7c5707a41db9f45e5a64797787216.zip",
+ "S3Key": "b4d087fb15ca781f37ef315bf184159b9fdf59252f0f0501bbbea2775da58a53.zip",
},
"Environment": Object {
"Variables": Object {
@@ -922,7 +922,7 @@ Object {
"S3Bucket": Object {
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
},
- "S3Key": "5102bb1318c08893eb56f912541f0b197db7c5707a41db9f45e5a64797787216.zip",
+ "S3Key": "b4d087fb15ca781f37ef315bf184159b9fdf59252f0f0501bbbea2775da58a53.zip",
},
"Environment": Object {
"Variables": Object {
@@ -2332,7 +2332,7 @@ Object {
"S3Bucket": Object {
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
},
- "S3Key": "5102bb1318c08893eb56f912541f0b197db7c5707a41db9f45e5a64797787216.zip",
+ "S3Key": "b4d087fb15ca781f37ef315bf184159b9fdf59252f0f0501bbbea2775da58a53.zip",
},
"Environment": Object {
"Variables": Object {
@@ -2599,7 +2599,7 @@ Object {
"S3Bucket": Object {
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
},
- "S3Key": "5102bb1318c08893eb56f912541f0b197db7c5707a41db9f45e5a64797787216.zip",
+ "S3Key": "b4d087fb15ca781f37ef315bf184159b9fdf59252f0f0501bbbea2775da58a53.zip",
},
"Environment": Object {
"Variables": Object {
diff --git a/test/index.test.ts b/test/index.test.ts
index 4db58e60..2ff0f950 100644
--- a/test/index.test.ts
+++ b/test/index.test.ts
@@ -95,7 +95,7 @@ describe('stack with key-value secret', () => {
src: new DockerImageName('javacs3/javacs3:latest', {
secretManager: {
secret: sm.Secret.fromSecretNameV2(stack, 'SrcSecret', 'key-value-secret'),
- usenameKey: 'username',
+ usernameKey: 'username',
passwordKey: 'password',
},
}),