将ACM/IAM服务器证书上载到AWS并将其应用到ELBS
cert-uploader的Python项目详细描述
证书上载程序
上载ACM/IAM服务器证书并将其应用于ELBS
要求
python 2.7或3.6
安装
pip install cert-uploader
用法
帮助文本
cert-uploader --help
cert-uploader iam --help
cert-uploader acm --help
IAM
扫描当前目录中的证书并上载到IAM:
cert-uploader --scan \
iam \
--certificate-name cert-name
向IAM上载新证书:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
iam \
--certificate-name cert-name
将新证书上载到IAM并将其分配给负载平衡器:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
--load-balancer load-balancer-name \
iam \
--certificate-name cert-name
在路径“/test”上载新的IAM证书并将其分配给负载平衡器:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
--load-balancer load-balancer-name \
iam \
--certificate-name cert-name \
--iam-path /test
上载新的IAM证书并将其分配给端口8443上的负载平衡器:
cert-uploader --load-balancer load-balancer-name \
--port 8443 \
--certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
iam \
--certificate-name cert-name
将现有的IAM证书分配给负载均衡器:
cert-uploader --load-balancer load-balancer-name \
iam \
--certificate-name cert-name
acm
扫描当前目录中的证书并上载到ACM:
cert-uploader --scan \
acm \
--region region-name
向ACM上载新证书:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
acm
将新证书上载到ACM并添加标记:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
acm \
--tag Name=cert \
--tag App=app1
将新证书上载到ACM并将其分配给负载平衡器:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
--load-balancer load-balancer-name \
acm \
--tag Name=cert \
--tag App=app1
上载新的ACM证书并将其分配给端口8443上的负载平衡器:
cert-uploader --load-balancer load-balancer-name \
--port 8443 \
--certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
acm
将现有的ACM证书分配给负载均衡器:
cert-uploader --load-balancer load-balancer-name \
acm \
--certificate-arn arn:aws:acm:REGION:ACCOUNT:certificate/CERTIFICATE_ID
凭证
剖面图
可以使用--profile
命令行参数传入aws凭据:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
--profile profile-name \
acm
或者通过设置AWS_PROFILE
环境变量:
export AWS_PROFILE=profile-name
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
acm
访问键
如果未配置配置文件,则AWS_ACCESS_KEY_ID
、AWS_SECRET_ACCESS_KEY
和AWS_DEFAULT_REGION
可以设置环境变量并将其用于身份验证。
角色
可以使用--role
命令行参数假定角色:
cert-uploader --certificate-path path/to/certificate.crt \
--private-key-path path/to/key.pem \
--certificate-chain-path path/to/chain.crt \
--role role-arn \
acm