Skip to content

Commit 1ddab5a

Browse files
author
awstools
committed
feat(client-accessanalyzer): This release adds support for policy validation and external access findings for DynamoDB tables and streams. IAM Access Analyzer helps you author functional and secure resource-based policies and identify cross-account access. Updated service API, documentation, and paginators.
1 parent 4a81d90 commit 1ddab5a

File tree

5 files changed

+219
-2
lines changed

5 files changed

+219
-2
lines changed

clients/client-accessanalyzer/src/commands/CreateAccessPreviewCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ export interface CreateAccessPreviewCommandOutput extends CreateAccessPreviewRes
144144
* s3ExpressDirectoryBucket: { // S3ExpressDirectoryBucketConfiguration
145145
* bucketPolicy: "STRING_VALUE",
146146
* },
147+
* dynamodbStream: { // DynamodbStreamConfiguration
148+
* streamPolicy: "STRING_VALUE",
149+
* },
150+
* dynamodbTable: { // DynamodbTableConfiguration
151+
* tablePolicy: "STRING_VALUE",
152+
* },
147153
* },
148154
* },
149155
* clientToken: "STRING_VALUE",

clients/client-accessanalyzer/src/commands/GetAccessPreviewCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ export interface GetAccessPreviewCommandOutput extends GetAccessPreviewResponse,
151151
* // s3ExpressDirectoryBucket: { // S3ExpressDirectoryBucketConfiguration
152152
* // bucketPolicy: "STRING_VALUE",
153153
* // },
154+
* // dynamodbStream: { // DynamodbStreamConfiguration
155+
* // streamPolicy: "STRING_VALUE",
156+
* // },
157+
* // dynamodbTable: { // DynamodbTableConfiguration
158+
* // tablePolicy: "STRING_VALUE",
159+
* // },
154160
* // },
155161
* // },
156162
* // createdAt: new Date("TIMESTAMP"), // required

clients/client-accessanalyzer/src/models/models_0.ts

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ export interface CreateAnalyzerRequest {
577577

578578
/**
579579
* <p>The type of analyzer to create. Only <code>ACCOUNT</code>, <code>ORGANIZATION</code>,
580-
* <code>ACCOUNT_UNUSED_ACCESS</code>, and <code>ORGANIZATION_UNUSED_ACCESS</code>
580+
* <code>ACCOUNT_UNUSED_ACCESS</code>, and <code>ORGANIZATION_UNUSED_ACCESS</code>
581581
* analyzers are supported. You can create only one analyzer per account per Region. You can
582582
* create up to 5 analyzers per organization per Region.</p>
583583
* @public
@@ -1074,6 +1074,64 @@ export interface CheckNoNewAccessResponse {
10741074
reasons?: ReasonSummary[];
10751075
}
10761076

1077+
/**
1078+
* <p>The proposed access control configuration for a DynamoDB stream. You can propose a
1079+
* configuration for a new DynamoDB stream or an existing DynamoDB stream that you own by specifying
1080+
* the policy for the DynamoDB stream. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutResourcePolicy.html">PutResourcePolicy</a>.</p>
1081+
* <ul>
1082+
* <li>
1083+
* <p>If the configuration is for an existing DynamoDB stream and you do not specify the
1084+
* DynamoDB policy, then the access preview uses the existing DynamoDB policy for the
1085+
* stream.</p>
1086+
* </li>
1087+
* <li>
1088+
* <p>If the access preview is for a new resource and you do not specify the policy,
1089+
* then the access preview assumes a DynamoDB stream without a policy.</p>
1090+
* </li>
1091+
* <li>
1092+
* <p>To propose deletion of an existing DynamoDB stream policy, you can specify an empty
1093+
* string for the DynamoDB policy.</p>
1094+
* </li>
1095+
* </ul>
1096+
* @public
1097+
*/
1098+
export interface DynamodbStreamConfiguration {
1099+
/**
1100+
* <p>The proposed resource policy defining who can access or manage the DynamoDB stream.</p>
1101+
* @public
1102+
*/
1103+
streamPolicy?: string;
1104+
}
1105+
1106+
/**
1107+
* <p>The proposed access control configuration for a DynamoDB table or index. You can propose a
1108+
* configuration for a new DynamoDB table or index or an existing DynamoDB table or index that you
1109+
* own by specifying the policy for the DynamoDB table or index. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutResourcePolicy.html">PutResourcePolicy</a>.</p>
1110+
* <ul>
1111+
* <li>
1112+
* <p>If the configuration is for an existing DynamoDB table or index and you do not
1113+
* specify the DynamoDB policy, then the access preview uses the existing DynamoDB policy for
1114+
* the table or index.</p>
1115+
* </li>
1116+
* <li>
1117+
* <p>If the access preview is for a new resource and you do not specify the policy,
1118+
* then the access preview assumes a DynamoDB table without a policy.</p>
1119+
* </li>
1120+
* <li>
1121+
* <p>To propose deletion of an existing DynamoDB table or index policy, you can specify an
1122+
* empty string for the DynamoDB policy.</p>
1123+
* </li>
1124+
* </ul>
1125+
* @public
1126+
*/
1127+
export interface DynamodbTableConfiguration {
1128+
/**
1129+
* <p>The proposed resource policy defining who can access or manage the DynamoDB table.</p>
1130+
* @public
1131+
*/
1132+
tablePolicy?: string;
1133+
}
1134+
10771135
/**
10781136
* <p>The proposed access control configuration for an Amazon EBS volume snapshot. You can propose
10791137
* a configuration for a new Amazon EBS volume snapshot or an Amazon EBS volume snapshot that you own by
@@ -1927,6 +1985,8 @@ export interface SqsQueueConfiguration {
19271985
* @public
19281986
*/
19291987
export type Configuration =
1988+
| Configuration.DynamodbStreamMember
1989+
| Configuration.DynamodbTableMember
19301990
| Configuration.EbsSnapshotMember
19311991
| Configuration.EcrRepositoryMember
19321992
| Configuration.EfsFileSystemMember
@@ -1962,6 +2022,8 @@ export namespace Configuration {
19622022
snsTopic?: never;
19632023
sqsQueue?: never;
19642024
s3ExpressDirectoryBucket?: never;
2025+
dynamodbStream?: never;
2026+
dynamodbTable?: never;
19652027
$unknown?: never;
19662028
}
19672029

@@ -1982,6 +2044,8 @@ export namespace Configuration {
19822044
snsTopic?: never;
19832045
sqsQueue?: never;
19842046
s3ExpressDirectoryBucket?: never;
2047+
dynamodbStream?: never;
2048+
dynamodbTable?: never;
19852049
$unknown?: never;
19862050
}
19872051

@@ -2002,6 +2066,8 @@ export namespace Configuration {
20022066
snsTopic?: never;
20032067
sqsQueue?: never;
20042068
s3ExpressDirectoryBucket?: never;
2069+
dynamodbStream?: never;
2070+
dynamodbTable?: never;
20052071
$unknown?: never;
20062072
}
20072073

@@ -2022,6 +2088,8 @@ export namespace Configuration {
20222088
snsTopic?: never;
20232089
sqsQueue?: never;
20242090
s3ExpressDirectoryBucket?: never;
2091+
dynamodbStream?: never;
2092+
dynamodbTable?: never;
20252093
$unknown?: never;
20262094
}
20272095

@@ -2042,6 +2110,8 @@ export namespace Configuration {
20422110
snsTopic?: never;
20432111
sqsQueue?: never;
20442112
s3ExpressDirectoryBucket?: never;
2113+
dynamodbStream?: never;
2114+
dynamodbTable?: never;
20452115
$unknown?: never;
20462116
}
20472117

@@ -2062,6 +2132,8 @@ export namespace Configuration {
20622132
snsTopic?: never;
20632133
sqsQueue?: never;
20642134
s3ExpressDirectoryBucket?: never;
2135+
dynamodbStream?: never;
2136+
dynamodbTable?: never;
20652137
$unknown?: never;
20662138
}
20672139

@@ -2082,6 +2154,8 @@ export namespace Configuration {
20822154
snsTopic?: never;
20832155
sqsQueue?: never;
20842156
s3ExpressDirectoryBucket?: never;
2157+
dynamodbStream?: never;
2158+
dynamodbTable?: never;
20852159
$unknown?: never;
20862160
}
20872161

@@ -2102,6 +2176,8 @@ export namespace Configuration {
21022176
snsTopic?: never;
21032177
sqsQueue?: never;
21042178
s3ExpressDirectoryBucket?: never;
2179+
dynamodbStream?: never;
2180+
dynamodbTable?: never;
21052181
$unknown?: never;
21062182
}
21072183

@@ -2122,6 +2198,8 @@ export namespace Configuration {
21222198
snsTopic?: never;
21232199
sqsQueue?: never;
21242200
s3ExpressDirectoryBucket?: never;
2201+
dynamodbStream?: never;
2202+
dynamodbTable?: never;
21252203
$unknown?: never;
21262204
}
21272205

@@ -2142,6 +2220,8 @@ export namespace Configuration {
21422220
snsTopic: SnsTopicConfiguration;
21432221
sqsQueue?: never;
21442222
s3ExpressDirectoryBucket?: never;
2223+
dynamodbStream?: never;
2224+
dynamodbTable?: never;
21452225
$unknown?: never;
21462226
}
21472227

@@ -2162,6 +2242,8 @@ export namespace Configuration {
21622242
snsTopic?: never;
21632243
sqsQueue: SqsQueueConfiguration;
21642244
s3ExpressDirectoryBucket?: never;
2245+
dynamodbStream?: never;
2246+
dynamodbTable?: never;
21652247
$unknown?: never;
21662248
}
21672249

@@ -2182,6 +2264,52 @@ export namespace Configuration {
21822264
snsTopic?: never;
21832265
sqsQueue?: never;
21842266
s3ExpressDirectoryBucket: S3ExpressDirectoryBucketConfiguration;
2267+
dynamodbStream?: never;
2268+
dynamodbTable?: never;
2269+
$unknown?: never;
2270+
}
2271+
2272+
/**
2273+
* <p>The access control configuration is for a DynamoDB stream.</p>
2274+
* @public
2275+
*/
2276+
export interface DynamodbStreamMember {
2277+
ebsSnapshot?: never;
2278+
ecrRepository?: never;
2279+
iamRole?: never;
2280+
efsFileSystem?: never;
2281+
kmsKey?: never;
2282+
rdsDbClusterSnapshot?: never;
2283+
rdsDbSnapshot?: never;
2284+
secretsManagerSecret?: never;
2285+
s3Bucket?: never;
2286+
snsTopic?: never;
2287+
sqsQueue?: never;
2288+
s3ExpressDirectoryBucket?: never;
2289+
dynamodbStream: DynamodbStreamConfiguration;
2290+
dynamodbTable?: never;
2291+
$unknown?: never;
2292+
}
2293+
2294+
/**
2295+
* <p>The access control configuration is for a DynamoDB table or index.</p>
2296+
* @public
2297+
*/
2298+
export interface DynamodbTableMember {
2299+
ebsSnapshot?: never;
2300+
ecrRepository?: never;
2301+
iamRole?: never;
2302+
efsFileSystem?: never;
2303+
kmsKey?: never;
2304+
rdsDbClusterSnapshot?: never;
2305+
rdsDbSnapshot?: never;
2306+
secretsManagerSecret?: never;
2307+
s3Bucket?: never;
2308+
snsTopic?: never;
2309+
sqsQueue?: never;
2310+
s3ExpressDirectoryBucket?: never;
2311+
dynamodbStream?: never;
2312+
dynamodbTable: DynamodbTableConfiguration;
21852313
$unknown?: never;
21862314
}
21872315

@@ -2201,6 +2329,8 @@ export namespace Configuration {
22012329
snsTopic?: never;
22022330
sqsQueue?: never;
22032331
s3ExpressDirectoryBucket?: never;
2332+
dynamodbStream?: never;
2333+
dynamodbTable?: never;
22042334
$unknown: [string, any];
22052335
}
22062336

@@ -2217,6 +2347,8 @@ export namespace Configuration {
22172347
snsTopic: (value: SnsTopicConfiguration) => T;
22182348
sqsQueue: (value: SqsQueueConfiguration) => T;
22192349
s3ExpressDirectoryBucket: (value: S3ExpressDirectoryBucketConfiguration) => T;
2350+
dynamodbStream: (value: DynamodbStreamConfiguration) => T;
2351+
dynamodbTable: (value: DynamodbTableConfiguration) => T;
22202352
_: (name: string, value: any) => T;
22212353
}
22222354

@@ -2234,6 +2366,8 @@ export namespace Configuration {
22342366
if (value.sqsQueue !== undefined) return visitor.sqsQueue(value.sqsQueue);
22352367
if (value.s3ExpressDirectoryBucket !== undefined)
22362368
return visitor.s3ExpressDirectoryBucket(value.s3ExpressDirectoryBucket);
2369+
if (value.dynamodbStream !== undefined) return visitor.dynamodbStream(value.dynamodbStream);
2370+
if (value.dynamodbTable !== undefined) return visitor.dynamodbTable(value.dynamodbTable);
22372371
return visitor._(value.$unknown[0], value.$unknown[1]);
22382372
};
22392373
}
@@ -2435,6 +2569,8 @@ export interface GetAnalyzedResourceRequest {
24352569
* @public
24362570
*/
24372571
export type ResourceType =
2572+
| "AWS::DynamoDB::Stream"
2573+
| "AWS::DynamoDB::Table"
24382574
| "AWS::EC2::Snapshot"
24392575
| "AWS::ECR::Repository"
24402576
| "AWS::EFS::FileSystem"
@@ -4399,6 +4535,7 @@ export type PolicyType = (typeof PolicyType)[keyof typeof PolicyType];
43994535
* @enum
44004536
*/
44014537
export const ValidatePolicyResourceType = {
4538+
DYNAMODB_TABLE: "AWS::DynamoDB::Table",
44024539
ROLE_TRUST: "AWS::IAM::AssumeRolePolicyDocument",
44034540
S3_ACCESS_POINT: "AWS::S3::AccessPoint",
44044541
S3_BUCKET: "AWS::S3::Bucket",

clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ import {
106106
Configuration,
107107
ConflictException,
108108
Criterion,
109+
DynamodbStreamConfiguration,
110+
DynamodbTableConfiguration,
109111
EbsSnapshotConfiguration,
110112
EcrRepositoryConfiguration,
111113
EfsFileSystemConfiguration,
@@ -1778,6 +1780,10 @@ const se_CloudTrailDetails = (input: CloudTrailDetails, context: __SerdeContext)
17781780

17791781
// se_Criterion omitted.
17801782

1783+
// se_DynamodbStreamConfiguration omitted.
1784+
1785+
// se_DynamodbTableConfiguration omitted.
1786+
17811787
// se_EbsGroupList omitted.
17821788

17831789
// se_EbsSnapshotConfiguration omitted.
@@ -2048,6 +2054,10 @@ const de_CloudTrailProperties = (output: any, context: __SerdeContext): CloudTra
20482054

20492055
// de_Criterion omitted.
20502056

2057+
// de_DynamodbStreamConfiguration omitted.
2058+
2059+
// de_DynamodbTableConfiguration omitted.
2060+
20512061
// de_EbsGroupList omitted.
20522062

20532063
// de_EbsSnapshotConfiguration omitted.

0 commit comments

Comments
 (0)