Below are possible options available In aws for managing ssl certificates
1) Choose a certificate from ACM (recommended)
2) Choose a certificate from IAM
3) Upload a certificate to IAM
In this we shall follow Choose a certificate from IAM
creating self signed ssl certtificates steps
Generate private Key(Open SSL)
Generate Self Signed Certificate (Open SSL)
Upload Certificate To AWS IAM (AWS CLI)
Create SSL Enabled ELB
mohammedrafi@noc:~$ openssl genrsa 2048 > my-private-key.pem
Generating RSA private key, 2048 bit long modulus
…………………………..+++
…………………+++
e is 65537 (0x10001)
mohammedrafi@noc:~$ openssl req -new -x509 -nodes -sha256 -days 365 -key my-private-key.pem -outform PEM -out my-certificate.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:TS
Locality Name (eg, city) []:HYD
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MYCOMPANY
Organizational Unit Name (eg, section) []:NOC
Common Name (e.g. server FQDN or YOUR name) []:*devopscore.com
Email Address []:mohammedrafi494@gmail.com
mohammedrafi@noc:~$ aws ls
usage: aws [options] <command> <subcommand> [<subcommand> …] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: argument command: Invalid choice, valid choices are:
acm | alexaforbusiness
apigateway | application-autoscaling
appstream | appsync
athena | autoscaling
autoscaling-plans | batch
budgets | ce
cloud9 | clouddirectory
cloudformation | cloudfront
cloudhsm | cloudhsmv2
cloudsearch | cloudsearchdomain
cloudtrail | cloudwatch
codebuild | codecommit
codepipeline | codestar
cognito-identity | cognito-idp
cognito-sync | comprehend
cur | datapipeline
dax | devicefarm
directconnect | discovery
dms | ds
dynamodb | dynamodbstreams
ec2 | ecr
ecs | efs
elasticache | elasticbeanstalk
elastictranscoder | elb
elbv2 | emr
es | events
firehose | gamelift
glacier | glue
greengrass | guardduty
health | iam
importexport | inspector
iot | iot-data
iot-jobs-data | kinesis
kinesis-video-archived-media | kinesis-video-media
kinesisanalytics | kinesisvideo
kms | lambda
lex-models | lex-runtime
lightsail | logs
machinelearning | marketplace-entitlement
marketplacecommerceanalytics | mediaconvert
medialive | mediapackage
mediastore | mediastore-data
meteringmarketplace | mgh
mobile | mq
mturk | opsworks
opsworkscm | organizations
pinpoint | polly
pricing | rds
redshift | rekognition
resource-groups | resourcegroupstaggingapi
route53 | route53domains
sagemaker | sagemaker-runtime
sdb | serverlessrepo
servicecatalog | servicediscovery
ses | shield
sms | snowball
sns | sqs
ssm | stepfunctions
storagegateway | sts
support | swf
transcribe | translate
waf | waf-regional
workdocs | workmail
workspaces | xray
s3api | s3
configure | deploy
configservice | opsworks-cm
runtime.sagemaker | history
help
mohammedrafi@noc:~$ aws iam help
mohammedrafi@noc:~$ aws iam upload-server-certificate –server-certificate-name MyCertificate –certificate-body file://my-certificate.pem –private-key file://my-private-key.pem
{
“ServerCertificateMetadata”: {
“ServerCertificateId”: “ASCAJ3X7RTFWXYLQ6JS6I”,
“Path”: “/”,
“UploadDate”: “2018-02-05T15:11:59.757Z”,
“ServerCertificateName”: “MyCertificate”,
“Expiration”: “2019-02-05T15:09:52Z”,
“Arn”: “arn:aws:iam::536751915275:server-certificate/MyCertificate”
}
}
