Skip to content

Commit 59bce9d

Browse files
committed
Remove Account from single region arn
1 parent 8f69d2f commit 59bce9d

File tree

10 files changed

+577
-25
lines changed

10 files changed

+577
-25
lines changed

source/patterns/@aws-solutions-constructs/aws-lambda-bedrockinferenceprofile/README.adoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,7 @@ multiple regions. Note that at the time of this writing, cross-region
187187
profiles are only available in
188188
https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html[US,
189189
EMEA and APAC]. Single region profiles are available in every region
190-
supporting Bedrock models. Defaults to `true`. NOTE - something has changed causing
191-
single region deployments to fail (even with the same CDK and Constructs versions that worked
192-
previously). We have created an [Issue](https://github.com/awslabs/aws-solutions-constructs/issues/1387)
193-
and are working to remedy this.
190+
supporting Bedrock models. Defaults to `true`.
194191

195192
|foundationModelEnvironmentVariableName? |string |Optional Name for the
196193
Lambda function environment variable set to the Model name. Defaults to
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5+
* with the License. A copy of the License is located at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
10+
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
11+
* and limitations under the License.
12+
*/
13+
14+
exports.handler = async (event, context) => {
15+
console.log('Received event:', JSON.stringify(event, null, 2));
16+
    return {
17+
      statusCode200,
18+
      headers{ 'Content-Type''text/plain' },
19+
      body`Hello from Project Vesper! You've hit ${event.path}\n`
20+
    };
21+
};
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"41.0.0"}
1+
{"version":"48.0.0"}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "41.0.0",
2+
"version": "48.0.0",
33
"testCases": {
44
"lambed-single-region/Integ/DefaultTest": {
55
"stacks": [
@@ -9,5 +9,5 @@
99
"assertionStackName": "lambedsingleregionIntegDefaultTestDeployAssertBF812D85"
1010
}
1111
},
12-
"minimumCliVersion": "2.1005.0"
12+
"minimumCliVersion": "2.1024.0"
1313
}

source/patterns/@aws-solutions-constructs/aws-lambda-bedrockinferenceprofile/test/integ.lambed-single-region.js.snapshot/lambed-single-region.assets.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "41.0.0",
2+
"version": "48.0.0",
33
"files": {
44
"0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f": {
55
"displayName": "test-lambda-inferenceprops/LambdaFunction/Code",
@@ -8,23 +8,23 @@
88
"packaging": "zip"
99
},
1010
"destinations": {
11-
"current_account-current_region": {
11+
"current_account-current_region-86d36d19": {
1212
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
1313
"objectKey": "0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f.zip",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1515
}
1616
}
1717
},
18-
"70173c074415be65df00341d3f84b73cefdeebab6858b6a5ebf90d7f19a170dd": {
18+
"7c854a810755d0dcf01a1d45e130b0beeaf2789e67c53a55e8cf1573ac43e530": {
1919
"displayName": "lambed-single-region Template",
2020
"source": {
2121
"path": "lambed-single-region.template.json",
2222
"packaging": "file"
2323
},
2424
"destinations": {
25-
"current_account-current_region": {
25+
"current_account-current_region-bc8d2154": {
2626
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
27-
"objectKey": "70173c074415be65df00341d3f84b73cefdeebab6858b6a5ebf90d7f19a170dd.json",
27+
"objectKey": "7c854a810755d0dcf01a1d45e130b0beeaf2789e67c53a55e8cf1573ac43e530.json",
2828
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2929
}
3030
}

source/patterns/@aws-solutions-constructs/aws-lambda-bedrockinferenceprofile/test/integ.lambed-single-region.js.snapshot/lambed-single-region.template.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,7 @@
242242
{
243243
"Ref": "AWS::Region"
244244
},
245-
":",
246-
{
247-
"Ref": "AWS::AccountId"
248-
},
249-
":foundation-model/amazon.nova-lite-v1:0"
245+
"::foundation-model/amazon.nova-lite-v1:0"
250246
]
251247
]
252248
}

source/patterns/@aws-solutions-constructs/aws-lambda-bedrockinferenceprofile/test/integ.lambed-single-region.js.snapshot/lambedsingleregionIntegDefaultTestDeployAssertBF812D85.assets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "41.0.0",
2+
"version": "48.0.0",
33
"files": {
44
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
55
"displayName": "lambedsingleregionIntegDefaultTestDeployAssertBF812D85 Template",
@@ -8,7 +8,7 @@
88
"packaging": "file"
99
},
1010
"destinations": {
11-
"current_account-current_region": {
11+
"current_account-current_region-d8d86b35": {
1212
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
1313
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
1414
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"

0 commit comments

Comments
 (0)