I have a boto3 client :
boto3.client(\'kms\')
But it happens on new machines, They open and close dynamically.
if endpoint
For those using CloudFormation template. You can set AWS_DEFAULT_REGION
environment variable using UserData and AWS::Region
. For example,
MyInstance1:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-04b9e92b5572fa0d1 #ubuntu
InstanceType: t2.micro
UserData:
Fn::Base64: !Sub |
#!/bin/bash -x
echo "export AWS_DEFAULT_REGION=${AWS::Region}" >> /etc/profile