Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 37cdf66

Browse files
Merge pull request #250 from aws-solutions/staging/v1.0.0
Version 1.0.0 Automated Release PR
2 parents cfb2af6 + 62a6fd2 commit 37cdf66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+678
-43
lines changed

.github/workflows/release-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
VERSION=v${{ github.event.inputs.version }}
5757
DIST_OUTPUT_BUCKET=micl-dev
5858
TEMPLATE_OUTPUT_BUCKET=micl-dev-${{ env.REGION }}
59-
./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
59+
echo y | ./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
6060
echo "Templates artifact:"
6161
cat ./templateUrl.txt
6262
- name: 'Upload MIE One-click Deployment Artifact'
@@ -147,7 +147,7 @@ jobs:
147147
VERSION=v${{ github.event.inputs.version }}
148148
DIST_OUTPUT_BUCKET=micl-dev
149149
TEMPLATE_OUTPUT_BUCKET=micl-dev-${{ env.REGION }}
150-
./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
150+
echo y | ./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
151151
echo "Templates artifact:"
152152
cat ./templateUrl.txt
153153
- name: 'Upload MIE One-click Deployment Artifact'

CHANGELOG.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.0.0] - 2021-10-22
8-
- Initial release.
9-
7+
## [1.0.0] - 2021-11-3
108
### Added
11-
- Everything.
12-
13-
### Changed
14-
- Nothing. This is the first release.
15-
16-
### Removed
17-
- Nothing. This is the first release.
9+
- CHANGELOG version 1.0.0 release

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ reported the issue. Please try to include as much information as you can. Detail
2323
## Contributing via Pull Requests
2424
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2525

26-
1. You are working against the latest source on the *main* branch.
26+
1. You are working against the latest source on the *development* branch.
2727
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
2828
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
2929

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ The following Cloudformation templates will deploy the Content Localization fron
3636

3737
Region| Launch
3838
------|-----
39-
US West (Oregon) | [![Launch in us-west-2](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=clo&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
40-
US East (N. Virginia) | [![Launch in us-east-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-us-east-1.s3.us-east-1.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
41-
EU West (Ireland) | [![Launch in eu-west-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-eu-west-1.s3.eu-west-1.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
39+
US West (Oregon) | [![Launch in us-west-2](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=clo&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)
40+
US East (N. Virginia) | [![Launch in us-east-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-us-east-1.s3.us-east-1.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)
41+
EU West (Ireland) | [![Launch in eu-west-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-eu-west-1.s3.eu-west-1.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)
4242

4343
For more installation options, see the [Advanced Installation](#advanced-installation-options) section.
4444

@@ -141,6 +141,10 @@ TEMPLATE=[copy "Without existing MIE deployment" link from output of build scrip
141141
aws cloudformation create-stack --stack-name $WEBAPP_STACK_NAME --template-url $TEMPLATE --region $REGION --parameters ParameterKey=AdminEmail,ParameterValue=$EMAIL --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --profile default --disable-rollback
142142
```
143143

144+
### Tests
145+
146+
See the [tests README document](test/README.md) for information on how to run tests for this project.
147+
144148
# Advanced Usage
145149

146150
## Adding new operators and extending data stream consumers:
@@ -255,7 +259,9 @@ aws s3 rb s3://<bucket-name> --force
255259

256260
## Collection of operational metrics
257261

258-
This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the [implementation guide](_https://docs.aws.amazon.com/solutions/latest/<content-localization-on-aws>/collection-of-operational-metrics.html_).
262+
This solution collects anonymous operational metrics to help AWS improve the
263+
quality of features of the solution. For more information, including how to disable
264+
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/content-localization-on-aws/collection-of-operational-metrics.html).
259265

260266
When enabled, the following information is collected and sent to AWS:
261267

@@ -273,7 +279,7 @@ Example data:
273279
"UUID": "d84a0bd5-7483-494e-8ab1-fdfaa7e97687",
274280
"TimeStamp": "2021-03-01T20:03:05.798545",
275281
"Data": {
276-
"Version": "v2.0.0",
282+
"Version": "v1.0.0",
277283
"CFTemplate": "Created"
278284
}
279285
}

deployment/content-localization-on-aws-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS - user authentication infrastructure"
2+
Description: "Content Localization on AWS %%VERSION%% - user authentication infrastructure"
33

44
Parameters:
55
AdminEmail:

deployment/content-localization-on-aws-opensearch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS - Opensearch Consumer stack"
2+
Description: "Content Localization on AWS %%VERSION%% - Opensearch Consumer stack"
33

44
Parameters:
55
NodeType:
@@ -96,7 +96,7 @@ Resources:
9696
Variables:
9797
EsEndpoint: !GetAtt OpensearchServiceDomain.DomainEndpoint
9898
DataplaneBucket: !Ref MieDataplaneBucket
99-
botoConfig: '{"user_agent_extra": "AwsSolution/SO0042/%%VERSION%%"}'
99+
botoConfig: '{"user_agent_extra": "AwsSolution/SO0164/%%VERSION%%"}'
100100

101101
# stream event mapping for lambda
102102

deployment/content-localization-on-aws-video-workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS - Deploys video processing workflow"
2+
Description: "Content Localization on AWS %%VERSION%% - Deploys video processing workflow"
33

44
Parameters:
55
WorkflowCustomResourceArn:

deployment/content-localization-on-aws-web.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS - Deploys the Content Localization on AWS website resources"
2+
Description: "Content Localization on AWS %%VERSION%% - Deploys the Content Localization on AWS website resources"
33

44
Parameters:
55
DataplaneEndpoint:

source/consumer/lambda_handler.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
# SPDX-License-Identifier: Apache-2.0
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+
######################################################################################################################
313

414
from elasticsearch import Elasticsearch, RequestsHttpConnection
515
import base64

source/helper/website_helper.py

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
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+
114
import boto3
215
import json
316
import logging
@@ -101,22 +114,20 @@ def copy_source(event, context):
101114

102115
deployment_bucket = s3.Bucket(website_bucket)
103116

104-
objects = s3.Bucket(name=source_bucket).objects.filter(Prefix='{k}/'.format(k=source_key))
105-
106-
for s3_object in objects:
107-
old_key = s3_object.key
108-
LOGGER.info(old_key)
109-
try:
110-
new_key = old_key.split('website/')[1]
111-
# Only pickup items under the "website" prefix
112-
except IndexError:
113-
pass
114-
else:
115-
source = {"Bucket": source_bucket, "Key": old_key}
116-
deployment_bucket.copy(source, '{key}'.format(key=new_key))
117-
if replace_env_variables is True and new_key == "runtimeConfig.json":
117+
with open('./webapp-manifest.json') as file:
118+
manifest = json.load(file)
119+
print('UPLOADING FILES::')
120+
for key in manifest:
121+
print('s3://'+source_bucket+'/'+source_key+'/'+key)
122+
copy_source = {
123+
'Bucket': source_bucket,
124+
'Key': source_key+'/'+key
125+
}
126+
s3.meta.client.copy(copy_source, website_bucket, key)
127+
if replace_env_variables is True and key == "runtimeConfig.json":
118128
LOGGER.info("updating runtimeConfig.json")
119-
write_to_s3(event, context, website_bucket, new_key, json.dumps(new_variables))
129+
write_to_s3(event, context, website_bucket, key, json.dumps(new_variables))
130+
120131
except Exception as e:
121132
LOGGER.info("Unable to copy website source code into the website bucket: {e}".format(e=e))
122133
send_response(event, context, "FAILED", {"Message": "Unexpected event received from CloudFormation"})

0 commit comments

Comments
 (0)