Skip to content

Commit c0f33ed

Browse files
committed
Fix cloudwatch key url domain for ADC
1 parent 1248bb5 commit c0f33ed

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cookbooks/aws-parallelcluster-environment/resources/cloudwatch/partial/_cloudwatch_common.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@
2727

2828
action_cloudwatch_prerequisite
2929

30+
region = node['cluster']['region']
31+
key_path = "amazoncloudwatch-agent/assets/amazon-cloudwatch-agent.gpg"
32+
cloudwatch_key_url = "https://s3.amazonaws.com/#{key_path}"
33+
if region.start_with?("us-iso")
34+
cloudwatch_key_url = "https://s3.#{aws_region}.#{aws_domain}/#{key_path}"
35+
end
36+
3037
public_key_local_path = "#{node['cluster']['sources_dir']}/amazon-cloudwatch-agent.gpg"
3138
remote_file public_key_local_path do
32-
source 'https://s3.amazonaws.com/amazoncloudwatch-agent/assets/amazon-cloudwatch-agent.gpg'
39+
source cloudwatch_key_url
3340
retries 3
3441
retry_delay 5
3542
action :create_if_missing

0 commit comments

Comments
 (0)