Skip to content

Commit 2e1a5c6

Browse files
author
Sébastien Stormacq
committed
fix soundness checks
1 parent 3e86ec4 commit 2e1a5c6

16 files changed

Lines changed: 190 additions & 77 deletions

File tree

.licenseignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ Package.resolved
3636
**/.npmignore
3737
**/*.json
3838
**/*.txt
39-
*.toml
39+
*.toml
40+
41+
**/*.kiro
42+
**/*.kiro.hook

Examples/_MyFirstFunction/create_function.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ sleep 5
6060
echo "🔗 Invoke the Lambda function"
6161
aws lambda invoke \
6262
--function-name MyLambda \
63-
--payload $(echo '{"name":"World","age":30}' | base64) \
63+
--payload "$(echo '{"name":"World","age":30}' | base64)" \
6464
/tmp/out.json > /dev/null && cat /tmp/out.json
6565

6666
echo ""

Sources/AWSLambdaPluginHelper/Extensions.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ extension String {
3636
Array(self.utf8)
3737
}
3838
}
39-
40-

Sources/AWSLambdaPluginHelper/GeneratedClients/IAM/IAMClient.swift

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//
@@ -65,7 +66,10 @@ public struct IAMClient: AWSService {
6566
/// - Parameter input: The request parameters.
6667
/// - Returns: The newly created role.
6768
@discardableResult
68-
public func createRole(_ input: IAMCreateRoleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> IAMCreateRoleResponse {
69+
public func createRole(
70+
_ input: IAMCreateRoleRequest,
71+
logger: Logger = AWSClient.loggingDisabled
72+
) async throws -> IAMCreateRoleResponse {
6973
try await self.client.execute(
7074
operation: "CreateRole",
7175
path: "/",
@@ -93,7 +97,10 @@ public struct IAMClient: AWSService {
9397
/// - Parameter input: The request parameters.
9498
/// - Returns: The role details.
9599
@discardableResult
96-
public func getRole(_ input: IAMGetRoleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> IAMGetRoleResponse {
100+
public func getRole(
101+
_ input: IAMGetRoleRequest,
102+
logger: Logger = AWSClient.loggingDisabled
103+
) async throws -> IAMGetRoleResponse {
97104
try await self.client.execute(
98105
operation: "GetRole",
99106
path: "/",
@@ -106,7 +113,10 @@ public struct IAMClient: AWSService {
106113

107114
/// Attaches the specified managed policy to the specified IAM role.
108115
/// - Parameter input: The request parameters.
109-
public func attachRolePolicy(_ input: IAMAttachRolePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
116+
public func attachRolePolicy(
117+
_ input: IAMAttachRolePolicyRequest,
118+
logger: Logger = AWSClient.loggingDisabled
119+
) async throws {
110120
try await self.client.execute(
111121
operation: "AttachRolePolicy",
112122
path: "/",
@@ -119,7 +129,10 @@ public struct IAMClient: AWSService {
119129

120130
/// Removes the specified managed policy from the specified IAM role.
121131
/// - Parameter input: The request parameters.
122-
public func detachRolePolicy(_ input: IAMDetachRolePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
132+
public func detachRolePolicy(
133+
_ input: IAMDetachRolePolicyRequest,
134+
logger: Logger = AWSClient.loggingDisabled
135+
) async throws {
123136
try await self.client.execute(
124137
operation: "DetachRolePolicy",
125138
path: "/",
@@ -132,7 +145,8 @@ public struct IAMClient: AWSService {
132145

133146
/// Adds or updates an inline policy document that is embedded in the specified IAM role.
134147
/// - Parameter input: The request parameters.
135-
public func putRolePolicy(_ input: IAMPutRolePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
148+
public func putRolePolicy(_ input: IAMPutRolePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws
149+
{
136150
try await self.client.execute(
137151
operation: "PutRolePolicy",
138152
path: "/",
@@ -145,7 +159,10 @@ public struct IAMClient: AWSService {
145159

146160
/// Deletes the specified inline policy from the specified IAM role.
147161
/// - Parameter input: The request parameters.
148-
public func deleteRolePolicy(_ input: IAMDeleteRolePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
162+
public func deleteRolePolicy(
163+
_ input: IAMDeleteRolePolicyRequest,
164+
logger: Logger = AWSClient.loggingDisabled
165+
) async throws {
149166
try await self.client.execute(
150167
operation: "DeleteRolePolicy",
151168
path: "/",

Sources/AWSLambdaPluginHelper/GeneratedClients/IAM/IAMErrors.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//

Sources/AWSLambdaPluginHelper/GeneratedClients/IAM/IAMShapes.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//

Sources/AWSLambdaPluginHelper/GeneratedClients/Lambda/LambdaClient.swift

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//
@@ -60,7 +61,10 @@ public struct LambdaClient: AWSService, Sendable {
6061
/// - Parameter input: The request parameters.
6162
/// - Returns: The function configuration and code location.
6263
@discardableResult
63-
public func getFunction(_ input: GetFunctionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetFunctionResponse {
64+
public func getFunction(
65+
_ input: GetFunctionRequest,
66+
logger: Logger = AWSClient.loggingDisabled
67+
) async throws -> GetFunctionResponse {
6468
try await self.client.execute(
6569
operation: "GetFunction",
6670
path: "/2015-03-31/functions/{FunctionName}",
@@ -75,7 +79,10 @@ public struct LambdaClient: AWSService, Sendable {
7579
/// - Parameter input: The request parameters.
7680
/// - Returns: The function configuration.
7781
@discardableResult
78-
public func createFunction(_ input: CreateFunctionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateFunctionResponse {
82+
public func createFunction(
83+
_ input: CreateFunctionRequest,
84+
logger: Logger = AWSClient.loggingDisabled
85+
) async throws -> CreateFunctionResponse {
7986
try await self.client.execute(
8087
operation: "CreateFunction",
8188
path: "/2015-03-31/functions",
@@ -90,7 +97,10 @@ public struct LambdaClient: AWSService, Sendable {
9097
/// - Parameter input: The request parameters.
9198
/// - Returns: The updated function configuration.
9299
@discardableResult
93-
public func updateFunctionCode(_ input: UpdateFunctionCodeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateFunctionCodeResponse {
100+
public func updateFunctionCode(
101+
_ input: UpdateFunctionCodeRequest,
102+
logger: Logger = AWSClient.loggingDisabled
103+
) async throws -> UpdateFunctionCodeResponse {
94104
try await self.client.execute(
95105
operation: "UpdateFunctionCode",
96106
path: "/2015-03-31/functions/{FunctionName}/code",
@@ -103,7 +113,8 @@ public struct LambdaClient: AWSService, Sendable {
103113

104114
/// Deletes a Lambda function.
105115
/// - Parameter input: The request parameters.
106-
public func deleteFunction(_ input: DeleteFunctionRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
116+
public func deleteFunction(_ input: DeleteFunctionRequest, logger: Logger = AWSClient.loggingDisabled) async throws
117+
{
107118
try await self.client.execute(
108119
operation: "DeleteFunction",
109120
path: "/2015-03-31/functions/{FunctionName}",
@@ -118,7 +129,10 @@ public struct LambdaClient: AWSService, Sendable {
118129
/// - Parameter input: The request parameters.
119130
/// - Returns: The function URL configuration.
120131
@discardableResult
121-
public func createFunctionUrlConfig(_ input: CreateFunctionUrlConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateFunctionUrlConfigResponse {
132+
public func createFunctionUrlConfig(
133+
_ input: CreateFunctionUrlConfigRequest,
134+
logger: Logger = AWSClient.loggingDisabled
135+
) async throws -> CreateFunctionUrlConfigResponse {
122136
try await self.client.execute(
123137
operation: "CreateFunctionUrlConfig",
124138
path: "/2021-10-31/functions/{FunctionName}/url",
@@ -131,7 +145,10 @@ public struct LambdaClient: AWSService, Sendable {
131145

132146
/// Deletes a Lambda function URL.
133147
/// - Parameter input: The request parameters.
134-
public func deleteFunctionUrlConfig(_ input: DeleteFunctionUrlConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
148+
public func deleteFunctionUrlConfig(
149+
_ input: DeleteFunctionUrlConfigRequest,
150+
logger: Logger = AWSClient.loggingDisabled
151+
) async throws {
135152
try await self.client.execute(
136153
operation: "DeleteFunctionUrlConfig",
137154
path: "/2021-10-31/functions/{FunctionName}/url",
@@ -146,7 +163,10 @@ public struct LambdaClient: AWSService, Sendable {
146163
/// - Parameter input: The request parameters.
147164
/// - Returns: The Function URL configuration including the URL endpoint.
148165
@discardableResult
149-
public func getFunctionUrlConfig(_ input: GetFunctionUrlConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetFunctionUrlConfigResponse {
166+
public func getFunctionUrlConfig(
167+
_ input: GetFunctionUrlConfigRequest,
168+
logger: Logger = AWSClient.loggingDisabled
169+
) async throws -> GetFunctionUrlConfigResponse {
150170
try await self.client.execute(
151171
operation: "GetFunctionUrlConfig",
152172
path: "/2021-10-31/functions/{FunctionName}/url",
@@ -161,7 +181,10 @@ public struct LambdaClient: AWSService, Sendable {
161181
/// - Parameter input: The request parameters.
162182
/// - Returns: The permission statement added to the function policy.
163183
@discardableResult
164-
public func addPermission(_ input: AddPermissionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddPermissionResponse {
184+
public func addPermission(
185+
_ input: AddPermissionRequest,
186+
logger: Logger = AWSClient.loggingDisabled
187+
) async throws -> AddPermissionResponse {
165188
try await self.client.execute(
166189
operation: "AddPermission",
167190
path: "/2015-03-31/functions/{FunctionName}/policy",
@@ -174,7 +197,10 @@ public struct LambdaClient: AWSService, Sendable {
174197

175198
/// Revokes function-use permission from an AWS service or another AWS account.
176199
/// - Parameter input: The request parameters.
177-
public func removePermission(_ input: RemovePermissionRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
200+
public func removePermission(
201+
_ input: RemovePermissionRequest,
202+
logger: Logger = AWSClient.loggingDisabled
203+
) async throws {
178204
try await self.client.execute(
179205
operation: "RemovePermission",
180206
path: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}",

Sources/AWSLambdaPluginHelper/GeneratedClients/Lambda/LambdaErrors.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//

Sources/AWSLambdaPluginHelper/GeneratedClients/Lambda/LambdaShapes.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//

Sources/AWSLambdaPluginHelper/GeneratedClients/S3/S3Client.swift

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift AWS Lambda Runtime open source project
3+
// This source file is part of the SwiftAWSLambdaRuntime open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift AWS Lambda Runtime project authors
5+
// Copyright SwiftAWSLambdaRuntime project authors
6+
// Copyright (c) Amazon.com, Inc. or its affiliates.
67
// Licensed under Apache License v2.0
78
//
89
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of Swift AWS Lambda Runtime project authors
10+
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
1011
//
1112
// SPDX-License-Identifier: Apache-2.0
1213
//
@@ -61,7 +62,10 @@ struct S3Client: AWSService {
6162
/// - Parameter input: The request parameters.
6263
/// - Returns: The response containing the bucket location.
6364
@discardableResult
64-
func createBucket(_ input: CreateBucketRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateBucketResponse {
65+
func createBucket(
66+
_ input: CreateBucketRequest,
67+
logger: Logger = AWSClient.loggingDisabled
68+
) async throws -> CreateBucketResponse {
6569
try await self.client.execute(
6670
operation: "CreateBucket",
6771
path: "/{Bucket}",
@@ -98,7 +102,10 @@ struct S3Client: AWSService {
98102
/// - Parameter input: The request parameters including the object body data.
99103
/// - Returns: The response containing ETag and version information.
100104
@discardableResult
101-
func putObject(_ input: PutObjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutObjectResponse {
105+
func putObject(
106+
_ input: PutObjectRequest,
107+
logger: Logger = AWSClient.loggingDisabled
108+
) async throws -> PutObjectResponse {
102109
try await self.client.execute(
103110
operation: "PutObject",
104111
path: "/{Bucket}/{Key+}",
@@ -116,7 +123,10 @@ struct S3Client: AWSService {
116123
/// - Parameter input: The request parameters.
117124
/// - Returns: The response containing delete marker and version information.
118125
@discardableResult
119-
func deleteObject(_ input: DeleteObjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteObjectResponse {
126+
func deleteObject(
127+
_ input: DeleteObjectRequest,
128+
logger: Logger = AWSClient.loggingDisabled
129+
) async throws -> DeleteObjectResponse {
120130
try await self.client.execute(
121131
operation: "DeleteObject",
122132
path: "/{Bucket}/{Key+}",

0 commit comments

Comments
 (0)