Connection module for Amazon CloudFront
New in version 2018.3.0.
boto3
This module accepts explicit AWS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles or it can read them from the ~/.aws/credentials file or from these environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
iam-roles-for-amazon-ec2.html
http://boto3.readthedocs.io/en/latest/guide/
configuration.html#guide-configuration
If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:
cloudfront.keyid: GKTADJGHEIQSXMKKRBJ08H
cloudfront.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration:
cloudfront.region: us-east-1
If a region is not specified, the default is us-east-1.
It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
Create a CloudFront distribution with the given name, config, and (optionally) tags.
Name for the CloudFront distribution
Configuration for the distribution
Tags to associate with the distribution
Region to connect to
Secret key to use
Access key to use
A dict with region, key, and keyid, or a pillar key (string) that contains such a dict.
CLI Example:
salt myminion boto_cloudfront.create_distribution name=mydistribution profile=awsprofile config='{"Comment":"partial configuration","Enabled":true}'
Get details of all CloudFront distributions. Produces results that can be used to create an SLS file.
CLI Example:
salt-call boto_cloudfront.export_distributions --out=txt | sed "s/local: //" > cloudfront_distributions.sls
Get information about a CloudFront distribution (configuration, tags) with a given name.
Name of the CloudFront distribution
Region to connect to
Secret key to use
Access key to use
A dict with region, key, and keyid, or a pillar key (string) that contains such a dict.
CLI Example:
salt myminion boto_cloudfront.get_distribution name=mydistribution profile=awsprofile
Update the config (and optionally tags) for the CloudFront distribution with the given name.
Name of the CloudFront distribution
Configuration for the distribution
Tags to associate with the distribution
Region to connect to
Secret key to use
Access key to use
A dict with region, key, and keyid, or a pillar key (string) that contains such a dict.
CLI Example:
salt myminion boto_cloudfront.update_distribution name=mydistribution profile=awsprofile config='{"Comment":"partial configuration","Enabled":true}'